Gentoo Archives: gentoo-commits

From: "Benedikt Boehm (hollow)" <hollow@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-servers/nginx: nginx-1.0.2.ebuild ChangeLog nginx-1.0.4.ebuild
Date: Thu, 02 Jun 2011 06:07:31
Message-Id: 20110602060710.F145F20054@flycatcher.gentoo.org
1 hollow 11/06/02 06:07:10
2
3 Modified: nginx-1.0.2.ebuild ChangeLog
4 Added: nginx-1.0.4.ebuild
5 Log:
6 version bump wrt #369631. also fixes #369617
7
8 (Portage version: 2.2.0_alpha37/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.4 www-servers/nginx/nginx-1.0.2.ebuild
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/nginx-1.0.2.ebuild?rev=1.4&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/nginx-1.0.2.ebuild?rev=1.4&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/nginx-1.0.2.ebuild?r1=1.3&r2=1.4
16
17 Index: nginx-1.0.2.ebuild
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-servers/nginx/nginx-1.0.2.ebuild,v
20 retrieving revision 1.3
21 retrieving revision 1.4
22 diff -u -r1.3 -r1.4
23 --- nginx-1.0.2.ebuild 24 May 2011 07:08:12 -0000 1.3
24 +++ nginx-1.0.2.ebuild 2 Jun 2011 06:07:10 -0000 1.4
25 @@ -1,6 +1,6 @@
26 # Copyright 1999-2011 Gentoo Foundation
27 # Distributed under the terms of the GNU General Public License v2
28 -# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/nginx-1.0.2.ebuild,v 1.3 2011/05/24 07:08:12 hollow Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/nginx-1.0.2.ebuild,v 1.4 2011/06/02 06:07:10 hollow Exp $
30
31 EAPI="2"
32
33 @@ -40,7 +40,7 @@
34 HTTP_EY_BALANCER_MODULE_SHA1="d373670"
35
36 # http_slowfs_cache (http://labs.frickle.com/nginx_ngx_slowfs_cache/, BSD-2 license)
37 -HTTP_SLOWFS_CACHE_MODULE_PV="1.5"
38 +HTTP_SLOWFS_CACHE_MODULE_PV="1.6"
39 HTTP_SLOWFS_CACHE_MODULE_P="ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}"
40
41 inherit eutils ssl-cert toolchain-funcs perl-module flag-o-matic
42
43
44
45 1.284 www-servers/nginx/ChangeLog
46
47 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/ChangeLog?rev=1.284&view=markup
48 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/ChangeLog?rev=1.284&content-type=text/plain
49 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/ChangeLog?r1=1.283&r2=1.284
50
51 Index: ChangeLog
52 ===================================================================
53 RCS file: /var/cvsroot/gentoo-x86/www-servers/nginx/ChangeLog,v
54 retrieving revision 1.283
55 retrieving revision 1.284
56 diff -u -r1.283 -r1.284
57 --- ChangeLog 24 May 2011 21:12:51 -0000 1.283
58 +++ ChangeLog 2 Jun 2011 06:07:10 -0000 1.284
59 @@ -1,6 +1,12 @@
60 # ChangeLog for www-servers/nginx
61 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
62 -# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/ChangeLog,v 1.283 2011/05/24 21:12:51 maekke Exp $
63 +# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/ChangeLog,v 1.284 2011/06/02 06:07:10 hollow Exp $
64 +
65 +*nginx-1.0.4 (02 Jun 2011)
66 +
67 + 02 Jun 2011; Benedikt Böhm <hollow@g.o> nginx-1.0.2.ebuild,
68 + +nginx-1.0.4.ebuild:
69 + version bump wrt #369631. also fixes #369617
70
71 24 May 2011; Markus Meier <maekke@g.o> nginx-1.0.0-r1.ebuild:
72 x86 stable, bug #368219
73
74
75
76 1.1 www-servers/nginx/nginx-1.0.4.ebuild
77
78 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/nginx-1.0.4.ebuild?rev=1.1&view=markup
79 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/nginx-1.0.4.ebuild?rev=1.1&content-type=text/plain
80
81 Index: nginx-1.0.4.ebuild
82 ===================================================================
83 # Copyright 1999-2011 Gentoo Foundation
84 # Distributed under the terms of the GNU General Public License v2
85 # $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/nginx-1.0.4.ebuild,v 1.1 2011/06/02 06:07:10 hollow Exp $
86
87 EAPI="2"
88
89 # Maintainer notes:
90 # - http_rewrite-independent pcre-support makes sense for matching locations without an actual rewrite
91 # - any http-module activates the main http-functionality and overrides USE=-http
92 # - keep the following 3 requirements in mind before adding external modules:
93 # * alive upstream
94 # * sane packaging
95 # * builds cleanly
96 # - TODO: test the google-perftools module (included in vanilla tarball)
97
98 # prevent perl-module from adding automagic perl DEPENDs
99 GENTOO_DEPEND_ON_PERL="no"
100
101 # http_headers_more (http://github.com/agentzh/headers-more-nginx-module, BSD license)
102 HTTP_HEADERS_MORE_MODULE_PV="0.13"
103 HTTP_HEADERS_MORE_MODULE_P="ngx-http-headers-more-${HTTP_HEADERS_MORE_MODULE_PV}"
104 HTTP_HEADERS_MORE_MODULE_SHA1="9508330"
105
106 # http_push (http://pushmodule.slact.net/, MIT license)
107 HTTP_PUSH_MODULE_PV="0.692"
108 HTTP_PUSH_MODULE_P="nginx_http_push_module-${HTTP_PUSH_MODULE_PV}"
109
110 # http_cache_purge (http://labs.frickle.com/nginx_ngx_cache_purge/, BSD-2 license)
111 HTTP_CACHE_PURGE_MODULE_PV="1.3"
112 HTTP_CACHE_PURGE_MODULE_P="ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}"
113
114 # HTTP Upload module from Valery Kholodkov
115 # (http://www.grid.net.ru/nginx/upload.en.html, BSD license)
116 HTTP_UPLOAD_MODULE_PV="2.2.0"
117 HTTP_UPLOAD_MODULE_P="nginx_upload_module-${HTTP_UPLOAD_MODULE_PV}"
118
119 # ey-balancer/maxconn module (https://github.com/ry/nginx-ey-balancer, as-is)
120 HTTP_EY_BALANCER_MODULE_PV="0.0.6"
121 HTTP_EY_BALANCER_MODULE_P="nginx-ey-balancer-${HTTP_EY_BALANCER_MODULE_PV}"
122 HTTP_EY_BALANCER_MODULE_SHA1="d373670"
123
124 # http_slowfs_cache (http://labs.frickle.com/nginx_ngx_slowfs_cache/, BSD-2 license)
125 HTTP_SLOWFS_CACHE_MODULE_PV="1.6"
126 HTTP_SLOWFS_CACHE_MODULE_P="ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}"
127
128 inherit eutils ssl-cert toolchain-funcs perl-module flag-o-matic
129
130 DESCRIPTION="Robust, small and high performance http and reverse proxy server"
131 HOMEPAGE="http://nginx.net/
132 http://pushmodule.slact.net/
133 http://labs.frickle.com/nginx_ngx_cache_purge/"
134 SRC_URI="http://sysoev.ru/nginx/${P}.tar.gz
135 nginx_modules_http_headers_more? ( http://github.com/agentzh/headers-more-nginx-module/tarball/v${HTTP_HEADERS_MORE_MODULE_PV} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz )
136 nginx_modules_http_push? ( http://pushmodule.slact.net/downloads/${HTTP_PUSH_MODULE_P}.tar.gz )
137 nginx_modules_http_cache_purge? ( http://labs.frickle.com/files/${HTTP_CACHE_PURGE_MODULE_P}.tar.gz )
138 nginx_modules_http_upload? ( http://www.grid.net.ru/nginx/download/${HTTP_UPLOAD_MODULE_P}.tar.gz )
139 nginx_modules_http_ey_balancer? ( https://github.com/ry/nginx-ey-balancer/tarball/v${HTTP_EY_BALANCER_MODULE_PV} -> ${HTTP_EY_BALANCER_MODULE_P}.tar.gz )
140 nginx_modules_http_slowfs_cache? ( http://labs.frickle.com/files/${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz )"
141
142 LICENSE="as-is BSD BSD-2 GPL-2 MIT"
143 SLOT="0"
144 KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
145
146 NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif fastcgi
147 geo gzip limit_req limit_zone map memcached proxy referer rewrite scgi ssi
148 split_clients upstream_ip_hash userid uwsgi"
149 NGINX_MODULES_OPT="addition dav degradation flv geoip gzip_static image_filter
150 perl random_index realip secure_link stub_status sub xslt"
151 NGINX_MODULES_MAIL="imap pop3 smtp"
152 NGINX_MODULES_3RD="http_cache_purge http_headers_more http_passenger http_push
153 http_upload http_ey_balancer http_slowfs_cache"
154
155 IUSE="aio debug +http +http-cache ipv6 libatomic +pcre ssl vim-syntax"
156
157 for mod in $NGINX_MODULES_STD; do
158 IUSE="${IUSE} +nginx_modules_http_${mod}"
159 done
160
161 for mod in $NGINX_MODULES_OPT; do
162 IUSE="${IUSE} nginx_modules_http_${mod}"
163 done
164
165 for mod in $NGINX_MODULES_MAIL; do
166 IUSE="${IUSE} nginx_modules_mail_${mod}"
167 done
168
169 for mod in $NGINX_MODULES_3RD; do
170 IUSE="${IUSE} nginx_modules_${mod}"
171 done
172
173 CDEPEND="
174 pcre? ( >=dev-libs/libpcre-4.2 )
175 ssl? ( dev-libs/openssl )
176 http-cache? ( userland_GNU? ( dev-libs/openssl ) )
177 nginx_modules_http_geo? ( dev-libs/geoip )
178 nginx_modules_http_gzip? ( sys-libs/zlib )
179 nginx_modules_http_gzip_static? ( sys-libs/zlib )
180 nginx_modules_http_image_filter? ( media-libs/gd[jpeg,png] )
181 nginx_modules_http_perl? ( >=dev-lang/perl-5.8 )
182 nginx_modules_http_rewrite? ( >=dev-libs/libpcre-4.2 )
183 nginx_modules_http_secure_link? ( userland_GNU? ( dev-libs/openssl ) )
184 nginx_modules_http_xslt? ( dev-libs/libxml2 dev-libs/libxslt )"
185 RDEPEND="${CDEPEND}"
186 DEPEND="${CDEPEND}
187 arm? ( dev-libs/libatomic_ops )
188 libatomic? ( dev-libs/libatomic_ops )"
189 PDEPEND="vim-syntax? ( app-vim/nginx-syntax )"
190
191 pkg_setup() {
192 if use nginx_modules_http_passenger; then
193 einfo
194 einfo "Passenger support has been removed from the nginx ebuild to"
195 einfo "get rid of file collisions, its broken build system and"
196 einfo "incompatibilities between passenger 2 and 3."
197 einfo
198 einfo "Please switch to passenger-3 standalone or use the"
199 einfo "unicorn gem which provides a sane nginx-like architecture"
200 einfo "out of the box."
201 einfo
202 einfo "For more information on sane ruby deployments with"
203 einfo "passenger-3/unicorn go to:"
204 einfo
205 einfo "https://rvm.beginrescueend.com"
206 einfo
207 die "nginx_modules_http_passenger still in IUSE"
208 fi
209
210 ebegin "Creating nginx user and group"
211 enewgroup ${PN}
212 enewuser ${PN} -1 -1 -1 ${PN}
213 eend ${?}
214
215 if use ipv6; then
216 ewarn "Note that ipv6 support in nginx is still experimental."
217 ewarn "Be sure to read comments on gentoo bug #274614"
218 ewarn "http://bugs.gentoo.org/show_bug.cgi?id=274614"
219 fi
220
221 if use libatomic; then
222 ewarn "GCC 4.1+ features built-in atomic operations."
223 ewarn "Using libatomic_ops is only needed if using"
224 ewarn "a different compiler or a GCC prior to 4.1"
225 fi
226
227 if [[ -n $NGINX_ADD_MODULES ]]; then
228 ewarn "You are building custom modules via \$NGINX_ADD_MODULES!"
229 ewarn "This nginx installation is not supported!"
230 ewarn "Make sure you can reproduce the bug without those modules"
231 ewarn "_before_ reporting bugs."
232 fi
233
234 if use !http; then
235 ewarn "To actually disable all http-functionality you also have to disable"
236 ewarn "all nginx http modules."
237 fi
238 }
239
240 src_prepare() {
241 sed -i 's/ make/ \\$(MAKE)/' "${S}"/auto/lib/perl/make
242
243 if use nginx_modules_http_ey_balancer; then
244 epatch "${FILESDIR}"/nginx-0.8.32-ey-balancer.patch
245 fi
246 }
247
248 src_configure() {
249 local myconf= http_enabled= mail_enabled=
250
251 use aio && myconf="${myconf} --with-file-aio --with-aio_module"
252 use debug && myconf="${myconf} --with-debug"
253 use ipv6 && myconf="${myconf} --with-ipv6"
254 use libatomic && myconf="${myconf} --with-libatomic"
255 use pcre && myconf="${myconf} --with-pcre"
256
257 # HTTP modules
258 for mod in $NGINX_MODULES_STD; do
259 if use nginx_modules_http_${mod}; then
260 http_enabled=1
261 else
262 myconf="${myconf} --without-http_${mod}_module"
263 fi
264 done
265
266 for mod in $NGINX_MODULES_OPT; do
267 if use nginx_modules_http_${mod}; then
268 http_enabled=1
269 myconf="${myconf} --with-http_${mod}_module"
270 fi
271 done
272
273 if use nginx_modules_http_fastcgi; then
274 myconf="${myconf} --with-http_realip_module"
275 fi
276
277 # third-party modules
278 if use nginx_modules_http_headers_more; then
279 http_enabled=1
280 myconf="${myconf} --add-module=${WORKDIR}/agentzh-headers-more-nginx-module-${HTTP_HEADERS_MORE_MODULE_SHA1}"
281 fi
282
283 if use nginx_modules_http_push; then
284 http_enabled=1
285 myconf="${myconf} --add-module=${WORKDIR}/${HTTP_PUSH_MODULE_P}"
286 fi
287
288 if use nginx_modules_http_cache_purge; then
289 http_enabled=1
290 myconf="${myconf} --add-module=${WORKDIR}/${HTTP_CACHE_PURGE_MODULE_P}"
291 fi
292
293 if use nginx_modules_http_upload; then
294 http_enabled=1
295 myconf="${myconf} --add-module=${WORKDIR}/${HTTP_UPLOAD_MODULE_P}"
296 fi
297
298 if use nginx_modules_http_ey_balancer; then
299 http_enabled=1
300 myconf="${myconf} --add-module=${WORKDIR}/ry-nginx-ey-balancer-${HTTP_EY_BALANCER_MODULE_SHA1}"
301 fi
302
303 if use nginx_modules_http_slowfs_cache; then
304 http_enabled=1
305 myconf="${myconf} --add-module=${WORKDIR}/${HTTP_SLOWFS_CACHE_MODULE_P}"
306 fi
307
308 if use http || use http-cache; then
309 http_enabled=1
310 fi
311
312 if [ $http_enabled ]; then
313 use http-cache || myconf="${myconf} --without-http-cache"
314 use ssl && myconf="${myconf} --with-http_ssl_module"
315 else
316 myconf="${myconf} --without-http --without-http-cache"
317 fi
318
319 # MAIL modules
320 for mod in $NGINX_MODULES_MAIL; do
321 if use nginx_modules_mail_${mod}; then
322 mail_enabled=1
323 else
324 myconf="${myconf} --without-mail_${mod}_module"
325 fi
326 done
327
328 if [ $mail_enabled ]; then
329 myconf="${myconf} --with-mail"
330 use ssl && myconf="${myconf} --with-mail_ssl_module"
331 fi
332
333 # custom modules
334 for mod in $NGINX_ADD_MODULES; do
335 myconf="${myconf} --add-module=${mod}"
336 done
337
338 # https://bugs.gentoo.org/286772
339 export LANG=C LC_ALL=C
340 tc-export CC
341
342 ./configure \
343 --prefix=/usr \
344 --sbin-path=/usr/sbin/nginx \
345 --conf-path=/etc/${PN}/${PN}.conf \
346 --error-log-path=/var/log/${PN}/error_log \
347 --pid-path=/var/run/${PN}.pid \
348 --lock-path=/var/lock/nginx.lock \
349 --user=${PN} --group=${PN} \
350 --with-cc-opt="-I${ROOT}usr/include" \
351 --with-ld-opt="-L${ROOT}usr/lib" \
352 --http-log-path=/var/log/${PN}/access_log \
353 --http-client-body-temp-path=/var/tmp/${PN}/client \
354 --http-proxy-temp-path=/var/tmp/${PN}/proxy \
355 --http-fastcgi-temp-path=/var/tmp/${PN}/fastcgi \
356 --http-scgi-temp-path=/var/tmp/${PN}/scgi \
357 --http-uwsgi-temp-path=/var/tmp/${PN}/uwsgi \
358 ${myconf} || die "configure failed"
359 }
360
361 src_compile() {
362 # https://bugs.gentoo.org/286772
363 export LANG=C LC_ALL=C
364 emake LINK="${CC} ${LDFLAGS}" OTHERLDFLAGS="${LDFLAGS}" || die "emake failed"
365 }
366
367 src_install() {
368 keepdir /var/log/${PN} /var/tmp/${PN}/{client,proxy,fastcgi,scgi,uwsgi}
369
370 dosbin objs/nginx
371 newinitd "${FILESDIR}"/nginx.init-r2 nginx
372
373 cp "${FILESDIR}"/nginx.conf-r4 conf/nginx.conf
374 rm conf/win-utf conf/koi-win conf/koi-utf
375
376 dodir /etc/${PN}
377 insinto /etc/${PN}
378 doins conf/*
379
380 doman man/nginx.8
381 dodoc CHANGES* README
382
383 # logrotate
384 insinto /etc/logrotate.d
385 newins "${FILESDIR}"/nginx.logrotate nginx
386
387 if use nginx_modules_http_perl; then
388 cd "${S}"/objs/src/http/modules/perl/
389 einstall DESTDIR="${D}" INSTALLDIRS=vendor || die "failed to install perl stuff"
390 fixlocalpod
391 fi
392
393 if use nginx_modules_http_push; then
394 docinto ${HTTP_PUSH_MODULE_P}
395 dodoc "${WORKDIR}"/${HTTP_PUSH_MODULE_P}/{changelog.txt,protocol.txt,README}
396 fi
397
398 if use nginx_modules_http_cache_purge; then
399 docinto ${HTTP_CACHE_PURGE_MODULE_P}
400 dodoc "${WORKDIR}"/${HTTP_CACHE_PURGE_MODULE_P}/{CHANGES,README}
401 fi
402
403 if use nginx_modules_http_upload; then
404 docinto ${HTTP_UPLOAD_MODULE_P}
405 dodoc "${WORKDIR}"/${HTTP_UPLOAD_MODULE_P}/{Changelog,README}
406 fi
407
408 if use nginx_modules_http_ey_balancer; then
409 docinto ${HTTP_EY_BALANCER_MODULE_P}
410 dodoc "${WORKDIR}"/ry-nginx-ey-balancer-${HTTP_EY_BALANCER_MODULE_SHA1}/README
411 fi
412
413 if use nginx_modules_http_slowfs_cache; then
414 docinto ${HTTP_SLOWFS_CACHE_MODULE_P}
415 dodoc "${WORKDIR}"/${HTTP_SLOWFS_CACHE_MODULE_P}/{CHANGES,README}
416 fi
417 }
418
419 pkg_postinst() {
420 if use ssl; then
421 if [ ! -f "${ROOT}"/etc/ssl/${PN}/${PN}.key ]; then
422 install_cert /etc/ssl/${PN}/${PN}
423 chown ${PN}:${PN} "${ROOT}"/etc/ssl/${PN}/${PN}.{crt,csr,key,pem}
424 fi
425 fi
426 }