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

Revision 854, 13.4 KB checked in by daisuke, 14 years ago (diff)

nginx:

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