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

Revision 521, 11.7 KB checked in by daisuke, 14 years ago (diff)

import VineSeed package specs

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