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

Revision 2525, 14.3 KB checked in by daisuke, 13 years ago (diff)

nginx: update to 0.8.54

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:        1%{?_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* Mon Jan 17 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8.54-1
245- update to 0.8.54
246
247* Sun Nov 28 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8.53-1
248- update to 0.8.53
249- add nginx_accept_language_module
250
251* Sat Sep 24 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8.50-1
252- update to 0.8.50
253- update ngx-fancyindex to 0.3
254- add BR: libxml2-devel, libxslt-devel
255- add scgi_params* and uwsgi_params* to %%files
256
257* Sat Apr 17 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8.35-1
258- update to 0.8.35 (development version)
259- add sites.d/ to store vitualhost settings
260- split out default server settings to sites.d/default
261- add fancyindex module
262
263* Wed Dec 04 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.63-1
264- new upstream release
265
266* Sun Sep 20 2009 Shu KONNO <owa@bg.wakwak.com> 0.7.62-1
267- update to 0.7.62 (included security fix: VU#180065)
268
269* Wed Aug 26 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.61-4
270- fix typo
271
272* Thu Aug 06 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.61-3
273- add translated descriptions
274
275* Sat Jul 25 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.61-2
276- update 404.html/50x.html to use powered by vine logo.
277
278* Wed Jul 15 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.61-1
279- initial build for Vine Linux
280- update to 0.7.61
281
282* Sun May 17 2009 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.36-2
283- init script updates from Gena Makhomed
284- remove nginx-upstream-fair
285
286* Sat Apr 11 2009 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.36-1
287-  update to 0.6.36
288
289* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.35-3
290- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
291
292* Thu Feb 19 2009 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.35-2
293- rebuild
294
295* Thu Feb 19 2009 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.35-1
296- update to 0.6.35
297
298* Sat Jan 17 2009 Tomas Mraz <tmraz@redhat.com> - 0.6.34-2
299- rebuild with new openssl
300
301* Tue Dec 30 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.34-1
302- update to 0.6.34
303
304* Thu Dec  4 2008 Michael Schwendt <mschwendt@fedoraproject.org> - 0.6.33-2
305- Fix inclusion of /usr/share/nginx tree => no unowned directories.
306
307* Sun Nov 23 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.33-1
308- update to 0.6.33
309
310* Tue Jul 22 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.32-1
311- update to 0.6.32
312- nginx now supports DESTDIR so removed the patches that enabled it
313
314* Mon May 26 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.31-3
315- init script fixes
316- resolve 'listen 80 default' [#447873]
317
318* Mon May 12 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.31-2
319- update to 0.6.31
320
321* Sun May 11 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.30-2
322- upate to new upstream stable branch 0.6
323- added 3rd party module nginx-upstream-fair
324- added default webpages
325
326* Sun Apr 20 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.5.35-2
327- update init script to match recommended guidelines
328- add /etc/nginx/conf.d support [#443280]
329- use /etc/sysconfig/nginx to determine nginx.conf [#442708]
330
331* Tue Mar 18 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.5.35-3
332- add Requires for versioned perl (libperl.so)
333- drop silly file Requires
334
335* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.5.35-2
336- Autorebuild for GCC 4.3
337
338* Sat Jan 19 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.5.35-1
339- update to 0.5.35
340
341* Sat Dec 15 2007 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.5.34-1
342- update to 0.5.34
343
344* Wed Dec 05 2007 Release Engineering <rel-eng at fedoraproject dot org> - 0.5.33-2
345 - Rebuild for deps
346
347* Sun Nov 11 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.33-1
348- update to 0.5.33
349
350* Mon Sep 24 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.32-1
351- updated to 0.5.32
352- fixed rpmlint UTF-8 complaints.
353
354* Sat Aug 18 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.31-2
355- added --with-http_stub_status_module build option.
356- added --with-http_sub_module build option.
357- added use of pcre-config --cflags
358
359* Fri Aug 17 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.31-1
360- Update to 0.5.31
361- specify license is BSD
362
363* Sat Aug 11 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.30-2
364- Add BuildRequires: perl-devel - fixing rawhide build
365
366* Mon Jul 30 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.30-1
367- Update to 0.5.30
368
369* Tue Jul 24 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.29-1
370- Update to 0.5.29
371
372* Wed Jul 18 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.28-1
373- Update to 0.5.28
374
375* Mon Jul 09 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.27-1
376- Update to 0.5.27
377
378* Mon Jun 18 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.26-1
379- Update to 0.5.26
380
381* Sat Apr 28 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.19-1
382- Update to 0.5.19
383
384* Mon Apr 02 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.17-1
385- Update to 0.5.17
386
387* Mon Mar 26 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.16-1
388- Update to 0.5.16
389- add ownership of /usr/share/nginx/html (#233950)
390
391* Fri Mar 23 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.15-3
392- fixed package review bugs (#235222) given by ruben@rubenkerkhof.com
393
394* Thu Mar 22 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.15-2
395- fixed package review bugs (#233522) given by kevin@tummy.com
396
397* Thu Mar 22 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.15-1
398- create patches to assist with building for Fedora
399- initial packaging for Fedora
Note: See TracBrowser for help on using the repository browser.