[521] | 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 | |
---|
| 10 | Summary: Robust, small and high performance http and reverse proxy server |
---|
| 11 | Summary(ja): 堅牢・軽量・高性能な HTTP およびリバースプロキシサーバ |
---|
| 12 | Name: nginx |
---|
| 13 | Version: 0.7.63 |
---|
| 14 | Release: 1%{?_dist_release} |
---|
| 15 | |
---|
| 16 | Group: System Environment/Daemons |
---|
| 17 | # BSD License (two clause) |
---|
| 18 | # http://www.freebsd.org/copyright/freebsd-license.html |
---|
| 19 | License: BSD |
---|
| 20 | URL: http://nginx.net/ |
---|
| 21 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
---|
| 22 | |
---|
| 23 | BuildRequires: pcre-devel |
---|
| 24 | BuildRequires: zlib-devel |
---|
| 25 | BuildRequires: openssl-devel |
---|
| 26 | BuildRequires: perl |
---|
| 27 | BuildRequires: perl(ExtUtils::Embed) |
---|
| 28 | Requires: pcre |
---|
| 29 | Requires: zlib |
---|
| 30 | Requires: openssl |
---|
| 31 | %if "%{?_dist_release}" == "vl4" |
---|
| 32 | Requires: perl >= 5.8.6 |
---|
| 33 | %else |
---|
| 34 | Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) |
---|
| 35 | %endif |
---|
| 36 | # for /usr/sbin/useradd |
---|
| 37 | Requires(pre): shadow-utils |
---|
| 38 | Requires(post): chkconfig |
---|
| 39 | # for /sbin/service |
---|
| 40 | Requires(preun): chkconfig, initscripts |
---|
| 41 | Requires(postun): initscripts |
---|
| 42 | |
---|
| 43 | Source0: http://sysoev.ru/nginx/nginx-%{version}.tar.gz |
---|
| 44 | Source1: %{name}.init |
---|
| 45 | Source2: %{name}.logrotate |
---|
| 46 | Source3: nginx-virtual.conf |
---|
| 47 | Source4: nginx-ssl.conf |
---|
| 48 | Source5: %{name}.sysconfig |
---|
| 49 | Source100: nginx-index.html |
---|
| 50 | Source101: poweredby-vine.png |
---|
| 51 | Source102: nginx-logo.png |
---|
| 52 | Source103: nginx-50x.html |
---|
| 53 | Source104: 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. |
---|
| 57 | Patch0: nginx-auto-cc-gcc.patch |
---|
| 58 | |
---|
| 59 | # configuration patch to match all the Vine Linux paths for logs, pid files |
---|
| 60 | # etc. |
---|
| 61 | Patch1: nginx-conf.patch |
---|
| 62 | |
---|
| 63 | %description |
---|
| 64 | Nginx [engine x] is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 |
---|
| 65 | proxy server written by Igor Sysoev. |
---|
| 66 | |
---|
| 67 | %description -l ja |
---|
| 68 | Nginx [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. |
---|
| 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_perl_module \ |
---|
| 109 | --with-mail \ |
---|
| 110 | --with-mail_ssl_module \ |
---|
| 111 | --with-cc-opt="%{optflags} $(pcre-config --cflags)" |
---|
| 112 | make %{?_smp_mflags} |
---|
| 113 | |
---|
| 114 | %install |
---|
| 115 | rm -rf %{buildroot} |
---|
| 116 | make install DESTDIR=%{buildroot} INSTALLDIRS=vendor |
---|
| 117 | find %{buildroot} -type f -name .packlist -exec rm -f {} \; |
---|
| 118 | find %{buildroot} -type f -name perllocal.pod -exec rm -f {} \; |
---|
| 119 | find %{buildroot} -type f -empty -exec rm -f {} \; |
---|
| 120 | find %{buildroot} -type f -exec chmod 0644 {} \; |
---|
| 121 | find %{buildroot} -type f -name '*.so' -exec chmod 0755 {} \; |
---|
| 122 | chmod 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. |
---|
| 139 | for textfile in CHANGES |
---|
| 140 | do |
---|
| 141 | mv $textfile $textfile.old |
---|
| 142 | iconv --from-code ISO8859-1 --to-code UTF-8 --output $textfile $textfile.old |
---|
| 143 | rm -f $textfile.old |
---|
| 144 | done |
---|
| 145 | |
---|
| 146 | %clean |
---|
| 147 | rm -rf %{buildroot} |
---|
| 148 | |
---|
| 149 | %pre |
---|
| 150 | if [ $1 == 1 ]; then |
---|
| 151 | %{_sbindir}/useradd -c "Nginx user" -s /bin/false -r -d %{nginx_home} %{nginx_user} 2>/dev/null || : |
---|
| 152 | fi |
---|
| 153 | |
---|
| 154 | %post |
---|
| 155 | if [ $1 == 1 ]; then |
---|
| 156 | /sbin/chkconfig --add %{name} |
---|
| 157 | fi |
---|
| 158 | |
---|
| 159 | %preun |
---|
| 160 | if [ $1 = 0 ]; then |
---|
| 161 | /sbin/service %{name} stop >/dev/null 2>&1 |
---|
| 162 | /sbin/chkconfig --del %{name} |
---|
| 163 | fi |
---|
| 164 | |
---|
| 165 | %postun |
---|
| 166 | if [ $1 == 2 ]; then |
---|
| 167 | /sbin/service %{name} upgrade || : |
---|
| 168 | fi |
---|
| 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 |
---|