Gentoo Archives: gentoo-commits

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