nginx-vl.spec 12 KB

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