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