Gentoo Archives: gentoo-commits

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