Gentoo Archives: gentoo-commits

From: "Krzysiek Pawlik (nelchael)" <nelchael@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-servers/resin: ChangeLog resin-3.2.1-r1.ebuild resin-3.0.26.ebuild resin-3.1.6-r2.ebuild resin-3.2.1.ebuild
Date: Fri, 01 May 2009 22:40:18
Message-Id: E1M01Oy-0002ZE-Hv@stork.gentoo.org
1 nelchael 09/05/01 22:40:16
2
3 Modified: ChangeLog
4 Added: resin-3.2.1-r1.ebuild
5 Removed: resin-3.0.26.ebuild resin-3.1.6-r2.ebuild
6 resin-3.2.1.ebuild
7 Log:
8 Fix installation of resin.xml, drop old versions.
9 (Portage version: 2.1.6.11/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.86 www-servers/resin/ChangeLog
13
14 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/resin/ChangeLog?rev=1.86&view=markup
15 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/resin/ChangeLog?rev=1.86&content-type=text/plain
16 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/resin/ChangeLog?r1=1.85&r2=1.86
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/www-servers/resin/ChangeLog,v
21 retrieving revision 1.85
22 retrieving revision 1.86
23 diff -u -r1.85 -r1.86
24 --- ChangeLog 7 Mar 2009 16:22:58 -0000 1.85
25 +++ ChangeLog 1 May 2009 22:40:16 -0000 1.86
26 @@ -1,6 +1,15 @@
27 # ChangeLog for www-servers/resin
28 -# Copyright 2000-2009 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/www-servers/resin/ChangeLog,v 1.85 2009/03/07 16:22:58 nelchael Exp $
30 +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
31 +# $Header: /var/cvsroot/gentoo-x86/www-servers/resin/ChangeLog,v 1.86 2009/05/01 22:40:16 nelchael Exp $
32 +
33 +*resin-3.2.1-r1 (01 May 2009)
34 +
35 + 01 May 2009; Krzysiek Pawlik <nelchael@g.o>
36 + -files/3.0.26/resin.conf, -resin-3.1.6-r2.ebuild,
37 + -files/3.0.26/resin.init, -resin-3.2.1.ebuild, -files/3.1.6/resin.conf,
38 + +resin-3.2.1-r1.ebuild, -files/3.1.6/resin.init, files/3.2.1/resin.init,
39 + -resin-3.0.26.ebuild:
40 + Fix installation of resin.xml, drop old versions.
41
42 07 Mar 2009; Krzysiek Pawlik <nelchael@g.o> resin-3.2.1.ebuild:
43 Rewrite build-common.xml.
44
45
46
47 1.1 www-servers/resin/resin-3.2.1-r1.ebuild
48
49 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/resin/resin-3.2.1-r1.ebuild?rev=1.1&view=markup
50 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/resin/resin-3.2.1-r1.ebuild?rev=1.1&content-type=text/plain
51
52 Index: resin-3.2.1-r1.ebuild
53 ===================================================================
54 # Copyright 1999-2009 Gentoo Foundation
55 # Distributed under the terms of the GNU General Public License v2
56 # $Header: /var/cvsroot/gentoo-x86/www-servers/resin/resin-3.2.1-r1.ebuild,v 1.1 2009/05/01 22:40:16 nelchael Exp $
57
58 EAPI="2"
59
60 JAVA_PKG_IUSE="doc source"
61
62 inherit java-pkg-2 java-ant-2 eutils flag-o-matic multilib autotools
63
64 DESCRIPTION="A fast Servlet 2.5 and JSP 2.0 engine."
65 HOMEPAGE="http://www.caucho.com"
66 SRC_URI="http://www.caucho.com/download/${P}-src.zip
67 mirror://gentoo/resin-gentoo-patches-${PV}.tar.bz2"
68 LICENSE="GPL-2"
69 SLOT="0"
70 IUSE="admin"
71
72 KEYWORDS="~amd64 ~ppc ~x86"
73
74 ## java-virtuals/jaf"
75 COMMON_DEP="~dev-java/resin-servlet-api-${PV}
76 =dev-java/sun-j2ee-deployment-bin-1.1*
77 java-virtuals/javamail"
78
79 RDEPEND=">=virtual/jdk-1.5
80 ${COMMON_DEP}"
81 DEPEND=">=virtual/jdk-1.5
82 app-arch/unzip
83 dev-java/ant-core
84 dev-libs/openssl
85 ${COMMON_DEP}"
86
87 RESIN_HOME="/usr/$(get_libdir)/resin"
88
89 # Rewrites build.xml in documentation
90 JAVA_PKG_BSFIX="off"
91
92 pkg_setup() {
93
94 java-pkg-2_pkg_setup
95 enewgroup resin
96 enewuser resin -1 /bin/bash ${RESIN_HOME} resin
97
98 }
99
100 src_unpack() {
101
102 unpack ${A}
103 for i in "${WORKDIR}"/${PV}/resin-${PV}-*; do
104 epatch "${i}"
105 done;
106
107 java-ant_bsfix_one "${S}/build.xml"
108 java-ant_bsfix_one "${S}/build-common.xml"
109
110 sed -i -e 's/256m/384m/' "${S}/build.xml"
111
112 cd "${S}"
113 eautoreconf
114
115 }
116
117 src_configure() {
118
119 append-flags -fPIC -DPIC
120
121 chmod 755 "${S}/configure"
122 econf --prefix=${RESIN_HOME} || die "econf failed"
123
124 }
125
126 src_compile() {
127
128 einfo "Building libraries..."
129 # Broken with -jn where n > 1
130 emake -j1 || die "emake failed"
131
132 mkdir "${S}/lib"
133 cd "${S}/lib"
134 # java-pkg_jar-from --virtual jaf
135 java-pkg_jar-from --virtual javamail
136 # java-pkg_jar-from iso-relax
137 # java-pkg_jar-from aopalliance-1
138 java-pkg_jar-from sun-j2ee-deployment-bin-1.1
139 java-pkg_jar-from resin-servlet-api-2.5
140 ln -s $(java-config --jdk-home)/lib/tools.jar
141 cd "${S}"
142
143 einfo "Building jars..."
144 eant || die "ant failed"
145
146 if use doc; then
147 einfo "Building docs..."
148 eant doc || die "ant doc failed"
149 fi
150
151 }
152
153 src_install() {
154
155 make DESTDIR="${D}" install || die
156
157 dodir /etc/
158 mv "${D}/${RESIN_HOME}/conf" "${D}/etc/resin" || die "mv of conf failed"
159 dosym /etc/resin ${RESIN_HOME}/conf
160
161 keepdir /var/log/resin
162 keepdir /var/log/resin
163 keepdir /var/run/resin
164
165 dosym /var/log/resin ${RESIN_HOME}/logs
166 dosym /var/log/resin ${RESIN_HOME}/log
167
168 dodoc README "${S}"/conf/*.xml
169
170 newinitd "${FILESDIR}/${PV}/resin.init" resin
171 newconfd "${FILESDIR}/${PV}/resin.conf" resin
172
173 sed -i -e "s,__RESIN_HOME__,${RESIN_HOME},g" "${D}/etc/init.d/resin"
174
175 rm -f "${S}/lib/tools.jar"
176 java-pkg_dojar "${S}"/lib/*.jar
177 rm -fr "${D}/${RESIN_HOME}/lib"
178 dosym /usr/share/resin/lib ${RESIN_HOME}/lib
179 dosym /var/log/resin /usr/share/resin/log
180
181 dodir /var/lib/resin/webapps
182 mv "${D}"/${RESIN_HOME}/webapps/* "${D}/var/lib/resin/webapps" || \
183 die "mv of webapps failed"
184 rm -rf "${D}/${RESIN_HOME}/webapps"
185 dosym /var/lib/resin/webapps ${RESIN_HOME}/webapps
186
187 use admin && {
188 cp -a "${S}/doc/admin" "${D}/var/lib/resin/webapps/" || die "cp failed"
189 }
190
191 use source && {
192 einfo "Zipping source..."
193 java-pkg_dosrc "${S}"/modules/*/src/* 2> /dev/null
194 }
195
196 einfo "Removing unneeded files..."
197 rm -fr "${D}/${RESIN_HOME}/bin"
198 rm -fr "${D}/${RESIN_HOME}/doc"
199 rm -f "${D}"/etc/resin/*.orig
200
201 einfo "Fixing permissions..."
202 chown -R resin:resin "${D}${RESIN_HOME}"
203 chown -R resin:resin "${D}/etc/resin"
204 chown -R resin:resin "${D}/var/log/resin"
205 chown -R resin:resin "${D}/var/lib/resin"
206 chown -R resin:resin "${D}/var/run/resin"
207
208 chmod 644 "${D}/etc/conf.d/resin"
209 chmod 755 "${D}/etc/init.d/resin"
210 chmod 750 "${D}/var/lib/resin"
211 chmod 750 "${D}/var/run/resin"
212 chmod 750 "${D}/etc/resin"
213
214 }
215
216 pkg_postinst() {
217
218 elog
219 elog " User and group 'resin' have been added."
220 elog
221 elog " By default, Resin runs on port 8080. You can change this"
222 elog " value by editing /etc/resin/resin.xml."
223 elog
224 elog " webapps directory was moved to /var/lib/resin/webapps"
225 elog
226 elog " Most options has been moved from /etc/conf.d/resin to"
227 elog " /etc/resin/resin.xml."
228 elog
229
230 }