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

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