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