1 |
hollow 12/01/29 13:11:49 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: nginx-1.0.11.ebuild nginx-1.1.13.ebuild |
5 |
Removed: nginx-1.1.8.ebuild |
6 |
Log: |
7 |
version bump wrt #401163 |
8 |
|
9 |
(Portage version: 2.2.0_alpha84/cvs/Linux x86_64) |
10 |
|
11 |
Revision Changes Path |
12 |
1.305 www-servers/nginx/ChangeLog |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/ChangeLog?rev=1.305&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/ChangeLog?rev=1.305&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/ChangeLog?r1=1.304&r2=1.305 |
17 |
|
18 |
Index: ChangeLog |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/www-servers/nginx/ChangeLog,v |
21 |
retrieving revision 1.304 |
22 |
retrieving revision 1.305 |
23 |
diff -u -r1.304 -r1.305 |
24 |
--- ChangeLog 28 Dec 2011 05:56:19 -0000 1.304 |
25 |
+++ ChangeLog 29 Jan 2012 13:11:49 -0000 1.305 |
26 |
@@ -1,6 +1,13 @@ |
27 |
# ChangeLog for www-servers/nginx |
28 |
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/ChangeLog,v 1.304 2011/12/28 05:56:19 patrick Exp $ |
30 |
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
31 |
+# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/ChangeLog,v 1.305 2012/01/29 13:11:49 hollow Exp $ |
32 |
+ |
33 |
+*nginx-1.1.13 (29 Jan 2012) |
34 |
+*nginx-1.0.11 (29 Jan 2012) |
35 |
+ |
36 |
+ 29 Jan 2012; Benedikt Böhm <hollow@g.o> +nginx-1.0.11.ebuild, |
37 |
+ -nginx-1.1.8.ebuild, +nginx-1.1.13.ebuild: |
38 |
+ version bump wrt #401163 |
39 |
|
40 |
28 Dec 2011; Patrick Lauer <patrick@g.o> -nginx-1.1.11.ebuild, |
41 |
-nginx-1.1.12.ebuild: |
42 |
|
43 |
|
44 |
|
45 |
1.1 www-servers/nginx/nginx-1.0.11.ebuild |
46 |
|
47 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/nginx-1.0.11.ebuild?rev=1.1&view=markup |
48 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/nginx-1.0.11.ebuild?rev=1.1&content-type=text/plain |
49 |
|
50 |
Index: nginx-1.0.11.ebuild |
51 |
=================================================================== |
52 |
# Copyright 1999-2012 Gentoo Foundation |
53 |
# Distributed under the terms of the GNU General Public License v2 |
54 |
# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/nginx-1.0.11.ebuild,v 1.1 2012/01/29 13:11:49 hollow Exp $ |
55 |
|
56 |
EAPI="4" |
57 |
|
58 |
# Maintainer notes: |
59 |
# - http_rewrite-independent pcre-support makes sense for matching locations without an actual rewrite |
60 |
# - any http-module activates the main http-functionality and overrides USE=-http |
61 |
# - keep the following requirements in mind before adding external modules: |
62 |
# * alive upstream |
63 |
# * sane packaging |
64 |
# * builds cleanly |
65 |
# * does not need a patch for nginx core |
66 |
# - TODO: test the google-perftools module (included in vanilla tarball) |
67 |
|
68 |
# prevent perl-module from adding automagic perl DEPENDs |
69 |
GENTOO_DEPEND_ON_PERL="no" |
70 |
|
71 |
# http_uploadprogress (https://github.com/masterzen/nginx-upload-progress-module, BSD-2 license) |
72 |
HTTP_UPLOAD_PROGRESS_MODULE_PV="0.8.3" |
73 |
HTTP_UPLOAD_PROGRESS_MODULE_P="ngx_upload_progress-${HTTP_UPLOAD_PROGRESS_MODULE_PV}" |
74 |
HTTP_UPLOAD_PROGRESS_MODULE_SHA1="c7c663f" |
75 |
HTTP_UPLOAD_PROGRESS_MODULE_URI="http://github.com/masterzen/nginx-upload-progress-module/tarball/v${HTTP_UPLOAD_PROGRESS_MODULE_PV}" |
76 |
|
77 |
# http_headers_more (http://github.com/agentzh/headers-more-nginx-module, BSD license) |
78 |
HTTP_HEADERS_MORE_MODULE_PV="0.15" |
79 |
HTTP_HEADERS_MORE_MODULE_P="ngx_http_headers_more-${HTTP_HEADERS_MORE_MODULE_PV}" |
80 |
HTTP_HEADERS_MORE_MODULE_SHA1="137855d" |
81 |
HTTP_HEADERS_MORE_MODULE_URI="http://github.com/agentzh/headers-more-nginx-module/tarball/v${HTTP_HEADERS_MORE_MODULE_PV}" |
82 |
|
83 |
# http_push (http://pushmodule.slact.net/, MIT license) |
84 |
HTTP_PUSH_MODULE_PV="0.692" |
85 |
HTTP_PUSH_MODULE_P="nginx_http_push_module-${HTTP_PUSH_MODULE_PV}" |
86 |
HTTP_PUSH_MODULE_URI="http://pushmodule.slact.net/downloads/${HTTP_PUSH_MODULE_P}.tar.gz" |
87 |
|
88 |
# http_cache_purge (http://labs.frickle.com/nginx_ngx_cache_purge/, BSD-2 license) |
89 |
HTTP_CACHE_PURGE_MODULE_PV="1.4" |
90 |
HTTP_CACHE_PURGE_MODULE_P="ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}" |
91 |
HTTP_CACHE_PURGE_MODULE_URI="http://labs.frickle.com/files/${HTTP_CACHE_PURGE_MODULE_P}.tar.gz" |
92 |
|
93 |
# HTTP Upload module from Valery Kholodkov |
94 |
# (http://www.grid.net.ru/nginx/upload.en.html, BSD license) |
95 |
HTTP_UPLOAD_MODULE_PV="2.2.0" |
96 |
HTTP_UPLOAD_MODULE_P="nginx_upload_module-${HTTP_UPLOAD_MODULE_PV}" |
97 |
HTTP_UPLOAD_MODULE_URI="http://www.grid.net.ru/nginx/download/${HTTP_UPLOAD_MODULE_P}.tar.gz" |
98 |
|
99 |
# http_slowfs_cache (http://labs.frickle.com/nginx_ngx_slowfs_cache/, BSD-2 license) |
100 |
HTTP_SLOWFS_CACHE_MODULE_PV="1.6" |
101 |
HTTP_SLOWFS_CACHE_MODULE_P="ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}" |
102 |
HTTP_SLOWFS_CACHE_MODULE_URI="http://labs.frickle.com/files/${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz" |
103 |
|
104 |
inherit eutils ssl-cert toolchain-funcs perl-module flag-o-matic |
105 |
|
106 |
DESCRIPTION="Robust, small and high performance http and reverse proxy server" |
107 |
HOMEPAGE="http://nginx.org" |
108 |
SRC_URI="http://nginx.org/download/${P}.tar.gz |
109 |
nginx_modules_http_upload_progress? ( ${HTTP_UPLOAD_PROGRESS_MODULE_URI} -> ${HTTP_UPLOAD_PROGRESS_MODULE_P}.tar.gz ) |
110 |
nginx_modules_http_headers_more? ( ${HTTP_HEADERS_MORE_MODULE_URI} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz ) |
111 |
nginx_modules_http_push? ( ${HTTP_PUSH_MODULE_URI} ) |
112 |
nginx_modules_http_cache_purge? ( ${HTTP_CACHE_PURGE_MODULE_URI} ) |
113 |
nginx_modules_http_upload? ( ${HTTP_UPLOAD_MODULE_URI} ) |
114 |
nginx_modules_http_slowfs_cache? ( ${HTTP_SLOWFS_CACHE_MODULE_URI} )" |
115 |
|
116 |
LICENSE="as-is BSD BSD-2 GPL-2 MIT" |
117 |
SLOT="0" |
118 |
KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd" |
119 |
|
120 |
NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif fastcgi |
121 |
geo gzip limit_req limit_zone map memcached proxy referer rewrite scgi ssi |
122 |
split_clients upstream_ip_hash userid uwsgi" |
123 |
NGINX_MODULES_OPT="addition dav degradation flv geoip gzip_static image_filter |
124 |
mp4 perl random_index realip secure_link stub_status sub xslt" |
125 |
NGINX_MODULES_MAIL="imap pop3 smtp" |
126 |
NGINX_MODULES_3RD=" |
127 |
http_upload_progress |
128 |
http_headers_more |
129 |
http_passenger |
130 |
http_push |
131 |
http_cache_purge |
132 |
http_upload |
133 |
http_slowfs_cache" |
134 |
|
135 |
IUSE="aio debug +http +http-cache ipv6 libatomic +pcre ssl vim-syntax" |
136 |
|
137 |
for mod in $NGINX_MODULES_STD; do |
138 |
IUSE="${IUSE} +nginx_modules_http_${mod}" |
139 |
done |
140 |
|
141 |
for mod in $NGINX_MODULES_OPT; do |
142 |
IUSE="${IUSE} nginx_modules_http_${mod}" |
143 |
done |
144 |
|
145 |
for mod in $NGINX_MODULES_MAIL; do |
146 |
IUSE="${IUSE} nginx_modules_mail_${mod}" |
147 |
done |
148 |
|
149 |
for mod in $NGINX_MODULES_3RD; do |
150 |
IUSE="${IUSE} nginx_modules_${mod}" |
151 |
done |
152 |
|
153 |
CDEPEND=" |
154 |
pcre? ( >=dev-libs/libpcre-4.2 ) |
155 |
ssl? ( dev-libs/openssl ) |
156 |
http-cache? ( userland_GNU? ( dev-libs/openssl ) ) |
157 |
nginx_modules_http_geo? ( dev-libs/geoip ) |
158 |
nginx_modules_http_gzip? ( sys-libs/zlib ) |
159 |
nginx_modules_http_gzip_static? ( sys-libs/zlib ) |
160 |
nginx_modules_http_image_filter? ( media-libs/gd[jpeg,png] ) |
161 |
nginx_modules_http_perl? ( >=dev-lang/perl-5.8 ) |
162 |
nginx_modules_http_rewrite? ( >=dev-libs/libpcre-4.2 ) |
163 |
nginx_modules_http_secure_link? ( userland_GNU? ( dev-libs/openssl ) ) |
164 |
nginx_modules_http_xslt? ( dev-libs/libxml2 dev-libs/libxslt )" |
165 |
RDEPEND="${CDEPEND}" |
166 |
DEPEND="${CDEPEND} |
167 |
arm? ( dev-libs/libatomic_ops ) |
168 |
libatomic? ( dev-libs/libatomic_ops )" |
169 |
PDEPEND="vim-syntax? ( app-vim/nginx-syntax )" |
170 |
|
171 |
pkg_setup() { |
172 |
if use nginx_modules_http_passenger; then |
173 |
einfo |
174 |
einfo "Passenger support has been removed from the nginx ebuild to" |
175 |
einfo "get rid of file collisions, its broken build system and" |
176 |
einfo "incompatibilities between passenger 2 and 3." |
177 |
einfo |
178 |
einfo "Please switch to passenger-3 standalone or use the" |
179 |
einfo "unicorn gem which provides a sane nginx-like architecture" |
180 |
einfo "out of the box." |
181 |
einfo |
182 |
einfo "For more information on sane ruby deployments with" |
183 |
einfo "passenger-3/unicorn go to:" |
184 |
einfo |
185 |
einfo "https://rvm.beginrescueend.com" |
186 |
einfo |
187 |
die "nginx_modules_http_passenger still in IUSE" |
188 |
fi |
189 |
|
190 |
ebegin "Creating nginx user and group" |
191 |
enewgroup ${PN} |
192 |
enewuser ${PN} -1 -1 -1 ${PN} |
193 |
eend $? |
194 |
|
195 |
if use libatomic; then |
196 |
ewarn "GCC 4.1+ features built-in atomic operations." |
197 |
ewarn "Using libatomic_ops is only needed if using" |
198 |
ewarn "a different compiler or a GCC prior to 4.1" |
199 |
fi |
200 |
|
201 |
if [[ -n $NGINX_ADD_MODULES ]]; then |
202 |
ewarn "You are building custom modules via \$NGINX_ADD_MODULES!" |
203 |
ewarn "This nginx installation is not supported!" |
204 |
ewarn "Make sure you can reproduce the bug without those modules" |
205 |
ewarn "_before_ reporting bugs." |
206 |
fi |
207 |
|
208 |
if use !http; then |
209 |
ewarn "To actually disable all http-functionality you also have to disable" |
210 |
ewarn "all nginx http modules." |
211 |
fi |
212 |
} |
213 |
|
214 |
src_prepare() { |
215 |
sed -i 's/ make/ \\$(MAKE)/' "${S}"/auto/lib/perl/make |
216 |
} |
217 |
|
218 |
src_configure() { |
219 |
local myconf= http_enabled= mail_enabled= |
220 |
|
221 |
use aio && myconf+=" --with-file-aio --with-aio_module" |
222 |
use debug && myconf+=" --with-debug" |
223 |
use ipv6 && myconf+=" --with-ipv6" |
224 |
use libatomic && myconf+=" --with-libatomic" |
225 |
use pcre && myconf+=" --with-pcre" |
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.init-r2 nginx |
343 |
|
344 |
cp "${FILESDIR}"/nginx.conf-r4 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 |
} |
393 |
|
394 |
|
395 |
|
396 |
1.1 www-servers/nginx/nginx-1.1.13.ebuild |
397 |
|
398 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/nginx-1.1.13.ebuild?rev=1.1&view=markup |
399 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/nginx-1.1.13.ebuild?rev=1.1&content-type=text/plain |
400 |
|
401 |
Index: nginx-1.1.13.ebuild |
402 |
=================================================================== |
403 |
# Copyright 1999-2012 Gentoo Foundation |
404 |
# Distributed under the terms of the GNU General Public License v2 |
405 |
# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/nginx-1.1.13.ebuild,v 1.1 2012/01/29 13:11:49 hollow Exp $ |
406 |
|
407 |
EAPI="4" |
408 |
|
409 |
# Maintainer notes: |
410 |
# - http_rewrite-independent pcre-support makes sense for matching locations without an actual rewrite |
411 |
# - any http-module activates the main http-functionality and overrides USE=-http |
412 |
# - keep the following requirements in mind before adding external modules: |
413 |
# * alive upstream |
414 |
# * sane packaging |
415 |
# * builds cleanly |
416 |
# * does not need a patch for nginx core |
417 |
# - TODO: test the google-perftools module (included in vanilla tarball) |
418 |
|
419 |
# prevent perl-module from adding automagic perl DEPENDs |
420 |
GENTOO_DEPEND_ON_PERL="no" |
421 |
|
422 |
# http_uploadprogress (https://github.com/masterzen/nginx-upload-progress-module, BSD-2 license) |
423 |
HTTP_UPLOAD_PROGRESS_MODULE_PV="0.8.3" |
424 |
HTTP_UPLOAD_PROGRESS_MODULE_P="ngx_upload_progress-${HTTP_UPLOAD_PROGRESS_MODULE_PV}" |
425 |
HTTP_UPLOAD_PROGRESS_MODULE_SHA1="c7c663f" |
426 |
HTTP_UPLOAD_PROGRESS_MODULE_URI="http://github.com/masterzen/nginx-upload-progress-module/tarball/v${HTTP_UPLOAD_PROGRESS_MODULE_PV}" |
427 |
|
428 |
# http_headers_more (http://github.com/agentzh/headers-more-nginx-module, BSD license) |
429 |
HTTP_HEADERS_MORE_MODULE_PV="0.15" |
430 |
HTTP_HEADERS_MORE_MODULE_P="ngx_http_headers_more-${HTTP_HEADERS_MORE_MODULE_PV}" |
431 |
HTTP_HEADERS_MORE_MODULE_SHA1="137855d" |
432 |
HTTP_HEADERS_MORE_MODULE_URI="http://github.com/agentzh/headers-more-nginx-module/tarball/v${HTTP_HEADERS_MORE_MODULE_PV}" |
433 |
|
434 |
# http_push (http://pushmodule.slact.net/, MIT license) |
435 |
HTTP_PUSH_MODULE_PV="0.692" |
436 |
HTTP_PUSH_MODULE_P="nginx_http_push_module-${HTTP_PUSH_MODULE_PV}" |
437 |
HTTP_PUSH_MODULE_URI="http://pushmodule.slact.net/downloads/${HTTP_PUSH_MODULE_P}.tar.gz" |
438 |
|
439 |
# http_cache_purge (http://labs.frickle.com/nginx_ngx_cache_purge/, BSD-2 license) |
440 |
HTTP_CACHE_PURGE_MODULE_PV="1.5" |
441 |
HTTP_CACHE_PURGE_MODULE_P="ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}" |
442 |
HTTP_CACHE_PURGE_MODULE_URI="http://labs.frickle.com/files/${HTTP_CACHE_PURGE_MODULE_P}.tar.gz" |
443 |
|
444 |
# HTTP Upload module from Valery Kholodkov |
445 |
# (http://www.grid.net.ru/nginx/upload.en.html, BSD license) |
446 |
HTTP_UPLOAD_MODULE_PV="2.2.0" |
447 |
HTTP_UPLOAD_MODULE_P="nginx_upload_module-${HTTP_UPLOAD_MODULE_PV}" |
448 |
HTTP_UPLOAD_MODULE_URI="http://www.grid.net.ru/nginx/download/${HTTP_UPLOAD_MODULE_P}.tar.gz" |
449 |
|
450 |
# http_slowfs_cache (http://labs.frickle.com/nginx_ngx_slowfs_cache/, BSD-2 license) |
451 |
HTTP_SLOWFS_CACHE_MODULE_PV="1.6" |
452 |
HTTP_SLOWFS_CACHE_MODULE_P="ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}" |
453 |
HTTP_SLOWFS_CACHE_MODULE_URI="http://labs.frickle.com/files/${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz" |
454 |
|
455 |
inherit eutils ssl-cert toolchain-funcs perl-module flag-o-matic |
456 |
|
457 |
DESCRIPTION="Robust, small and high performance http and reverse proxy server" |
458 |
HOMEPAGE="http://nginx.org" |
459 |
SRC_URI="http://nginx.org/download/${P}.tar.gz |
460 |
nginx_modules_http_upload_progress? ( ${HTTP_UPLOAD_PROGRESS_MODULE_URI} -> ${HTTP_UPLOAD_PROGRESS_MODULE_P}.tar.gz ) |
461 |
nginx_modules_http_headers_more? ( ${HTTP_HEADERS_MORE_MODULE_URI} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz ) |
462 |
nginx_modules_http_push? ( ${HTTP_PUSH_MODULE_URI} ) |
463 |
nginx_modules_http_cache_purge? ( ${HTTP_CACHE_PURGE_MODULE_URI} ) |
464 |
nginx_modules_http_upload? ( ${HTTP_UPLOAD_MODULE_URI} ) |
465 |
nginx_modules_http_slowfs_cache? ( ${HTTP_SLOWFS_CACHE_MODULE_URI} )" |
466 |
|
467 |
LICENSE="as-is BSD BSD-2 GPL-2 MIT" |
468 |
SLOT="0" |
469 |
KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd" |
470 |
|
471 |
NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif fastcgi |
472 |
geo gzip limit_req limit_zone map memcached proxy referer rewrite scgi ssi |
473 |
split_clients upstream_ip_hash userid uwsgi" |
474 |
NGINX_MODULES_OPT="addition dav degradation flv geoip gzip_static image_filter |
475 |
mp4 perl random_index realip secure_link stub_status sub xslt" |
476 |
NGINX_MODULES_MAIL="imap pop3 smtp" |
477 |
NGINX_MODULES_3RD=" |
478 |
http_upload_progress |
479 |
http_headers_more |
480 |
http_passenger |
481 |
http_push |
482 |
http_cache_purge |
483 |
http_upload |
484 |
http_slowfs_cache" |
485 |
|
486 |
IUSE="aio debug +http +http-cache ipv6 libatomic +pcre pcre-jit ssl vim-syntax" |
487 |
|
488 |
for mod in $NGINX_MODULES_STD; do |
489 |
IUSE="${IUSE} +nginx_modules_http_${mod}" |
490 |
done |
491 |
|
492 |
for mod in $NGINX_MODULES_OPT; do |
493 |
IUSE="${IUSE} nginx_modules_http_${mod}" |
494 |
done |
495 |
|
496 |
for mod in $NGINX_MODULES_MAIL; do |
497 |
IUSE="${IUSE} nginx_modules_mail_${mod}" |
498 |
done |
499 |
|
500 |
for mod in $NGINX_MODULES_3RD; do |
501 |
IUSE="${IUSE} nginx_modules_${mod}" |
502 |
done |
503 |
|
504 |
CDEPEND=" |
505 |
pcre? ( >=dev-libs/libpcre-4.2 ) |
506 |
ssl? ( dev-libs/openssl ) |
507 |
http-cache? ( userland_GNU? ( dev-libs/openssl ) ) |
508 |
nginx_modules_http_geo? ( dev-libs/geoip ) |
509 |
nginx_modules_http_gzip? ( sys-libs/zlib ) |
510 |
nginx_modules_http_gzip_static? ( sys-libs/zlib ) |
511 |
nginx_modules_http_image_filter? ( media-libs/gd[jpeg,png] ) |
512 |
nginx_modules_http_perl? ( >=dev-lang/perl-5.8 ) |
513 |
nginx_modules_http_rewrite? ( >=dev-libs/libpcre-4.2 ) |
514 |
nginx_modules_http_secure_link? ( userland_GNU? ( dev-libs/openssl ) ) |
515 |
nginx_modules_http_xslt? ( dev-libs/libxml2 dev-libs/libxslt )" |
516 |
RDEPEND="${CDEPEND}" |
517 |
DEPEND="${CDEPEND} |
518 |
arm? ( dev-libs/libatomic_ops ) |
519 |
libatomic? ( dev-libs/libatomic_ops )" |
520 |
PDEPEND="vim-syntax? ( app-vim/nginx-syntax )" |
521 |
REQUIRED_USE="pcre-jit? ( pcre )" |
522 |
|
523 |
pkg_setup() { |
524 |
if use nginx_modules_http_passenger; then |
525 |
einfo |
526 |
einfo "Passenger support has been removed from the nginx ebuild to" |
527 |
einfo "get rid of file collisions, its broken build system and" |
528 |
einfo "incompatibilities between passenger 2 and 3." |
529 |
einfo |
530 |
einfo "Please switch to passenger-3 standalone or use the" |
531 |
einfo "unicorn gem which provides a sane nginx-like architecture" |
532 |
einfo "out of the box." |
533 |
einfo |
534 |
einfo "For more information on sane ruby deployments with" |
535 |
einfo "passenger-3/unicorn go to:" |
536 |
einfo |
537 |
einfo "https://rvm.beginrescueend.com" |
538 |
einfo |
539 |
die "nginx_modules_http_passenger still in IUSE" |
540 |
fi |
541 |
|
542 |
ebegin "Creating nginx user and group" |
543 |
enewgroup ${PN} |
544 |
enewuser ${PN} -1 -1 -1 ${PN} |
545 |
eend $? |
546 |
|
547 |
if use libatomic; then |
548 |
ewarn "GCC 4.1+ features built-in atomic operations." |
549 |
ewarn "Using libatomic_ops is only needed if using" |
550 |
ewarn "a different compiler or a GCC prior to 4.1" |
551 |
fi |
552 |
|
553 |
if [[ -n $NGINX_ADD_MODULES ]]; then |
554 |
ewarn "You are building custom modules via \$NGINX_ADD_MODULES!" |
555 |
ewarn "This nginx installation is not supported!" |
556 |
ewarn "Make sure you can reproduce the bug without those modules" |
557 |
ewarn "_before_ reporting bugs." |
558 |
fi |
559 |
|
560 |
if use !http; then |
561 |
ewarn "To actually disable all http-functionality you also have to disable" |
562 |
ewarn "all nginx http modules." |
563 |
fi |
564 |
} |
565 |
|
566 |
src_prepare() { |
567 |
sed -i 's/ make/ \\$(MAKE)/' "${S}"/auto/lib/perl/make |
568 |
} |
569 |
|
570 |
src_configure() { |
571 |
local myconf= http_enabled= mail_enabled= |
572 |
|
573 |
use aio && myconf+=" --with-file-aio --with-aio_module" |
574 |
use debug && myconf+=" --with-debug" |
575 |
use ipv6 && myconf+=" --with-ipv6" |
576 |
use libatomic && myconf+=" --with-libatomic" |
577 |
use pcre && myconf+=" --with-pcre" |
578 |
use pcre-jit && myconf+=" --with-pcre-jit" |
579 |
|
580 |
# HTTP modules |
581 |
for mod in $NGINX_MODULES_STD; do |
582 |
if use nginx_modules_http_${mod}; then |
583 |
http_enabled=1 |
584 |
else |
585 |
myconf+=" --without-http_${mod}_module" |
586 |
fi |
587 |
done |
588 |
|
589 |
for mod in $NGINX_MODULES_OPT; do |
590 |
if use nginx_modules_http_${mod}; then |
591 |
http_enabled=1 |
592 |
myconf+=" --with-http_${mod}_module" |
593 |
fi |
594 |
done |
595 |
|
596 |
if use nginx_modules_http_fastcgi; then |
597 |
myconf+=" --with-http_realip_module" |
598 |
fi |
599 |
|
600 |
# third-party modules |
601 |
if use nginx_modules_http_upload_progress; then |
602 |
http_enabled=1 |
603 |
myconf+=" --add-module=${WORKDIR}/masterzen-nginx-upload-progress-module-${HTTP_UPLOAD_PROGRESS_MODULE_SHA1}" |
604 |
fi |
605 |
|
606 |
if use nginx_modules_http_headers_more; then |
607 |
http_enabled=1 |
608 |
myconf+=" --add-module=${WORKDIR}/agentzh-headers-more-nginx-module-${HTTP_HEADERS_MORE_MODULE_SHA1}" |
609 |
fi |
610 |
|
611 |
if use nginx_modules_http_push; then |
612 |
http_enabled=1 |
613 |
myconf+=" --add-module=${WORKDIR}/${HTTP_PUSH_MODULE_P}" |
614 |
fi |
615 |
|
616 |
if use nginx_modules_http_cache_purge; then |
617 |
http_enabled=1 |
618 |
myconf+=" --add-module=${WORKDIR}/${HTTP_CACHE_PURGE_MODULE_P}" |
619 |
fi |
620 |
|
621 |
if use nginx_modules_http_upload; then |
622 |
http_enabled=1 |
623 |
myconf+=" --add-module=${WORKDIR}/${HTTP_UPLOAD_MODULE_P}" |
624 |
fi |
625 |
|
626 |
if use nginx_modules_http_slowfs_cache; then |
627 |
http_enabled=1 |
628 |
myconf+=" --add-module=${WORKDIR}/${HTTP_SLOWFS_CACHE_MODULE_P}" |
629 |
fi |
630 |
|
631 |
if use http || use http-cache; then |
632 |
http_enabled=1 |
633 |
fi |
634 |
|
635 |
if [ $http_enabled ]; then |
636 |
use http-cache || myconf+=" --without-http-cache" |
637 |
use ssl && myconf+=" --with-http_ssl_module" |
638 |
else |
639 |
myconf+=" --without-http --without-http-cache" |
640 |
fi |
641 |
|
642 |
# MAIL modules |
643 |
for mod in $NGINX_MODULES_MAIL; do |
644 |
if use nginx_modules_mail_${mod}; then |
645 |
mail_enabled=1 |
646 |
else |
647 |
myconf+=" --without-mail_${mod}_module" |
648 |
fi |
649 |
done |
650 |
|
651 |
if [ $mail_enabled ]; then |
652 |
myconf+=" --with-mail" |
653 |
use ssl && myconf+=" --with-mail_ssl_module" |
654 |
fi |
655 |
|
656 |
# custom modules |
657 |
for mod in $NGINX_ADD_MODULES; do |
658 |
myconf+=" --add-module=${mod}" |
659 |
done |
660 |
|
661 |
# https://bugs.gentoo.org/286772 |
662 |
export LANG=C LC_ALL=C |
663 |
tc-export CC |
664 |
|
665 |
./configure \ |
666 |
--prefix=/usr \ |
667 |
--sbin-path=/usr/sbin/nginx \ |
668 |
--conf-path=/etc/${PN}/${PN}.conf \ |
669 |
--error-log-path=/var/log/${PN}/error_log \ |
670 |
--pid-path=/var/run/${PN}.pid \ |
671 |
--lock-path=/var/lock/nginx.lock \ |
672 |
--user=${PN} --group=${PN} \ |
673 |
--with-cc-opt="-I${ROOT}usr/include" \ |
674 |
--with-ld-opt="-L${ROOT}usr/lib" \ |
675 |
--http-log-path=/var/log/${PN}/access_log \ |
676 |
--http-client-body-temp-path=/var/tmp/${PN}/client \ |
677 |
--http-proxy-temp-path=/var/tmp/${PN}/proxy \ |
678 |
--http-fastcgi-temp-path=/var/tmp/${PN}/fastcgi \ |
679 |
--http-scgi-temp-path=/var/tmp/${PN}/scgi \ |
680 |
--http-uwsgi-temp-path=/var/tmp/${PN}/uwsgi \ |
681 |
${myconf} || die "configure failed" |
682 |
} |
683 |
|
684 |
src_compile() { |
685 |
# https://bugs.gentoo.org/286772 |
686 |
export LANG=C LC_ALL=C |
687 |
emake LINK="${CC} ${LDFLAGS}" OTHERLDFLAGS="${LDFLAGS}" || die "emake failed" |
688 |
} |
689 |
|
690 |
src_install() { |
691 |
keepdir /var/log/${PN} /var/tmp/${PN}/{client,proxy,fastcgi,scgi,uwsgi} |
692 |
keepdir /var/www/localhost/htdocs |
693 |
|
694 |
dosbin objs/nginx |
695 |
newinitd "${FILESDIR}"/nginx.init-r2 nginx |
696 |
|
697 |
cp "${FILESDIR}"/nginx.conf-r4 conf/nginx.conf |
698 |
rm conf/win-utf conf/koi-win conf/koi-utf |
699 |
|
700 |
dodir /etc/${PN} |
701 |
insinto /etc/${PN} |
702 |
doins conf/* |
703 |
|
704 |
doman man/nginx.8 |
705 |
dodoc CHANGES* README |
706 |
|
707 |
# logrotate |
708 |
insinto /etc/logrotate.d |
709 |
newins "${FILESDIR}"/nginx.logrotate nginx |
710 |
|
711 |
if use nginx_modules_http_perl; then |
712 |
cd "${S}"/objs/src/http/modules/perl/ |
713 |
einstall DESTDIR="${D}" INSTALLDIRS=vendor || die "failed to install perl stuff" |
714 |
fixlocalpod |
715 |
fi |
716 |
|
717 |
if use nginx_modules_http_push; then |
718 |
docinto ${HTTP_PUSH_MODULE_P} |
719 |
dodoc "${WORKDIR}"/${HTTP_PUSH_MODULE_P}/{changelog.txt,protocol.txt,README} |
720 |
fi |
721 |
|
722 |
if use nginx_modules_http_cache_purge; then |
723 |
docinto ${HTTP_CACHE_PURGE_MODULE_P} |
724 |
dodoc "${WORKDIR}"/${HTTP_CACHE_PURGE_MODULE_P}/{CHANGES,README.md,TODO.md} |
725 |
fi |
726 |
|
727 |
if use nginx_modules_http_upload; then |
728 |
docinto ${HTTP_UPLOAD_MODULE_P} |
729 |
dodoc "${WORKDIR}"/${HTTP_UPLOAD_MODULE_P}/{Changelog,README} |
730 |
fi |
731 |
|
732 |
if use nginx_modules_http_slowfs_cache; then |
733 |
docinto ${HTTP_SLOWFS_CACHE_MODULE_P} |
734 |
dodoc "${WORKDIR}"/${HTTP_SLOWFS_CACHE_MODULE_P}/{CHANGES,README} |
735 |
fi |
736 |
} |
737 |
|
738 |
pkg_postinst() { |
739 |
if use ssl; then |
740 |
if [ ! -f "${ROOT}"/etc/ssl/${PN}/${PN}.key ]; then |
741 |
install_cert /etc/ssl/${PN}/${PN} |
742 |
chown ${PN}:${PN} "${ROOT}"/etc/ssl/${PN}/${PN}.{crt,csr,key,pem} |
743 |
fi |
744 |
fi |
745 |
} |