Changes of Revision 3
[-] | Added | nginx-testing.spec |
x 1
2 +%define nginx_user nginx 3 +%define nginx_group %{nginx_user} 4 +%define nginx_home %{_localstatedir}/lib/nginx 5 +%define nginx_home_tmp %{nginx_home}/tmp 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 + 11 +Name: nginx 12 +Version: 0.7.67 13 +Release: 1 14 +Summary: Robust, small and high performance http and reverse proxy server 15 +Group: System Environment/Daemons 16 + 17 +License: BSD 18 +URL: http://nginx.net/ 19 +BuildRoot: %{_tmppath}/%{name}-%{version}-root 20 + 21 +BuildRequires: pcre-devel,zlib-devel,openssl-devel,perl(ExtUtils::Embed) 22 +Requires: pcre,zlib,openssl 23 +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) 24 +Requires(pre): shadow-utils 25 +Requires(post): chkconfig 26 +Requires(preun): chkconfig, initscripts 27 +Requires(postun): initscripts 28 + 29 +Source0: http://sysoev.ru/nginx/nginx-%{version}.tar.gz 30 +Source1: %{name}.init 31 +Source2: %{name}.logrotate 32 +Source3: virtual.conf 33 +Source4: ssl.conf 34 +Source5: nginx-upstream-fair.tgz 35 +Source6: upstream-fair.conf 36 +Source7: %{name}.sysconfig 37 +Source100: index.html 38 +Source101: poweredby.png 39 +Source102: nginx-logo.png 40 +Source103: 50x.html 41 +Source104: 404.html 42 + 43 +# removes -Werror in upstream build scripts. -Werror conflicts with 44 +# -D_FORTIFY_SOURCE=2 causing warnings to turn into errors. 45 +Patch0: nginx-auto-cc-gcc.patch 46 + 47 +# configuration patch to match all the Fedora paths for logs, pid files 48 +# etc. 49 +Patch1: nginx-conf-0.7.x.patch 50 + 51 +# syslog patch, use syslog instead of nginx logfiles 52 +Patch2: nginx-syslog.patch 53 +#Patch3: nginx-unix-sockets.diff 54 + 55 +%description 56 +Nginx [engine x] is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 57 +proxy server written by Igor Sysoev. 58 + 59 +One third party module, nginx-upstream-fair, has been added. 60 + 61 +%prep 62 +%setup -q 63 + 64 +%patch0 -p0 65 +%patch1 -p0 66 +%patch2 -p1 67 +# %patch3 -p1 68 +%{__tar} zxvf %{SOURCE5} 69 + 70 +%build 71 +export DESTDIR=%{buildroot} 72 +./configure \ 73 + --user=%{nginx_user} \ 74 + --group=%{nginx_group} \ 75 + --prefix=%{nginx_datadir} \ 76 + --sbin-path=%{_sbindir}/%{name} \ 77 + --conf-path=%{nginx_confdir}/%{name}.conf \ 78 + --error-log-path=%{nginx_logdir}/error.log \ 79 + --http-log-path=%{nginx_logdir}/access.log \ 80 + --http-client-body-temp-path=%{nginx_home_tmp}/client_body \ 81 + --http-proxy-temp-path=%{nginx_home_tmp}/proxy \ 82 + --http-fastcgi-temp-path=%{nginx_home_tmp}/fastcgi \ 83 + --pid-path=%{_localstatedir}/run/%{name}.pid \ 84 + --lock-path=%{_localstatedir}/lock/subsys/%{name} \ 85 + --with-http_ssl_module \ 86 + --with-http_realip_module \ 87 + --with-http_addition_module \ 88 + --with-http_sub_module \ 89 + --with-http_dav_module \ 90 + --with-http_flv_module \ 91 + --with-http_gzip_static_module \ 92 + --with-http_stub_status_module \ 93 + --with-mail \ 94 + --with-mail_ssl_module \ 95 + --with-debug \ 96 + --with-cc-opt="-O -pipe -mtune=generic -fomit-frame-pointer $(pcre-config --cflags)" \ 97 + --add-module=%{_builddir}/nginx-%{version}/nginx-upstream-fair 98 +make %{?_smp_mflags} 99 + 100 +mv nginx-upstream-fair/README nginx-upstream-fair/README.nginx-upstream-fair 101 + 102 +%install 103 +rm -rf %{buildroot} 104 +make install DESTDIR=%{buildroot} INSTALLDIRS=vendor 105 +find %{buildroot} -type f -name .packlist -exec rm -f {} \; 106 +find %{buildroot} -type f -name perllocal.pod -exec rm -f {} \; 107 +find %{buildroot} -type f -empty -exec rm -f {} \; 108 +find %{buildroot} -type f -exec chmod 0644 {} \; 109 +find %{buildroot} -type f -name '*.so' -exec chmod 0755 {} \; 110 +chmod 0755 %{buildroot}%{_sbindir}/nginx 111 +%{__install} -p -D -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name} 112 +%{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} 113 +%{__install} -p -D -m 0644 %{SOURCE7} %{buildroot}%{_sysconfdir}/sysconfig/%{name} 114 +%{__install} -p -d -m 0755 %{buildroot}%{nginx_confdir}/conf.d 115 +%{__install} -p -m 0644 %{SOURCE3} %{SOURCE4} %{SOURCE6} %{buildroot}%{nginx_confdir}/conf.d 116 +%{__install} -p -d -m 0755 %{buildroot}%{nginx_home_tmp} 117 +%{__install} -p -d -m 0755 %{buildroot}%{nginx_logdir} 118 +%{__install} -p -d -m 0755 %{buildroot}%{nginx_webroot} 119 +%{__install} -p -m 0644 %{SOURCE100} %{SOURCE101} %{SOURCE102} %{SOURCE103} %{SOURCE104} %{buildroot}%{nginx_webroot} 120 + 121 +# convert to UTF-8 all files that give warnings. 122 +for textfile in CHANGES 123 +do 124 + mv $textfile $textfile.old 125 + iconv --from-code ISO8859-1 --to-code UTF-8 --output $textfile $textfile.old 126 + rm -f $textfile.old 127 +done 128 + 129 +%clean 130 +rm -rf %{buildroot} 131 + 132 +%pre 133 +%{_sbindir}/useradd -c "Nginx user" -s /bin/false -r -d %{nginx_home} %{nginx_user} 2>/dev/null || : 134 + 135 +%post 136 +/sbin/chkconfig --add %{name} 137 + 138 +%preun 139 +if [ $1 = 0 ]; then 140 + /sbin/service %{name} stop >/dev/null 2>&1 141 + /sbin/chkconfig --del %{name} 142 +fi 143 + 144 +%postun 145 +if [ $1 -ge 1 ]; then 146 + /sbin/service %{name} condrestart > /dev/null 2>&1 || : 147 +fi 148 + 149 +%files 150 +%defattr(-,root,root,-) 151 +%doc LICENSE CHANGES README nginx-upstream-fair/README.nginx-upstream-fair 152 +%{nginx_datadir}/ 153 +%{_sbindir}/%{name} 154 +# %{_mandir}/man3/%{name}.3pm.gz 155 +%{_initrddir}/%{name} 156 +%dir %{nginx_confdir} 157 +%dir %{nginx_confdir}/conf.d 158 +%config(noreplace) %{nginx_confdir}/conf.d/*.conf 159 +%config(noreplace) %{nginx_confdir}/win-utf 160 +%config(noreplace) %{nginx_confdir}/%{name}.conf.default 161 +%config(noreplace) %{nginx_confdir}/mime.types.default 162 +%config(noreplace) %{nginx_confdir}/fastcgi_params 163 +%config(noreplace) %{nginx_confdir}/fastcgi_params.default 164 +%config(noreplace) %{nginx_confdir}/fastcgi.conf 165 +%config(noreplace) %{nginx_confdir}/fastcgi.conf.default 166 +%config(noreplace) %{nginx_confdir}/koi-win 167 +%config(noreplace) %{nginx_confdir}/koi-utf 168 +%config(noreplace) %{nginx_confdir}/%{name}.conf 169 +%config(noreplace) %{nginx_confdir}/mime.types 170 +%config(noreplace) %{_sysconfdir}/logrotate.d/%{name} 171 +%config(noreplace) %{_sysconfdir}/sysconfig/%{name} 172 +#%dir %{perl_vendorarch}/auto/%{name} 173 +#%{perl_vendorarch}/%{name}.pm 174 +#%{perl_vendorarch}/auto/%{name}/%{name}.so 175 +%attr(-,%{nginx_user},%{nginx_group}) %dir %{nginx_home} 176 +%attr(-,%{nginx_user},%{nginx_group}) %dir %{nginx_home_tmp} 177 +%attr(-,%{nginx_user},%{nginx_group}) %dir %{nginx_logdir} 178 + 179 + 180 +%changelog 181 +* Wed Nov 17 2009 Juergen Gotteswinter <jg at internetx.de> 0.7.64-1 182 + 183 +- version bump to 0.7.64 184 + 185 + 186 +* Wed Oct 28 2009 Juergen Gotteswinter <jg at internetx.de> 0.7.63-1 187 + 188 +- version bump to 0.7.63 189 + 190 +* Fri Oct 23 2009 Juergen Gotteswinter <jg at internetx.de> 0.7.62-3 191 +- included nginx-socket-patch for unix socket support 192 |
||
[+] | Deleted | nginx.spec ^ |
@@ -1,190 +0,0 @@ -%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 -%define nginx_datadir %{_datadir}/nginx -%define nginx_webroot %{nginx_datadir}/html - -Name: nginx -Version: 0.7.67 -Release: 1 -Summary: Robust, small and high performance http and reverse proxy server -Group: System Environment/Daemons - -License: BSD -URL: http://nginx.net/ -BuildRoot: %{_tmppath}/%{name}-%{version}-root - -BuildRequires: pcre-devel,zlib-devel,openssl-devel,perl(ExtUtils::Embed) -Requires: pcre,zlib,openssl -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) -Requires(pre): shadow-utils -Requires(post): chkconfig -Requires(preun): chkconfig, initscripts -Requires(postun): initscripts - -Source0: http://sysoev.ru/nginx/nginx-%{version}.tar.gz -Source1: %{name}.init -Source2: %{name}.logrotate -Source3: virtual.conf -Source4: ssl.conf -Source5: nginx-upstream-fair.tgz -Source6: upstream-fair.conf -Source7: %{name}.sysconfig -Source100: index.html -Source101: poweredby.png -Source102: nginx-logo.png -Source103: 50x.html -Source104: 404.html - -# 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. -Patch1: nginx-conf-0.7.x.patch - -# syslog patch, use syslog instead of nginx logfiles -Patch2: nginx-syslog.patch -#Patch3: nginx-unix-sockets.diff - -%description -Nginx [engine x] is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 -proxy server written by Igor Sysoev. - -One third party module, nginx-upstream-fair, has been added. - -%prep -%setup -q - -%patch0 -p0 -%patch1 -p0 -%patch2 -p1 -# %patch3 -p1 -%{__tar} zxvf %{SOURCE5} - -%build -export DESTDIR=%{buildroot} -./configure \ - --user=%{nginx_user} \ - --group=%{nginx_group} \ - --prefix=%{nginx_datadir} \ - --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 \ - --with-http_sub_module \ - --with-http_dav_module \ - --with-http_flv_module \ - --with-http_gzip_static_module \ - --with-http_stub_status_module \ - --with-mail \ - --with-mail_ssl_module \ - --with-debug \ - --with-cc-opt="-O -pipe -mtune=generic -fomit-frame-pointer $(pcre-config --cflags)" \ - --add-module=%{_builddir}/nginx-%{version}/nginx-upstream-fair -make %{?_smp_mflags} - -mv nginx-upstream-fair/README nginx-upstream-fair/README.nginx-upstream-fair - -%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} -%{__install} -p -D -m 0644 %{SOURCE7} %{buildroot}%{_sysconfdir}/sysconfig/%{name} -%{__install} -p -d -m 0755 %{buildroot}%{nginx_confdir}/conf.d -%{__install} -p -m 0644 %{SOURCE3} %{SOURCE4} %{SOURCE6} %{buildroot}%{nginx_confdir}/conf.d -%{__install} -p -d -m 0755 %{buildroot}%{nginx_home_tmp} -%{__install} -p -d -m 0755 %{buildroot}%{nginx_logdir} -%{__install} -p -d -m 0755 %{buildroot}%{nginx_webroot} -%{__install} -p -m 0644 %{SOURCE100} %{SOURCE101} %{SOURCE102} %{SOURCE103} %{SOURCE104} %{buildroot}%{nginx_webroot} - -# 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 - -%clean -rm -rf %{buildroot} - -%pre -%{_sbindir}/useradd -c "Nginx user" -s /bin/false -r -d %{nginx_home} %{nginx_user} 2>/dev/null || : - -%post -/sbin/chkconfig --add %{name} - -%preun -if [ $1 = 0 ]; then - /sbin/service %{name} stop >/dev/null 2>&1 - /sbin/chkconfig --del %{name} -fi - -%postun -if [ $1 -ge 1 ]; then - /sbin/service %{name} condrestart > /dev/null 2>&1 || : -fi - -%files -%defattr(-,root,root,-) -%doc LICENSE CHANGES README nginx-upstream-fair/README.nginx-upstream-fair -%{nginx_datadir}/ -%{_sbindir}/%{name} -# %{_mandir}/man3/%{name}.3pm.gz -%{_initrddir}/%{name} -%dir %{nginx_confdir} -%dir %{nginx_confdir}/conf.d -%config(noreplace) %{nginx_confdir}/conf.d/*.conf -%config(noreplace) %{nginx_confdir}/win-utf -%config(noreplace) %{nginx_confdir}/%{name}.conf.default -%config(noreplace) %{nginx_confdir}/mime.types.default -%config(noreplace) %{nginx_confdir}/fastcgi_params -%config(noreplace) %{nginx_confdir}/fastcgi_params.default -%config(noreplace) %{nginx_confdir}/fastcgi.conf -%config(noreplace) %{nginx_confdir}/fastcgi.conf.default -%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} -%config(noreplace) %{_sysconfdir}/sysconfig/%{name} -#%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 -* Wed Nov 17 2009 Juergen Gotteswinter <jg at internetx.de> 0.7.64-1 - -- version bump to 0.7.64 - - -* Wed Oct 28 2009 Juergen Gotteswinter <jg at internetx.de> 0.7.63-1 - -- version bump to 0.7.63 - -* Fri Oct 23 2009 Juergen Gotteswinter <jg at internetx.de> 0.7.62-3 -- included nginx-socket-patch for unix socket support |