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: ChangeLog nginx-0.8.53.ebuild
Date: Sun, 28 Nov 2010 21:21:46
Message-Id: 20101128212135.497CF20051@flycatcher.gentoo.org
1 hollow 10/11/28 21:21:35
2
3 Modified: ChangeLog
4 Added: nginx-0.8.53.ebuild
5 Log:
6 version bump wrt #342979
7
8 (Portage version: 2.2.0_alpha4/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.270 www-servers/nginx/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/ChangeLog?rev=1.270&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/ChangeLog?rev=1.270&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/ChangeLog?r1=1.269&r2=1.270
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-servers/nginx/ChangeLog,v
20 retrieving revision 1.269
21 retrieving revision 1.270
22 diff -u -r1.269 -r1.270
23 --- ChangeLog 30 Sep 2010 12:43:03 -0000 1.269
24 +++ ChangeLog 28 Nov 2010 21:21:35 -0000 1.270
25 @@ -1,6 +1,11 @@
26 # ChangeLog for www-servers/nginx
27 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/ChangeLog,v 1.269 2010/09/30 12:43:03 dev-zero Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/ChangeLog,v 1.270 2010/11/28 21:21:35 hollow Exp $
30 +
31 +*nginx-0.8.53 (28 Nov 2010)
32 +
33 + 28 Nov 2010; Benedikt Böhm <hollow@g.o> +nginx-0.8.53.ebuild:
34 + version bump wrt #342979
35
36 *nginx-0.8.52 (30 Sep 2010)
37
38
39
40
41 1.1 www-servers/nginx/nginx-0.8.53.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/nginx-0.8.53.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/nginx/nginx-0.8.53.ebuild?rev=1.1&content-type=text/plain
45
46 Index: nginx-0.8.53.ebuild
47 ===================================================================
48 # Copyright 1999-2010 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/nginx-0.8.53.ebuild,v 1.1 2010/11/28 21:21:35 hollow Exp $
51
52 EAPI="2"
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 3 requirements in mind before adding external modules:
58 # * alive upstream
59 # * sane packaging
60 # * builds cleanly
61 # - TODO: test the google-perftools module (included in vanilla tarball)
62
63 # prevent perl-module from adding automagic perl DEPENDs
64 GENTOO_DEPEND_ON_PERL="no"
65
66 # http_headers_more (http://github.com/agentzh/headers-more-nginx-module, BSD license)
67 HTTP_HEADERS_MORE_MODULE_PV="0.13"
68 HTTP_HEADERS_MORE_MODULE_P="ngx-http-headers-more-${HTTP_HEADERS_MORE_MODULE_PV}"
69 HTTP_HEADERS_MORE_MODULE_SHA1="9508330"
70
71 # http_passenger (http://www.modrails.com/, MIT license)
72 # TODO: currently builds some stuff in src_configure
73 PASSENGER_PV="2.2.15"
74 USE_RUBY="ruby18"
75 RUBY_OPTIONAL="yes"
76
77 # http_push (http://pushmodule.slact.net/, MIT license)
78 HTTP_PUSH_MODULE_P="nginx_http_push_module-0.692"
79
80 # http_cache_purge (http://labs.frickle.com/nginx_ngx_cache_purge/, BSD-2 license)
81 HTTP_CACHE_PURGE_MODULE_P="ngx_cache_purge-1.2"
82
83 inherit eutils ssl-cert toolchain-funcs perl-module ruby-ng flag-o-matic
84
85 DESCRIPTION="Robust, small and high performance http and reverse proxy server"
86 HOMEPAGE="http://nginx.net/
87 http://www.modrails.com/
88 http://pushmodule.slact.net/
89 http://labs.frickle.com/nginx_ngx_cache_purge/"
90 SRC_URI="http://sysoev.ru/nginx/${P}.tar.gz
91 nginx_modules_http_headers_more? ( http://github.com/agentzh/headers-more-nginx-module/tarball/v${HTTP_HEADERS_MORE_MODULE_PV} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz )
92 nginx_modules_http_passenger? ( mirror://rubyforge/passenger/passenger-${PASSENGER_PV}.tar.gz )
93 nginx_modules_http_push? ( http://pushmodule.slact.net/downloads/${HTTP_PUSH_MODULE_P}.tar.gz )
94 nginx_modules_http_cache_purge? ( http://labs.frickle.com/files/${HTTP_CACHE_PURGE_MODULE_P}.tar.gz )"
95
96 LICENSE="BSD BSD-2 GPL-2 MIT"
97 SLOT="0"
98 KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
99
100 NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif fastcgi
101 geo gzip limit_req limit_zone map memcached proxy referer rewrite scgi ssi
102 split_clients upstream_ip_hash userid uwsgi"
103 NGINX_MODULES_OPT="addition dav degradation flv geoip gzip_static image_filter
104 perl random_index realip secure_link stub_status sub xslt"
105 NGINX_MODULES_MAIL="imap pop3 smtp"
106 NGINX_MODULES_3RD="http_cache_purge http_headers_more http_passenger http_push"
107
108 IUSE="aio debug +http +http-cache ipv6 libatomic +pcre ssl vim-syntax"
109
110 for mod in $NGINX_MODULES_STD; do
111 IUSE="${IUSE} +nginx_modules_http_${mod}"
112 done
113
114 for mod in $NGINX_MODULES_OPT; do
115 IUSE="${IUSE} nginx_modules_http_${mod}"
116 done
117
118 for mod in $NGINX_MODULES_MAIL; do
119 IUSE="${IUSE} nginx_modules_mail_${mod}"
120 done
121
122 for mod in $NGINX_MODULES_3RD; do
123 IUSE="${IUSE} nginx_modules_${mod}"
124 done
125
126 CDEPEND="
127 pcre? ( >=dev-libs/libpcre-4.2 )
128 ssl? ( dev-libs/openssl )
129 http-cache? ( userland_GNU? ( dev-libs/openssl ) )
130 nginx_modules_http_geo? ( dev-libs/geoip )
131 nginx_modules_http_gzip? ( sys-libs/zlib )
132 nginx_modules_http_gzip_static? ( sys-libs/zlib )
133 nginx_modules_http_image_filter? ( media-libs/gd )
134 nginx_modules_http_perl? ( >=dev-lang/perl-5.8 )
135 nginx_modules_http_rewrite? ( >=dev-libs/libpcre-4.2 )
136 nginx_modules_http_secure_link? ( userland_GNU? ( dev-libs/openssl ) )
137 nginx_modules_http_xslt? ( dev-libs/libxml2 dev-libs/libxslt )
138 nginx_modules_http_passenger? (
139 $(ruby_implementation_depend ruby18)
140 >=dev-ruby/rubygems-0.9.0
141 >=dev-ruby/rake-0.8.1
142 >=dev-ruby/fastthread-1.0.1
143 >=dev-ruby/rack-1.0.0
144 )"
145 RDEPEND="${CDEPEND}"
146 DEPEND="${CDEPEND}
147 arm? ( dev-libs/libatomic_ops )
148 libatomic? ( dev-libs/libatomic_ops )"
149 PDEPEND="vim-syntax? ( app-vim/nginx-syntax )"
150
151 pkg_setup() {
152 ebegin "Creating nginx user and group"
153 enewgroup ${PN}
154 enewuser ${PN} -1 -1 -1 ${PN}
155 eend ${?}
156
157 if use ipv6; then
158 ewarn "Note that ipv6 support in nginx is still experimental."
159 ewarn "Be sure to read comments on gentoo bug #274614"
160 ewarn "http://bugs.gentoo.org/show_bug.cgi?id=274614"
161 fi
162
163 if use libatomic; then
164 ewarn "GCC 4.1+ features built-in atomic operations."
165 ewarn "Using libatomic_ops is only needed if using"
166 ewarn "a different compiler or a GCC prior to 4.1"
167 fi
168
169 if [[ -n $NGINX_ADD_MODULES ]]; then
170 ewarn "You are building custom modules via \$NGINX_ADD_MODULES!"
171 ewarn "This nginx installation is not supported!"
172 ewarn "Make sure you can reproduce the bug without those modules"
173 ewarn "_before_ reporting bugs."
174 fi
175
176 if use nginx_modules_http_passenger; then
177 ruby-ng_pkg_setup
178 use debug && append-flags -DPASSENGER_DEBUG
179 fi
180
181 if use !http; then
182 ewarn "To actually disable all http-functionality you also have to disable"
183 ewarn "all nginx http modules."
184 fi
185 }
186
187 src_unpack() {
188 # prevent ruby-ng.eclass from messing with src_unpack
189 default
190 }
191
192 src_prepare() {
193 sed -i 's/ make/ \\$(MAKE)/' "${S}"/auto/lib/perl/make
194
195 if use nginx_modules_http_passenger; then
196 cd "${WORKDIR}"/passenger-${PASSENGER_PV}
197 epatch "${FILESDIR}"/passenger-CFLAGS.patch
198 fi
199 }
200
201 src_configure() {
202 local myconf= http_enabled= mail_enabled=
203
204 use aio && myconf="${myconf} --with-file-aio --with-aio_module"
205 use debug && myconf="${myconf} --with-debug"
206 use ipv6 && myconf="${myconf} --with-ipv6"
207 use libatomic && myconf="${myconf} --with-libatomic"
208 use pcre && myconf="${myconf} --with-pcre"
209
210 # HTTP modules
211 for mod in $NGINX_MODULES_STD; do
212 if use nginx_modules_http_${mod}; then
213 http_enabled=1
214 else
215 myconf="${myconf} --without-http_${mod}_module"
216 fi
217 done
218
219 for mod in $NGINX_MODULES_OPT; do
220 if use nginx_modules_http_${mod}; then
221 http_enabled=1
222 myconf="${myconf} --with-http_${mod}_module"
223 fi
224 done
225
226 if use nginx_modules_http_fastcgi; then
227 myconf="${myconf} --with-http_realip_module"
228 fi
229
230 # third-party modules
231 if use nginx_modules_http_headers_more; then
232 http_enabled=1
233 myconf="${myconf} --add-module=${WORKDIR}/agentzh-headers-more-nginx-module-${HTTP_HEADERS_MORE_MODULE_SHA1}"
234 fi
235
236 if use nginx_modules_http_passenger; then
237 http_enabled=1
238 myconf="${myconf} --add-module=${WORKDIR}/passenger-${PASSENGER_PV}/ext/nginx"
239 fi
240
241 if use nginx_modules_http_push; then
242 http_enabled=1
243 myconf="${myconf} --add-module=${WORKDIR}/${HTTP_PUSH_MODULE_P}"
244 fi
245
246 if use nginx_modules_http_cache_purge; then
247 http_enabled=1
248 myconf="${myconf} --add-module=${WORKDIR}/${HTTP_CACHE_PURGE_MODULE_P}"
249 fi
250
251 if use http || use http-cache; then
252 http_enabled=1
253 fi
254
255 if [ $http_enabled ]; then
256 use http-cache || myconf="${myconf} --without-http-cache"
257 use ssl && myconf="${myconf} --with-http_ssl_module"
258 else
259 myconf="${myconf} --without-http --without-http-cache"
260 fi
261
262 # MAIL modules
263 for mod in $NGINX_MODULES_MAIL; do
264 if use nginx_modules_mail_${mod}; then
265 mail_enabled=1
266 else
267 myconf="${myconf} --without-mail_${mod}_module"
268 fi
269 done
270
271 if [ $mail_enabled ]; then
272 myconf="${myconf} --with-mail"
273 use ssl && myconf="${myconf} --with-mail_ssl_module"
274 fi
275
276 # custom modules
277 for mod in $NGINX_ADD_MODULES; do
278 myconf="${myconf} --add-module=${mod}"
279 done
280
281 # http://bugs.gentoo.org/show_bug.cgi?id=286772
282 export LANG=C LC_ALL=C
283 tc-export CC
284
285 ./configure \
286 --prefix=/usr \
287 --sbin-path=/usr/sbin/nginx \
288 --conf-path=/etc/${PN}/${PN}.conf \
289 --error-log-path=/var/log/${PN}/error_log \
290 --pid-path=/var/run/${PN}.pid \
291 --lock-path=/var/lock/nginx.lock \
292 --user=${PN} --group=${PN} \
293 --with-cc-opt="-I${ROOT}usr/include" \
294 --with-ld-opt="-L${ROOT}usr/lib" \
295 --http-log-path=/var/log/${PN}/access_log \
296 --http-client-body-temp-path=/var/tmp/${PN}/client \
297 --http-proxy-temp-path=/var/tmp/${PN}/proxy \
298 --http-fastcgi-temp-path=/var/tmp/${PN}/fastcgi \
299 --http-scgi-temp-path=/var/tmp/${PN}/scgi \
300 --http-uwsgi-temp-path=/var/tmp/${PN}/uwsgi \
301 ${myconf} || die "configure failed"
302 }
303
304 src_compile() {
305 # http://bugs.gentoo.org/show_bug.cgi?id=286772
306 export LANG=C LC_ALL=C
307 emake LINK="${CC} ${LDFLAGS}" OTHERLDFLAGS="${LDFLAGS}" || die "emake failed"
308 }
309
310 src_install() {
311 keepdir /var/log/${PN} /var/tmp/${PN}/{client,proxy,fastcgi,scgi,uwsgi}
312
313 dosbin objs/nginx
314 newinitd "${FILESDIR}"/nginx.init-r2 nginx
315
316 cp "${FILESDIR}"/nginx.conf-r4 conf/nginx.conf
317 rm conf/win-utf conf/koi-win conf/koi-utf
318
319 dodir /etc/${PN}
320 insinto /etc/${PN}
321 doins conf/*
322
323 dodoc CHANGES* README
324
325 # logrotate
326 insinto /etc/logrotate.d
327 newins "${FILESDIR}"/nginx.logrotate nginx
328
329 if use nginx_modules_http_perl; then
330 cd "${S}"/objs/src/http/modules/perl/
331 einstall DESTDIR="${D}" INSTALLDIRS=vendor || die "failed to install perl stuff"
332 fixlocalpod
333 fi
334
335 if use nginx_modules_http_push; then
336 docinto ${HTTP_PUSH_MODULE_P}
337 dodoc "${WORKDIR}"/${HTTP_PUSH_MODULE_P}/{changelog.txt,protocol.txt,README}
338 fi
339
340 if use nginx_modules_http_cache_purge; then
341 docinto ${HTTP_CACHE_PURGE_MODULE_P}
342 dodoc "${WORKDIR}"/${HTTP_CACHE_PURGE_MODULE_P}/{CHANGES,README}
343 fi
344
345 if use nginx_modules_http_passenger; then
346 # passengers Rakefile is so horribly broken that we have to do it
347 # manually
348 cd "${WORKDIR}"/passenger-${PASSENGER_PV}
349
350 export RUBY="ruby18"
351
352 insinto $(${RUBY} -rrbconfig -e 'print Config::CONFIG["archdir"]')/phusion_passenger
353 insopts -m 0755
354 doins ext/phusion_passenger/*.so
355 doruby -r lib/phusion_passenger
356
357 exeinto /usr/bin
358 doexe bin/passenger-memory-stats bin/passenger-status
359
360 exeinto /usr/libexec/passenger/bin
361 doexe bin/passenger-spawn-server
362
363 exeinto /usr/libexec/passenger/ext/nginx
364 doexe ext/nginx/HelperServer
365 fi
366 }
367
368 pkg_postinst() {
369 if use ssl; then
370 if [ ! -f "${ROOT}"/etc/ssl/${PN}/${PN}.key ]; then
371 install_cert /etc/ssl/${PN}/${PN}
372 chown ${PN}:${PN} "${ROOT}"/etc/ssl/${PN}/${PN}.{crt,csr,key,pem}
373 fi
374 fi
375 }