2007-03-24 18:31:48 +00:00
|
|
|
%define nginx_user nginx
|
|
|
|
%define nginx_group %{nginx_user}
|
|
|
|
%define nginx_home %{_localstatedir}/lib/nginx
|
|
|
|
%define nginx_home_tmp %{nginx_home}/tmp
|
|
|
|
%define nginx_logdir %{_localstatedir}/log/nginx
|
|
|
|
%define nginx_confdir %{_sysconfdir}/nginx
|
2007-03-26 16:49:19 +00:00
|
|
|
%define nginx_datadir %{_datadir}/nginx
|
2008-05-12 05:04:52 +00:00
|
|
|
%define nginx_webroot %{nginx_datadir}/html
|
2007-03-24 18:31:48 +00:00
|
|
|
|
|
|
|
Name: nginx
|
2009-12-04 20:21:41 +00:00
|
|
|
Version: 0.7.64
|
2009-09-14 20:01:30 +00:00
|
|
|
Release: 1%{?dist}
|
2007-03-24 18:31:48 +00:00
|
|
|
Summary: Robust, small and high performance http and reverse proxy server
|
|
|
|
Group: System Environment/Daemons
|
|
|
|
|
2007-08-18 18:22:11 +00:00
|
|
|
# BSD License (two clause)
|
2007-08-18 00:48:07 +00:00
|
|
|
# http://www.freebsd.org/copyright/freebsd-license.html
|
|
|
|
License: BSD
|
2007-03-24 18:31:48 +00:00
|
|
|
URL: http://nginx.net/
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
|
2008-03-18 18:34:44 +00:00
|
|
|
BuildRequires: pcre-devel,zlib-devel,openssl-devel,perl-devel,perl(ExtUtils::Embed)
|
2009-10-30 05:27:51 +00:00
|
|
|
Requires: pcre,zlib,openssl
|
2008-03-18 18:34:44 +00:00
|
|
|
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
|
|
|
# for /usr/sbin/useradd
|
|
|
|
Requires(pre): shadow-utils
|
|
|
|
Requires(post): chkconfig
|
|
|
|
# for /sbin/service
|
|
|
|
Requires(preun): chkconfig, initscripts
|
|
|
|
Requires(postun): initscripts
|
2007-03-24 18:31:48 +00:00
|
|
|
|
|
|
|
Source0: http://sysoev.ru/nginx/nginx-%{version}.tar.gz
|
|
|
|
Source1: %{name}.init
|
|
|
|
Source2: %{name}.logrotate
|
2008-05-12 05:04:52 +00:00
|
|
|
Source3: virtual.conf
|
|
|
|
Source4: ssl.conf
|
2009-05-17 21:11:07 +00:00
|
|
|
Source5: %{name}.sysconfig
|
2008-05-12 05:04:52 +00:00
|
|
|
Source100: index.html
|
|
|
|
Source101: poweredby.png
|
|
|
|
Source102: nginx-logo.png
|
|
|
|
Source103: 50x.html
|
|
|
|
Source104: 404.html
|
2007-03-24 18:31:48 +00:00
|
|
|
|
|
|
|
# removes -Werror in upstream build scripts. -Werror conflicts with
|
|
|
|
# -D_FORTIFY_SOURCE=2 causing warnings to turn into errors.
|
|
|
|
Patch0: nginx-auto-cc-gcc.patch
|
|
|
|
|
|
|
|
# configuration patch to match all the Fedora paths for logs, pid files
|
|
|
|
# etc.
|
2008-07-23 06:05:05 +00:00
|
|
|
Patch1: nginx-conf.patch
|
2007-03-24 18:31:48 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
Nginx [engine x] is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3
|
2009-05-17 21:11:07 +00:00
|
|
|
proxy server written by Igor Sysoev.
|
2007-03-24 18:31:48 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%patch0 -p0
|
|
|
|
%patch1 -p0
|
|
|
|
|
|
|
|
%build
|
|
|
|
# nginx does not utilize a standard configure script. It has its own
|
|
|
|
# and the standard configure options cause the nginx configure script
|
|
|
|
# to error out. This is is also the reason for the DESTDIR environment
|
|
|
|
# variable. The configure script(s) have been patched (Patch1 and
|
|
|
|
# Patch2) in order to support installing into a build environment.
|
|
|
|
export DESTDIR=%{buildroot}
|
|
|
|
./configure \
|
|
|
|
--user=%{nginx_user} \
|
|
|
|
--group=%{nginx_group} \
|
2007-03-26 16:49:19 +00:00
|
|
|
--prefix=%{nginx_datadir} \
|
2007-03-24 18:31:48 +00:00
|
|
|
--sbin-path=%{_sbindir}/%{name} \
|
|
|
|
--conf-path=%{nginx_confdir}/%{name}.conf \
|
|
|
|
--error-log-path=%{nginx_logdir}/error.log \
|
|
|
|
--http-log-path=%{nginx_logdir}/access.log \
|
|
|
|
--http-client-body-temp-path=%{nginx_home_tmp}/client_body \
|
|
|
|
--http-proxy-temp-path=%{nginx_home_tmp}/proxy \
|
|
|
|
--http-fastcgi-temp-path=%{nginx_home_tmp}/fastcgi \
|
|
|
|
--pid-path=%{_localstatedir}/run/%{name}.pid \
|
|
|
|
--lock-path=%{_localstatedir}/lock/subsys/%{name} \
|
|
|
|
--with-http_ssl_module \
|
|
|
|
--with-http_realip_module \
|
|
|
|
--with-http_addition_module \
|
2007-08-18 18:22:11 +00:00
|
|
|
--with-http_sub_module \
|
2007-03-24 18:31:48 +00:00
|
|
|
--with-http_dav_module \
|
|
|
|
--with-http_flv_module \
|
2008-05-12 05:04:52 +00:00
|
|
|
--with-http_gzip_static_module \
|
2007-08-18 18:22:11 +00:00
|
|
|
--with-http_stub_status_module \
|
2007-03-24 18:31:48 +00:00
|
|
|
--with-http_perl_module \
|
|
|
|
--with-mail \
|
|
|
|
--with-mail_ssl_module \
|
2009-05-17 21:11:07 +00:00
|
|
|
--with-cc-opt="%{optflags} $(pcre-config --cflags)"
|
2007-03-24 18:31:48 +00:00
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
make install DESTDIR=%{buildroot} INSTALLDIRS=vendor
|
|
|
|
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
|
|
|
|
find %{buildroot} -type f -name perllocal.pod -exec rm -f {} \;
|
|
|
|
find %{buildroot} -type f -empty -exec rm -f {} \;
|
|
|
|
find %{buildroot} -type f -exec chmod 0644 {} \;
|
|
|
|
find %{buildroot} -type f -name '*.so' -exec chmod 0755 {} \;
|
|
|
|
chmod 0755 %{buildroot}%{_sbindir}/nginx
|
|
|
|
%{__install} -p -D -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name}
|
|
|
|
%{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
2009-05-17 21:11:07 +00:00
|
|
|
%{__install} -p -D -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
|
2008-05-12 05:04:52 +00:00
|
|
|
%{__install} -p -d -m 0755 %{buildroot}%{nginx_confdir}/conf.d
|
2009-05-17 21:11:07 +00:00
|
|
|
%{__install} -p -m 0644 %{SOURCE3} %{SOURCE4} %{buildroot}%{nginx_confdir}/conf.d
|
2007-03-24 18:31:48 +00:00
|
|
|
%{__install} -p -d -m 0755 %{buildroot}%{nginx_home_tmp}
|
|
|
|
%{__install} -p -d -m 0755 %{buildroot}%{nginx_logdir}
|
2008-05-12 05:04:52 +00:00
|
|
|
%{__install} -p -d -m 0755 %{buildroot}%{nginx_webroot}
|
|
|
|
%{__install} -p -m 0644 %{SOURCE100} %{SOURCE101} %{SOURCE102} %{SOURCE103} %{SOURCE104} %{buildroot}%{nginx_webroot}
|
|
|
|
|
2007-09-24 19:57:10 +00:00
|
|
|
# convert to UTF-8 all files that give warnings.
|
|
|
|
for textfile in CHANGES
|
|
|
|
do
|
|
|
|
mv $textfile $textfile.old
|
|
|
|
iconv --from-code ISO8859-1 --to-code UTF-8 --output $textfile $textfile.old
|
|
|
|
rm -f $textfile.old
|
|
|
|
done
|
|
|
|
|
2007-03-24 18:31:48 +00:00
|
|
|
%clean
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
|
|
%pre
|
2009-05-17 21:11:07 +00:00
|
|
|
if [ $1 == 1 ]; then
|
|
|
|
%{_sbindir}/useradd -c "Nginx user" -s /bin/false -r -d %{nginx_home} %{nginx_user} 2>/dev/null || :
|
|
|
|
fi
|
2007-03-24 18:31:48 +00:00
|
|
|
|
|
|
|
%post
|
2009-05-17 21:11:07 +00:00
|
|
|
if [ $1 == 1 ]; then
|
|
|
|
/sbin/chkconfig --add %{name}
|
|
|
|
fi
|
2007-03-24 18:31:48 +00:00
|
|
|
|
|
|
|
%preun
|
|
|
|
if [ $1 = 0 ]; then
|
|
|
|
/sbin/service %{name} stop >/dev/null 2>&1
|
|
|
|
/sbin/chkconfig --del %{name}
|
|
|
|
fi
|
|
|
|
|
|
|
|
%postun
|
2009-05-17 21:11:07 +00:00
|
|
|
if [ $1 == 2 ]; then
|
|
|
|
/sbin/service %{name} upgrade || :
|
2007-03-24 18:31:48 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
2009-05-17 21:11:07 +00:00
|
|
|
%doc LICENSE CHANGES README
|
2008-12-04 20:19:02 +00:00
|
|
|
%{nginx_datadir}/
|
2007-03-24 18:31:48 +00:00
|
|
|
%{_sbindir}/%{name}
|
|
|
|
%{_mandir}/man3/%{name}.3pm.gz
|
|
|
|
%{_initrddir}/%{name}
|
|
|
|
%dir %{nginx_confdir}
|
2008-05-12 05:04:52 +00:00
|
|
|
%dir %{nginx_confdir}/conf.d
|
|
|
|
%config(noreplace) %{nginx_confdir}/conf.d/*.conf
|
2007-03-24 18:31:48 +00:00
|
|
|
%config(noreplace) %{nginx_confdir}/win-utf
|
|
|
|
%config(noreplace) %{nginx_confdir}/%{name}.conf.default
|
|
|
|
%config(noreplace) %{nginx_confdir}/mime.types.default
|
2008-05-12 05:04:52 +00:00
|
|
|
%config(noreplace) %{nginx_confdir}/fastcgi_params
|
|
|
|
%config(noreplace) %{nginx_confdir}/fastcgi_params.default
|
2007-03-24 18:31:48 +00:00
|
|
|
%config(noreplace) %{nginx_confdir}/koi-win
|
|
|
|
%config(noreplace) %{nginx_confdir}/koi-utf
|
|
|
|
%config(noreplace) %{nginx_confdir}/%{name}.conf
|
|
|
|
%config(noreplace) %{nginx_confdir}/mime.types
|
|
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
2008-05-12 05:04:52 +00:00
|
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
|
2007-03-24 18:31:48 +00:00
|
|
|
%dir %{perl_vendorarch}/auto/%{name}
|
|
|
|
%{perl_vendorarch}/%{name}.pm
|
|
|
|
%{perl_vendorarch}/auto/%{name}/%{name}.so
|
|
|
|
%attr(-,%{nginx_user},%{nginx_group}) %dir %{nginx_home}
|
|
|
|
%attr(-,%{nginx_user},%{nginx_group}) %dir %{nginx_home_tmp}
|
|
|
|
%attr(-,%{nginx_user},%{nginx_group}) %dir %{nginx_logdir}
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2009-12-04 20:20:42 +00:00
|
|
|
* Fri Dec 04 2009 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.7.64-1
|
|
|
|
- Update to new stable 0.7.64
|
|
|
|
|
2009-10-30 05:27:51 +00:00
|
|
|
* Tue Oct 29 2009 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.7.63-1
|
|
|
|
- Update to new stable 0.7.63
|
|
|
|
- reinstate zlib dependency
|
|
|
|
|
2009-09-14 20:01:30 +00:00
|
|
|
* Mon Sep 14 2009 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.7.62-1
|
|
|
|
- Update to new stable 0.7.62
|
|
|
|
- fixes CVE-2009-2629
|
|
|
|
- fix rpmlint zlib dependency complaint
|
|
|
|
|
2009-08-21 14:41:58 +00:00
|
|
|
* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 0.7.61-2
|
|
|
|
- rebuilt with new openssl
|
|
|
|
|
2009-08-03 01:04:00 +00:00
|
|
|
* Sun Aug 02 2009 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.7.61-1
|
|
|
|
- Update to new stable 0.7.61
|
|
|
|
|
2009-07-25 19:19:42 +00:00
|
|
|
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.36-3
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
|
|
|
|
2009-05-17 21:11:07 +00:00
|
|
|
* Sun May 17 2009 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.36-2
|
|
|
|
- init script updates from Gena Makhomed
|
|
|
|
- remove nginx-upstream-fair
|
|
|
|
|
|
|
|
* Sat Apr 11 2009 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.36-1
|
2009-04-11 22:59:28 +00:00
|
|
|
- update to 0.6.36
|
|
|
|
|
2009-02-26 05:37:07 +00:00
|
|
|
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.35-3
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
|
|
|
|
2009-02-19 08:49:04 +00:00
|
|
|
* Thu Feb 19 2009 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.35-2
|
|
|
|
- rebuild
|
|
|
|
|
2009-02-19 08:37:21 +00:00
|
|
|
* Thu Feb 19 2009 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.35-1
|
|
|
|
- update to 0.6.35
|
|
|
|
|
2009-01-17 15:36:54 +00:00
|
|
|
* Sat Jan 17 2009 Tomas Mraz <tmraz@redhat.com> - 0.6.34-2
|
|
|
|
- rebuild with new openssl
|
|
|
|
|
2008-12-31 03:54:08 +00:00
|
|
|
* Tue Dec 30 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.34-1
|
|
|
|
- update to 0.6.34
|
|
|
|
|
2008-12-04 20:19:02 +00:00
|
|
|
* Thu Dec 4 2008 Michael Schwendt <mschwendt@fedoraproject.org> - 0.6.33-2
|
|
|
|
- Fix inclusion of /usr/share/nginx tree => no unowned directories.
|
|
|
|
|
2008-11-23 08:45:06 +00:00
|
|
|
* Sun Nov 23 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.33-1
|
|
|
|
- update to 0.6.33
|
|
|
|
|
2008-07-23 06:05:05 +00:00
|
|
|
* Tue Jul 22 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.32-1
|
|
|
|
- update to 0.6.32
|
|
|
|
- nginx now supports DESTDIR so removed the patches that enabled it
|
|
|
|
|
|
|
|
* Mon May 26 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.31-3
|
2008-05-27 04:28:23 +00:00
|
|
|
- init script fixes
|
|
|
|
- resolve 'listen 80 default' [#447873]
|
|
|
|
|
2008-07-23 06:05:05 +00:00
|
|
|
* Mon May 12 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.31-2
|
2008-05-13 04:06:38 +00:00
|
|
|
- update to 0.6.31
|
|
|
|
|
2008-07-23 06:05:05 +00:00
|
|
|
* Sun May 11 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.30-2
|
2008-05-12 05:04:52 +00:00
|
|
|
- upate to new upstream stable branch 0.6
|
|
|
|
- added 3rd party module nginx-upstream-fair
|
|
|
|
- added default webpages
|
|
|
|
|
|
|
|
* Sun Apr 20 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.5.35-2
|
|
|
|
- update init script to match recommended guidelines
|
|
|
|
- add /etc/nginx/conf.d support [#443280]
|
|
|
|
- use /etc/sysconfig/nginx to determine nginx.conf [#442708]
|
|
|
|
|
2008-03-18 18:34:44 +00:00
|
|
|
* Tue Mar 18 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.5.35-3
|
|
|
|
- add Requires for versioned perl (libperl.so)
|
|
|
|
- drop silly file Requires
|
|
|
|
|
2008-02-19 06:20:48 +00:00
|
|
|
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.5.35-2
|
|
|
|
- Autorebuild for GCC 4.3
|
|
|
|
|
2008-01-19 17:54:58 +00:00
|
|
|
* Sat Jan 19 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.5.35-1
|
|
|
|
- update to 0.5.35
|
|
|
|
|
2007-12-16 07:25:02 +00:00
|
|
|
* Sat Dec 15 2007 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.5.34-1
|
|
|
|
- update to 0.5.34
|
|
|
|
|
2007-12-05 22:01:25 +00:00
|
|
|
* Wed Dec 05 2007 Release Engineering <rel-eng at fedoraproject dot org> - 0.5.33-2
|
|
|
|
- Rebuild for deps
|
|
|
|
|
2007-11-12 07:30:07 +00:00
|
|
|
* Sun Nov 11 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.33-1
|
|
|
|
- update to 0.5.33
|
|
|
|
|
2007-09-24 19:57:10 +00:00
|
|
|
* Mon Sep 24 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.32-1
|
|
|
|
- updated to 0.5.32
|
|
|
|
- fixed rpmlint UTF-8 complaints.
|
|
|
|
|
2007-08-18 18:22:11 +00:00
|
|
|
* Sat Aug 18 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.31-2
|
|
|
|
- added --with-http_stub_status_module build option.
|
|
|
|
- added --with-http_sub_module build option.
|
|
|
|
- added use of pcre-config --cflags
|
|
|
|
|
2007-08-18 00:48:07 +00:00
|
|
|
* Fri Aug 17 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.31-1
|
|
|
|
- Update to 0.5.31
|
|
|
|
- specify license is BSD
|
|
|
|
|
2007-08-12 01:10:03 +00:00
|
|
|
* Sat Aug 11 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.30-2
|
|
|
|
- Add BuildRequires: perl-devel - fixing rawhide build
|
|
|
|
|
2007-07-31 01:37:46 +00:00
|
|
|
* Mon Jul 30 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.30-1
|
|
|
|
- Update to 0.5.30
|
|
|
|
|
2007-07-25 02:07:11 +00:00
|
|
|
* Tue Jul 24 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.29-1
|
|
|
|
- Update to 0.5.29
|
|
|
|
|
2007-07-19 05:10:19 +00:00
|
|
|
* Wed Jul 18 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.28-1
|
|
|
|
- Update to 0.5.28
|
|
|
|
|
2007-07-10 05:30:56 +00:00
|
|
|
* Mon Jul 09 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.27-1
|
|
|
|
- Update to 0.5.27
|
|
|
|
|
2007-06-19 01:40:49 +00:00
|
|
|
* Mon Jun 18 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.26-1
|
|
|
|
- Update to 0.5.26
|
|
|
|
|
2007-04-28 15:33:08 +00:00
|
|
|
* Sat Apr 28 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.19-1
|
|
|
|
- Update to 0.5.19
|
|
|
|
|
2007-04-02 19:23:55 +00:00
|
|
|
* Mon Apr 02 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.17-1
|
|
|
|
- Update to 0.5.17
|
|
|
|
|
2007-03-26 16:49:19 +00:00
|
|
|
* Mon Mar 26 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.16-1
|
|
|
|
- Update to 0.5.16
|
|
|
|
- add ownership of /usr/share/nginx/html (#233950)
|
|
|
|
|
2007-03-24 18:31:48 +00:00
|
|
|
* Fri Mar 23 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.15-3
|
|
|
|
- fixed package review bugs (#235222) given by ruben@rubenkerkhof.com
|
|
|
|
|
|
|
|
* Thu Mar 22 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.15-2
|
|
|
|
- fixed package review bugs (#233522) given by kevin@tummy.com
|
|
|
|
|
|
|
|
* Thu Mar 22 2007 Jeremy Hinegardner <jeremy@hinegardner.org> - 0.5.15-1
|
|
|
|
- create patches to assist with building for Fedora
|
|
|
|
- initial packaging for Fedora
|