Changes of Revision 4
[-] | Added | nginx-devel.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 +%define rtmp_ext nginx-rtmp-module 11 +%define rtmp_ext_version 0.9.11 12 +%define rtmp %{rtmp_ext}-%{rtmp_ext_version} 13 +%define rtmp_nover %{rtmp_ext} 14 +%define with_rtmp_ext 1 15 + 16 +Name: nginx-devel 17 +version: 1.3.14 18 +Release: 1 19 +Summary: Robust, small and high performance http and reverse proxy server 20 +Group: System Environment/Daemons 21 + 22 +License: BSD 23 +URL: http://nginx.net/ 24 +BuildRoot: %{_tmppath}/%{name}-%{version}-root 25 + 26 +BuildRequires: pcre-devel,zlib-devel,openssl-devel,perl(ExtUtils::Embed) 27 +Requires: pcre,zlib,openssl 28 +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) 29 +Requires(pre): shadow-utils 30 +Requires(post): chkconfig 31 +Requires(preun): chkconfig, initscripts 32 +Requires(postun): initscripts 33 + 34 +Source0: http://sysoev.ru/nginx/nginx-%{version}.tar.gz 35 +Source1: %{name}.init 36 +Source2: %{name}.logrotate 37 +Source3: virtual.conf 38 +Source4: ssl.conf 39 +Source5: nginx-upstream-fair.tgz 40 +Source6: upstream-fair.conf 41 +Source7: %{name}.sysconfig 42 +Source8: ngx_slowfs_cache-1.5.tar.gz 43 +Source9: Nginx-limit-traffic-rate-module.tar.gz 44 +Source10: %{rtmp}.tar.bz2 45 +Source100: index.html 46 +Source101: poweredby.png 47 +Source102: nginx-logo.png 48 +Source103: 50x.html 49 +Source104: 404.html 50 + 51 +# removes -Werror in upstream build scripts. -Werror conflicts with 52 +# -D_FORTIFY_SOURCE=2 causing warnings to turn into errors. 53 +Patch0: nginx-auto-cc-gcc.patch 54 + 55 +# configuration patch to match all the Fedora paths for logs, pid files 56 +# etc. 57 +Patch1: nginx-conf-0.7.x.patch 58 +Patch2: spdy-69.patch 59 + 60 +# syslog patch, use syslog instead of nginx logfiles 61 +#Patch2: nginx-syslog.patch 62 +#Patch3: nginx-unix-sockets.diff 63 +#Patch4: nginx-versiontilt.patch 64 + 65 +%description 66 +Nginx [engine x] is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 67 +proxy server written by Igor Sysoev. 68 + 69 +One third party module, nginx-upstream-fair, has been added. 70 + 71 +%prep 72 +%setup -q 73 + 74 +%patch0 -p0 75 +%patch1 -p0 76 +%patch2 -p1 77 + 78 +#%patch2 -p1 79 +# %patch3 -p1 80 +#%patch4 -p1 81 +%{__tar} zxvf %{SOURCE5} 82 +%{__tar} zxvf %{SOURCE9} 83 +%{__tar} jxvf %{SOURCE10} 84 + 85 +%build 86 +export 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_mp4_module \ 109 + --with-mail \ 110 + --with-mail_ssl_module \ 111 + --with-debug \ 112 + --with-ipv6 \ 113 + --with-http_spdy_module \ 114 + --with-cc-opt="%{optflags} $(pcre-config --cflags)" \ 115 + --add-module=%{_builddir}/nginx-%{version}/nginx-upstream-fair \ 116 +%if 0%{with_rtmp_ext} 117 + --add-module=%{_builddir}/nginx-%{version}/%{rtmp} \ 118 +%endif 119 + --add-module=%{_builddir}/nginx-%{version}/Nginx-limit-traffic-rate-module 120 +%if 0%{?fedora_version} > 10 121 + --with-file-aio 122 +%endif 123 + 124 +make %{?_smp_mflags} 125 + 126 +mv nginx-upstream-fair/README nginx-upstream-fair/README.nginx-upstream-fair 127 + 128 +%install 129 +rm -rf %{buildroot} 130 +make install DESTDIR=%{buildroot} INSTALLDIRS=vendor 131 +find %{buildroot} -type f -name .packlist -exec rm -f {} \; 132 +find %{buildroot} -type f -name perllocal.pod -exec rm -f {} \; 133 +find %{buildroot} -type f -empty -exec rm -f {} \; 134 +find %{buildroot} -type f -exec chmod 0644 {} \; 135 +find %{buildroot} -type f -name '*.so' -exec chmod 0755 {} \; 136 +chmod 0755 %{buildroot}%{_sbindir}/nginx 137 +%{__install} -p -D -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name} 138 +%{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} 139 +%{__install} -p -D -m 0644 %{SOURCE7} %{buildroot}%{_sysconfdir}/sysconfig/%{name} 140 +%{__install} -p -d -m 0755 %{buildroot}%{nginx_confdir}/conf.d 141 +%{__install} -p -m 0644 %{SOURCE3} %{SOURCE4} %{SOURCE6} %{buildroot}%{nginx_confdir}/conf.d 142 +%{__install} -p -d -m 0755 %{buildroot}%{nginx_home_tmp} 143 +%{__install} -p -d -m 0755 %{buildroot}%{nginx_logdir} 144 +%{__install} -p -d -m 0755 %{buildroot}%{nginx_webroot} 145 +%{__install} -p -m 0644 %{SOURCE100} %{SOURCE101} %{SOURCE102} %{SOURCE103} %{SOURCE104} %{buildroot}%{nginx_webroot} 146 + 147 +# convert to UTF-8 all files that give warnings. 148 +for textfile in CHANGES 149 +do 150 + mv $textfile $textfile.old 151 + iconv --from-code ISO8859-1 --to-code UTF-8 --output $textfile $textfile.old 152 + rm -f $textfile.old 153 +done 154 + 155 +%clean 156 +rm -rf %{buildroot} 157 + 158 +%pre 159 +%{_sbindir}/useradd -c "Nginx user" -s /bin/false -r -d %{nginx_home} %{nginx_user} 2>/dev/null || : 160 + 161 +%post 162 +/sbin/chkconfig --add %{name} 163 + 164 +%preun 165 +if [ $1 = 0 ]; then 166 + /sbin/service %{name} stop >/dev/null 2>&1 167 + /sbin/chkconfig --del %{name} 168 +fi 169 + 170 +%postun 171 +if [ $1 -ge 1 ]; then 172 + /sbin/service %{name} condrestart > /dev/null 2>&1 || : 173 +fi 174 + 175 +%files 176 +%defattr(-,root,root,-) 177 +%doc LICENSE CHANGES README nginx-upstream-fair/README.nginx-upstream-fair 178 +%{nginx_datadir}/ 179 +%{_sbindir}/%{name} 180 +# %{_mandir}/man3/%{name}.3pm.gz 181 +%{_initrddir}/%{name} 182 +%dir %{nginx_confdir} 183 +%dir %{nginx_confdir}/conf.d 184 +%config(noreplace) %{nginx_confdir}/conf.d/*.conf 185 +%config(noreplace) %{nginx_confdir}/win-utf 186 +%config(noreplace) %{nginx_confdir}/%{name}.conf.default 187 +%config(noreplace) %{nginx_confdir}/mime.types.default 188 +%config(noreplace) %{nginx_confdir}/fastcgi_params 189 +%config(noreplace) %{nginx_confdir}/fastcgi_params.default 190 +%config(noreplace) %{nginx_confdir}/fastcgi.conf 191 +%config(noreplace) %{nginx_confdir}/fastcgi.conf.default 192 +%config(noreplace) %{nginx_confdir}/scgi_params 193 +%config(noreplace) %{nginx_confdir}/scgi_params.default 194 +%config(noreplace) %{nginx_confdir}/uwsgi_params 195 +%config(noreplace) %{nginx_confdir}/uwsgi_params.default 196 +%config(noreplace) %{nginx_confdir}/koi-win 197 +%config(noreplace) %{nginx_confdir}/koi-utf 198 +%config(noreplace) %{nginx_confdir}/%{name}.conf 199 +%config(noreplace) %{nginx_confdir}/mime.types 200 +%config(noreplace) %{_sysconfdir}/logrotate.d/%{name} 201 |
||
[+] | Deleted | nginx.spec ^ |
@@ -1,248 +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 -%define rtmp_ext nginx-rtmp-module -%define rtmp_ext_version 0.9.11 -%define rtmp %{rtmp_ext}-%{rtmp_ext_version} -%define rtmp_nover %{rtmp_ext} -%define with_rtmp_ext 1 - -Name: nginx-devel -version: 1.3.14 -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 -Source8: ngx_slowfs_cache-1.5.tar.gz -Source9: Nginx-limit-traffic-rate-module.tar.gz -Source10: %{rtmp}.tar.bz2 -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 -Patch2: spdy-69.patch - -# syslog patch, use syslog instead of nginx logfiles -#Patch2: nginx-syslog.patch -#Patch3: nginx-unix-sockets.diff -#Patch4: nginx-versiontilt.patch - -%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 - -#%patch2 -p1 -# %patch3 -p1 -#%patch4 -p1 -%{__tar} zxvf %{SOURCE5} -%{__tar} zxvf %{SOURCE9} -%{__tar} jxvf %{SOURCE10} - -%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-http_mp4_module \ - --with-mail \ - --with-mail_ssl_module \ - --with-debug \ - --with-ipv6 \ - --with-http_spdy_module \ - --with-cc-opt="%{optflags} $(pcre-config --cflags)" \ - --add-module=%{_builddir}/nginx-%{version}/nginx-upstream-fair \ -%if 0%{with_rtmp_ext} - --add-module=%{_builddir}/nginx-%{version}/%{rtmp} \ -%endif - --add-module=%{_builddir}/nginx-%{version}/Nginx-limit-traffic-rate-module -%if 0%{?fedora_version} > 10 - --with-file-aio -%endif - -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}/scgi_params -%config(noreplace) %{nginx_confdir}/scgi_params.default -%config(noreplace) %{nginx_confdir}/uwsgi_params -%config(noreplace) %{nginx_confdir}/uwsgi_params.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} |