source: projects/specs/trunk/n/nginx/nginx-vl.spec @ 3146

Revision 3146, 14.4 KB checked in by daisuke, 13 years ago (diff)

nginx: rebuild with perl-5.12.3

Line 
1%define nginx_user      nginx
2%define nginx_group     %{nginx_user}
3%define nginx_home      %{_localstatedir}/lib/nginx
4%define nginx_home_tmp  %{nginx_home}/tmp
5%define nginx_home_cache %{nginx_home}/cache
6%define nginx_logdir    %{_localstatedir}/log/nginx
7%define nginx_confdir   %{_sysconfdir}/nginx
8%define nginx_datadir   %{_datadir}/nginx
9%define nginx_webroot   %{nginx_datadir}/html
10
11Summary:        Robust, small and high performance http and reverse proxy server
12Summary(ja):    堅牢・軽量・高性能な HTTP およびリバースプロキシサーバ
13Name:           nginx
14Version:        0.8.54
15Release:        2%{?_dist_release}
16
17Group:          System Environment/Daemons   
18# BSD License (two clause)
19# http://www.freebsd.org/copyright/freebsd-license.html
20License:        BSD
21URL:            http://nginx.net/
22
23Source0:    http://sysoev.ru/nginx/nginx-%{version}.tar.gz
24Source1:    %{name}.init
25Source2:    %{name}.logrotate
26Source3:    nginx-virtual.conf.template
27Source4:    nginx-ssl.conf
28Source5:    %{name}.sysconfig
29Source10:   nginx-vine.conf
30Source11:   nginx-default-vine
31Source20:   proxy_cache.conf
32Source100:  nginx-index.html
33Source101:  poweredby-vine.png
34Source102:  nginx-logo.png
35Source103:  nginx-50x.html
36Source104:  nginx-404.html
37%define ngx_fancyindex_version 0.3
38Source1000: ngx-fancyindex-%{ngx_fancyindex_version}.tar.gz
39%define nginx_accept_language_module_version 02262ce
40Source1010: giom-nginx_accept_language_module-%{nginx_accept_language_module_version}.tar.gz
41
42# removes -Werror in upstream build scripts.  -Werror conflicts with
43# -D_FORTIFY_SOURCE=2 causing warnings to turn into errors.
44Patch0:     nginx-auto-cc-gcc.patch
45# configuration patch to match all the Vine Linux paths for logs, pid files
46# etc.
47Patch1:     nginx-conf.patch
48
49BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
50
51BuildRequires:      pcre-devel
52BuildRequires:      zlib-devel
53BuildRequires:      openssl-devel
54BuildRequires:      gd-devel
55BuildRequires:      perl
56BuildRequires:      perl(ExtUtils::Embed)
57BuildRequires:      libxml2-devel
58BuildRequires:      libxslt-devel
59
60%if "%{?_dist_release}" == "vl4"
61Requires:           perl >= 5.8.6
62%else
63Requires:           perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
64%endif
65# for /usr/sbin/useradd
66Requires(pre):      shadow-utils
67Requires(post):     chkconfig
68# for /sbin/service
69Requires(preun):    chkconfig, initscripts
70Requires(postun):   initscripts
71
72Vendor: Project Vine
73Distribution: Vine Linux
74Packager: daisuke
75
76%description
77Nginx [engine x] is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3
78proxy server written by Igor Sysoev.
79
80%description -l ja
81Nginx [engine x/エンジンX] は Igor Sysoev により開発された以下の機能をもつ
82堅牢・軽量・高性能なHTTPサーバかつリバースプロキシサーバです。
83 - HTTP(S) サーバ
84 - HTTP(S) リバースプロキシサーバ
85 - IMAP/POP3 プロキシサーバ
86
87%prep
88%setup -q -a 1000 -a 1010
89
90%patch0 -p0
91%patch1 -p1
92
93%build
94# nginx does not utilize a standard configure script.  It has its own
95# and the standard configure options cause the nginx configure script
96# to error out.  This is is also the reason for the DESTDIR environment
97# variable.  The configure script(s) have been patched (Patch1 and
98# Patch2) in order to support installing into a build environment.
99export DESTDIR=%{buildroot}
100./configure \
101    --user=%{nginx_user} \
102    --group=%{nginx_group} \
103    --prefix=%{nginx_datadir} \
104    --sbin-path=%{_sbindir}/%{name} \
105    --conf-path=%{nginx_confdir}/%{name}.conf \
106    --error-log-path=%{nginx_logdir}/error.log \
107    --http-log-path=%{nginx_logdir}/access.log \
108    --http-client-body-temp-path=%{nginx_home_tmp}/client_body \
109    --http-proxy-temp-path=%{nginx_home_tmp}/proxy \
110    --http-fastcgi-temp-path=%{nginx_home_tmp}/fastcgi \
111    --pid-path=%{_localstatedir}/run/%{name}.pid \
112    --lock-path=%{_localstatedir}/lock/subsys/%{name} \
113    --with-file-aio \
114    --with-ipv6 \
115    --with-http_ssl_module \
116    --with-http_realip_module \
117    --with-http_addition_module \
118    --with-http_xslt_module \
119    --with-http_image_filter_module \
120    --with-http_sub_module \
121    --with-http_dav_module \
122    --with-http_flv_module \
123    --with-http_gzip_static_module \
124    --with-http_random_index_module \
125    --with-http_secure_link_module \
126    --with-http_stub_status_module \
127    --with-http_perl_module \
128    --with-mail \
129    --with-mail_ssl_module \
130    --add-module=ngx-fancyindex-%{ngx_fancyindex_version} \
131    --add-module=giom-nginx_accept_language_module-%{nginx_accept_language_module_version} \
132%ifarch i686
133    --with-cpu-opt=pentiumpro \
134    --with-zlib-asm=pentiumpro \
135    --with-md5-asm \
136    --with-sha1-asm \
137%endif
138    --with-cc-opt="-O6 %{optflags} $(pcre-config --cflags)"
139make %{?_smp_mflags}
140
141%install
142rm -rf %{buildroot}
143make install DESTDIR=%{buildroot} INSTALLDIRS=vendor
144find %{buildroot} -type f -name .packlist -exec rm -f {} \;
145find %{buildroot} -type f -name perllocal.pod -exec rm -f {} \;
146find %{buildroot} -type f -empty -exec rm -f {} \;
147find %{buildroot} -type f -exec chmod 0644 {} \;
148find %{buildroot} -type f -name '*.so' -exec chmod 0755 {} \;
149chmod 0755 %{buildroot}%{_sbindir}/nginx
150%{__install} -p -D -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name}
151%{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
152%{__install} -p -D -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
153%{__install} -p -d -m 0755 %{buildroot}%{nginx_confdir}/conf.d
154%{__install} -p -d -m 0755 %{buildroot}%{nginx_confdir}/sites.d
155%{__install} -p -m 0644 %{SOURCE3} %{buildroot}%{nginx_confdir}/sites.d/virtual.conf.template
156%{__install} -p -m 0644 %{SOURCE4} %{buildroot}%{nginx_confdir}/conf.d/ssl.conf
157%{__install} -p -m 0644 %{SOURCE10} %{buildroot}%{nginx_confdir}/nginx.conf
158%{__install} -p -m 0644 %{SOURCE10} %{buildroot}%{nginx_confdir}/nginx.conf.default
159%{__install} -p -m 0644 %{SOURCE11} %{buildroot}%{nginx_confdir}/sites.d/default
160%{__install} -p -m 0644 %{SOURCE20} %{buildroot}%{nginx_confdir}/conf.d/proxy_cache.conf
161%{__install} -p -d -m 0755 %{buildroot}%{nginx_home_cache}
162%{__install} -p -d -m 0755 %{buildroot}%{nginx_home_tmp}
163%{__install} -p -d -m 0755 %{buildroot}%{nginx_logdir}
164%{__install} -p -d -m 0755 %{buildroot}%{nginx_webroot}
165%{__install} -p -m 0644 %{SOURCE100} %{buildroot}%{nginx_webroot}/index.html
166%{__install} -p -m 0644 %{SOURCE101} %{buildroot}%{nginx_webroot}/poweredby.png
167%{__install} -p -m 0644 %{SOURCE102} %{buildroot}%{nginx_webroot}/nginx-logo.png
168%{__install} -p -m 0644 %{SOURCE103} %{buildroot}%{nginx_webroot}/50x.html
169%{__install} -p -m 0644 %{SOURCE104} %{buildroot}%{nginx_webroot}/404.html
170
171touch %{buildroot}%{nginx_confdir}/conf.d/virtual.conf
172
173# convert to UTF-8 all files that give warnings.
174for textfile in CHANGES
175do
176    mv $textfile $textfile.old
177    iconv --from-code ISO8859-1 --to-code UTF-8 --output $textfile $textfile.old
178    rm -f $textfile.old
179done
180
181%clean
182rm -rf %{buildroot}
183
184%pre
185if [ $1 == 1 ]; then
186    %{_sbindir}/useradd -c "Nginx user" -s /bin/false -r -d %{nginx_home} %{nginx_user} 2>/dev/null || :
187fi
188
189%post
190if [ $1 == 1 ]; then
191    /sbin/chkconfig --add %{name}
192fi
193
194%preun
195if [ $1 = 0 ]; then
196    /sbin/service %{name} stop >/dev/null 2>&1
197    /sbin/chkconfig --del %{name}
198fi
199
200%postun
201if [ $1 == 2 ]; then
202    /sbin/service %{name} upgrade || :
203fi
204
205%files
206%defattr(-,root,root,-)
207%doc LICENSE CHANGES README
208%{nginx_datadir}/
209%{_sbindir}/%{name}
210%{_mandir}/man3/%{name}.3pm.gz
211%{_initrddir}/%{name}
212%dir %{nginx_confdir}
213%dir %{nginx_confdir}/conf.d
214%config(noreplace) %{nginx_confdir}/conf.d/*.conf
215%ghost %config(noreplace) %{nginx_confdir}/conf.d/virtual.conf
216%config(noreplace) %{nginx_confdir}/sites.d/*
217%config(noreplace) %{nginx_confdir}/win-utf
218%config(noreplace) %{nginx_confdir}/%{name}.conf.default
219%config(noreplace) %{nginx_confdir}/mime.types.default
220%config(noreplace) %{nginx_confdir}/fastcgi_params
221%config(noreplace) %{nginx_confdir}/fastcgi_params.default
222%config(noreplace) %{nginx_confdir}/koi-win
223%config(noreplace) %{nginx_confdir}/koi-utf
224%config(noreplace) %{nginx_confdir}/%{name}.conf
225%config(noreplace) %{nginx_confdir}/mime.types
226%config(noreplace) %{nginx_confdir}/fastcgi.conf
227%config(noreplace) %{nginx_confdir}/fastcgi.conf.default
228%config(noreplace) %{nginx_confdir}/scgi_params
229%config(noreplace) %{nginx_confdir}/scgi_params.default
230%config(noreplace) %{nginx_confdir}/uwsgi_params
231%config(noreplace) %{nginx_confdir}/uwsgi_params.default
232%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
233%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
234%dir %{perl_vendorarch}/auto/%{name}
235%{perl_vendorarch}/%{name}.pm
236%{perl_vendorarch}/auto/%{name}/%{name}.so
237%attr(-,%{nginx_user},%{nginx_group}) %dir %{nginx_home}
238%attr(-,%{nginx_user},%{nginx_group}) %dir %{nginx_home_tmp}
239%attr(-,%{nginx_user},%{nginx_group}) %dir %{nginx_home_cache}
240%attr(-,%{nginx_user},%{nginx_group}) %dir %{nginx_logdir}
241
242
243%changelog
244* Sun Mar 27 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8.54-2
245- rebuild with perl-5.12.3
246
247* Mon Jan 17 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8.54-1
248- update to 0.8.54
249
250* Sun Nov 28 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8.53-1
251- update to 0.8.53
252- add nginx_accept_language_module
253
254* Sat Sep 24 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8.50-1
255- update to 0.8.50
256- update ngx-fancyindex to 0.3
257- add BR: libxml2-devel, libxslt-devel
258- add scgi_params* and uwsgi_params* to %%files
259
260* Sat Apr 17 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8.35-1
261- update to 0.8.35 (development version)
262- add sites.d/ to store vitualhost settings
263- split out default server settings to sites.d/default
264- add fancyindex module
265
266* Wed Dec 04 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.63-1
267- new upstream release
268
269* Sun Sep 20 2009 Shu KONNO <owa@bg.wakwak.com> 0.7.62-1
270- update to 0.7.62 (included security fix: VU#180065)
271
272* Wed Aug 26 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.61-4
273- fix typo
274
275* Thu Aug 06 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.61-3
276- add translated descriptions
277
278* Sat Jul 25 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.61-2
279- update 404.html/50x.html to use powered by vine logo.
280
281* Wed Jul 15 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.61-1
282- initial build for Vine Linux
283- update to 0.7.61
284
285* Sun May 17 2009 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.36-2
286- init script updates from Gena Makhomed
287- remove nginx-upstream-fair
288
289* Sat Apr 11 2009 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.36-1
290-  update to 0.6.36
291
292* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.35-3
293- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
294
295* Thu Feb 19 2009 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.35-2
296- rebuild
297
298* Thu Feb 19 2009 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.35-1
299- update to 0.6.35
300
301* Sat Jan 17 2009 Tomas Mraz <tmraz@redhat.com> - 0.6.34-2
302- rebuild with new openssl
303
304* Tue Dec 30 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.34-1
305- update to 0.6.34
306
307* Thu Dec  4 2008 Michael Schwendt <mschwendt@fedoraproject.org> - 0.6.33-2
308- Fix inclusion of /usr/share/nginx tree => no unowned directories.
309
310* Sun Nov 23 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.33-1
311- update to 0.6.33
312
313* Tue Jul 22 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.32-1
314- update to 0.6.32
315- nginx now supports DESTDIR so removed the patches that enabled it
316
317* Mon May 26 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.31-3
318- init script fixes
319- resolve 'listen 80 default' [#447873]
320
321* Mon May 12 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.31-2
322- update to 0.6.31
323
324* Sun May 11 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.30-2
325- upate to new upstream stable branch 0.6
326- added 3rd party module nginx-upstream-fair
327- added default webpages
328
329* Sun Apr 20 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.5.35-2
330- update init script to match recommended guidelines
331- add /etc/nginx/conf.d support [#443280]
332- use /etc/sysconfig/nginx to determine nginx.conf [#442708]
333
334* Tue Mar 18 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.5.35-3
335- add Requires for versioned perl (libperl.so)
336- drop silly file Requires
337
338* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.5.35-2
339- Autorebuild for GCC 4.3
340
341* Sat Jan 19 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.5.35-1
342- update to 0.5.35
343
344* Sat Dec 15 2007 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.5.34-1
345- update to 0.5.34
346
347* Wed Dec 05 2007 Release Engineering <rel-eng at fedoraproject dot org> - 0.5.33-2
348 - Rebuild for deps
349
350* Sun Nov 11 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.33-1
351- update to 0.5.33
352
353* Mon Sep 24 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.32-1
354- updated to 0.5.32
355- fixed rpmlint UTF-8 complaints.
356
357* Sat Aug 18 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.31-2
358- added --with-http_stub_status_module build option.
359- added --with-http_sub_module build option.
360- added use of pcre-config --cflags
361
362* Fri Aug 17 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.31-1
363- Update to 0.5.31
364- specify license is BSD
365
366* Sat Aug 11 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.30-2
367- Add BuildRequires: perl-devel - fixing rawhide build
368
369* Mon Jul 30 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.30-1
370- Update to 0.5.30
371
372* Tue Jul 24 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.29-1
373- Update to 0.5.29
374
375* Wed Jul 18 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.28-1
376- Update to 0.5.28
377
378* Mon Jul 09 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.27-1
379- Update to 0.5.27
380
381* Mon Jun 18 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.26-1
382- Update to 0.5.26
383
384* Sat Apr 28 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.19-1
385- Update to 0.5.19
386
387* Mon Apr 02 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.17-1
388- Update to 0.5.17
389
390* Mon Mar 26 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.16-1
391- Update to 0.5.16
392- add ownership of /usr/share/nginx/html (#233950)
393
394* Fri Mar 23 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.15-3
395- fixed package review bugs (#235222) given by ruben@rubenkerkhof.com
396
397* Thu Mar 22 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.15-2
398- fixed package review bugs (#233522) given by kevin@tummy.com
399
400* Thu Mar 22 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.15-1
401- create patches to assist with building for Fedora
402- initial packaging for Fedora
Note: See TracBrowser for help on using the repository browser.