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