lighttpd-vl.spec 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380
  1. %define webroot /var/www/lighttpd
  2. Summary: Lightning fast webserver with light system requirements
  3. Summary(ja): 少ないシステムリソースで動く超高速なウェブサーバ
  4. Name: lighttpd
  5. Version: 1.4.32
  6. Release: 1%{?_dist_release}
  7. License: BSD
  8. Group: System Environment/Daemons
  9. URL: http://www.lighttpd.net/
  10. Source0: http://www.lighttpd.net/download/lighttpd-%{version}.tar.xz
  11. Source1: lighttpd.logrotate
  12. Source2: php.d-lighttpd.ini
  13. Source3: lighttpd.init
  14. Source10: index.html
  15. Source11: http://www.lighttpd.net/favicon.ico
  16. Source13: http://www.lighttpd.net/light_button.png
  17. Source14: http://www.lighttpd.net/light_logo.png
  18. Patch0: lighttpd-1.4.31-vine.patch
  19. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  20. Requires(pre): shadow-utils
  21. Requires(pre): www-common
  22. Requires(post): chkconfig
  23. Requires(preun): chkconfig
  24. Requires(postun): chkconfig
  25. BuildRequires: openssl-devel, pcre-devel, bzip2-devel, zlib-devel, gcc-c++
  26. %{?_with_ldap:BuildRequires: openldap-devel}
  27. BuildRequires: gamin-devel
  28. BuildRequires: gdbm-devel
  29. BuildRequires: lua-devel
  30. %description
  31. Secure, fast, compliant and very flexible web-server which has been optimized
  32. for high-performance environments. It has a very low memory footprint compared
  33. to other webservers and takes care of cpu-load. Its advanced feature-set
  34. (FastCGI, CGI, Auth, Output-Compression, URL-Rewriting and many more) make
  35. it the perfect webserver-software for every server that is suffering load
  36. problems.
  37. Available rpmbuild rebuild options :
  38. --with : memcache webdavprops ldap
  39. --without: lua
  40. %package mod_mysql_vhost
  41. Summary: Virtual host module for lighttpd that uses a MySQL database
  42. Group: System Environment/Daemons
  43. Requires: %{name} = %{version}
  44. BuildRequires: mysql-devel
  45. %description mod_mysql_vhost
  46. Virtual host module for lighttpd that uses a MySQL database.
  47. %package fastcgi
  48. Summary: FastCGI module and spawning helper for lighttpd and PHP configuration
  49. Group: System Environment/Daemons
  50. Requires: %{name} = %{version}
  51. Requires: spawn-fcgi
  52. %description fastcgi
  53. This package contains the spawn-fcgi helper for lighttpd's automatic spawning
  54. of local FastCGI programs. Included is also a PHP .ini file to change a few
  55. defaults needed for correct FastCGI behavior.
  56. Note that for FastCGI to work with PHP, you will most likely need to find a
  57. tweaked PHP package (--enable-fastcgi and --enable-discard-path added) or
  58. recompile PHP yourself.
  59. %prep
  60. %setup -q
  61. %patch0 -p1 -b .vine
  62. %build
  63. %configure \
  64. --libdir="%{_libdir}/lighttpd" \
  65. --with-mysql \
  66. %{?_with_ldap:--with-ldap} \
  67. --with-openssl \
  68. --with-fam \
  69. --with-gdbm \
  70. --with-pcre \
  71. %{?_with_memcache:--with-memcache} \
  72. %{?_with_webdavprops:--with-webdav-props} \
  73. %{?_with_webdavlocks:--with-webdav-locks} \
  74. %{?!_without_lua:--with-lua}
  75. %{__make}
  76. %install
  77. %{__rm} -rf %{buildroot}
  78. %{__make} install DESTDIR=%{buildroot}
  79. # Install included init script and sysconfig entry
  80. %{__install} -D -p -m 0755 doc/initscripts/rc.lighttpd.redhat \
  81. %{buildroot}%{_sysconfdir}/rc.d/init.d/lighttpd
  82. %{__install} -D -p -m 0644 doc/initscripts/sysconfig.lighttpd \
  83. %{buildroot}%{_sysconfdir}/sysconfig/lighttpd
  84. # Install (*patched above*) sample config file
  85. %{__install} -D -p -m 0640 doc/config/lighttpd.conf \
  86. %{buildroot}%{_sysconfdir}/lighttpd/lighttpd.conf
  87. %{__install} -D -p -m 0640 doc/config/modules.conf \
  88. %{buildroot}%{_sysconfdir}/lighttpd/modules.conf
  89. mkdir -p %{buildroot}%{_sysconfdir}/lighttpd/conf.d/
  90. %{__install} -D -p -m 0640 doc/config/conf.d/*.conf \
  91. %{buildroot}%{_sysconfdir}/lighttpd/conf.d/
  92. mkdir -p %{buildroot}%{_sysconfdir}/lighttpd/vhosts.d/
  93. %{__install} -D -p -m 0640 doc/config/vhosts.d/vhosts.template \
  94. %{buildroot}%{_sysconfdir}/lighttpd/vhosts.d/
  95. # Install our own logrotate entry
  96. %{__install} -D -p -m 0644 %{SOURCE1} \
  97. %{buildroot}%{_sysconfdir}/logrotate.d/lighttpd
  98. # Install our own php.d ini file
  99. %{__install} -D -p -m 0644 %{SOURCE2} \
  100. %{buildroot}%{_sysconfdir}/php.d/lighttpd.ini
  101. # Install our own init script
  102. %{__install} -D -p -m 0755 %{SOURCE3} \
  103. %{buildroot}%{_sysconfdir}/rc.d/init.d/lighttpd
  104. # Install our own default web page and images
  105. %{__mkdir_p} %{buildroot}%{webroot}
  106. %{__install} -p -m 0644 %{SOURCE10} %{SOURCE11} %{SOURCE13} \
  107. %{SOURCE14} \
  108. %{buildroot}%{webroot}/
  109. # Install empty log directory to include
  110. %{__mkdir_p} %{buildroot}%{_var}/log/lighttpd
  111. # Install empty run directory to include (for the example fastcgi socket)
  112. %{__mkdir_p} %{buildroot}%{_var}/run/lighttpd
  113. %clean
  114. %{__rm} -rf %{buildroot}
  115. %post
  116. /sbin/chkconfig --add lighttpd
  117. %preun
  118. if [ $1 -eq 0 ]; then
  119. /sbin/service lighttpd stop &>/dev/null || :
  120. /sbin/chkconfig --del lighttpd
  121. fi
  122. %postun
  123. if [ $1 -ge 1 ]; then
  124. /sbin/service lighttpd condrestart &>/dev/null || :
  125. fi
  126. %files
  127. %defattr(-, root, root, 0755)
  128. %doc AUTHORS NEWS COPYING README
  129. %doc doc/config/lighttpd.conf
  130. %dir %{_sysconfdir}/lighttpd/
  131. %config(noreplace) %{_sysconfdir}/lighttpd/lighttpd.conf
  132. %config(noreplace) %{_sysconfdir}/lighttpd/modules.conf
  133. %config(noreplace) %{_sysconfdir}/lighttpd/conf.d/*
  134. %config(noreplace) %{_sysconfdir}/lighttpd/vhosts.d/*
  135. %config(noreplace) %{_sysconfdir}/logrotate.d/lighttpd
  136. %config(noreplace) %{_sysconfdir}/sysconfig/lighttpd
  137. %{_sysconfdir}/rc.d/init.d/lighttpd
  138. %{_sbindir}/lighttpd
  139. %{_sbindir}/lighttpd-angel
  140. %{_libdir}/lighttpd/
  141. %exclude %{_libdir}/lighttpd/*.la
  142. %exclude %{_libdir}/lighttpd/mod_fastcgi.so
  143. %exclude %{_libdir}/lighttpd/mod_mysql_vhost.so
  144. %exclude %{_sysconfdir}/lighttpd/conf.d/fastcgi.conf
  145. %exclude %{_sysconfdir}/lighttpd/conf.d/mysql_vhost.conf
  146. %{_mandir}/man8/lighttpd.8*
  147. %attr(0750, www-data, www-data) %{_var}/log/lighttpd/
  148. %{webroot}/
  149. %files mod_mysql_vhost
  150. %defattr(-, root, root, 0755)
  151. %doc doc/mysqlvhost.txt
  152. %dir %{_libdir}/lighttpd/
  153. %{_sysconfdir}/lighttpd/conf.d/mysql_vhost.conf
  154. %{_libdir}/lighttpd/mod_mysql_vhost.so
  155. %files fastcgi
  156. %defattr(-, root, root, 0755)
  157. %config(noreplace) %{_sysconfdir}/php.d/lighttpd.ini
  158. %dir %{_libdir}/lighttpd/
  159. %{_libdir}/lighttpd/mod_fastcgi.so
  160. %{_sysconfdir}/lighttpd/conf.d/fastcgi.conf
  161. %changelog
  162. * Thu Nov 29 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.32-1
  163. - new upstream release
  164. * Wed Oct 24 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.31-1
  165. - update to 1.4.31
  166. - build with pcre-8.31
  167. - require www-common, change docroot owner to www-data
  168. * Sun Feb 06 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.4.22-2
  169. - rebuild with openssl-1.0.0c
  170. * Fri Jun 05 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.22-1
  171. - new upstream release
  172. - build with lua, add BR: lua-devel
  173. - update init script
  174. * Fri May 22 2009 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.20-2
  175. - rebuilt with MySQL-5.1.34.
  176. * Wed Oct 08 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.4.20-1
  177. - updated to 1.4.20 release with many bug/security fixes, including:
  178. - CVE-2008-4298: fix memory leak in request header handling
  179. - CVE-2008-4360: fix mod_userdir information disclosure
  180. - CVE-2008-4359: fix bypassing rewrite/redirect rules with encoded urls
  181. - CVE-2008-1531: fix DoS of ssl connections
  182. - modified Patch0 for version 1.4.20
  183. - add %{_sbindir}/lighttpd-angel to the filelist
  184. * Fri Oct 03 2008 Shu KONNO <owa@bg.wakwak.com> 1.4.16-1vl5
  185. - applied new versioning policy, spec in utf-8
  186. * Tue Jul 31 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.16-0vl1
  187. - new upstream release
  188. * Fri Nov 03 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.13-0vl1
  189. - initial build for Vine Linux
  190. * Wed Oct 11 2006 Matthias Saou <http://freshrpms.net/> 1.4.13-1
  191. - Update to 1.4.13, which contains the previous fix.
  192. * Tue Oct 3 2006 Matthias Saou <http://freshrpms.net/> 1.4.12-3
  193. - Include fix for segfaults (lighttpd bug #876, changeset 1352).
  194. * Mon Sep 25 2006 Matthias Saou <http://freshrpms.net/> 1.4.12-1
  195. - Update to 1.4.12 final.
  196. * Fri Sep 22 2006 Matthias Saou <http://freshrpms.net/> 1.4.12-0.1.r1332
  197. - Update to latest 1.4.12 pre-release, fixes SSL issues and other bugs.
  198. - Update powered_by_fedora.png to the new logo.
  199. * Mon Aug 28 2006 Matthias Saou <http://freshrpms.net/> 1.4.11-2
  200. - FC6 rebuild.
  201. * Thu Mar 9 2006 Matthias Saou <http://freshrpms.net/> 1.4.11-1
  202. - Update to 1.4.11.
  203. * Mon Mar 6 2006 Matthias Saou <http://freshrpms.net/> 1.4.10-2
  204. - FC5 rebuild.
  205. * Wed Feb 8 2006 Matthias Saou <http://freshrpms.net/> 1.4.10-1
  206. - Update to 1.4.10.
  207. - Remove now included fix.
  208. * Wed Jan 25 2006 Matthias Saou <http://freshrpms.net/> 1.4.9-2
  209. - Add mod_fastcgi-fix patch to fix crash on backend overload.
  210. * Mon Jan 16 2006 Matthias Saou <http://freshrpms.net/> 1.4.9-1
  211. - Update to 1.4.9.
  212. * Wed Nov 23 2005 Matthias Saou <http://freshrpms.net/> 1.4.8-1
  213. - Update to 1.4.8.
  214. * Fri Nov 4 2005 Matthias Saou <http://freshrpms.net/> 1.4.7-1
  215. - Update to 1.4.7.
  216. * Wed Oct 12 2005 Matthias Saou <http://freshrpms.net/> 1.4.6-1
  217. - Update to 1.4.6.
  218. * Mon Oct 3 2005 Matthias Saou <http://freshrpms.net/> 1.4.5-1
  219. - Update to 1.4.5.
  220. - Disable gamin/fam support for now, it does not work.
  221. * Tue Sep 27 2005 Matthias Saou <http://freshrpms.net/> 1.4.4-3
  222. - Update to current SVN to check if it fixes the remaining load problems.
  223. * Wed Sep 21 2005 Matthias Saou <http://freshrpms.net/> 1.4.4-2
  224. - Patch to SVN 722 revision : Fixes a crash in mod_mysql_vhost and a problem
  225. with keepalive and certain browsers.
  226. * Mon Sep 19 2005 Matthias Saou <http://freshrpms.net/> 1.4.4-1
  227. - Update to 1.4.4 final.
  228. - Enable ldap auth, gdbm and gamin/fam support by default.
  229. * Thu Sep 15 2005 Matthias Saou <http://freshrpms.net/> 1.4.4-0
  230. - Update to 1.4.4 pre-release (fixes another fastcgi memleak).
  231. - Enable lua (cml module) by default.
  232. - Add --with-webdav-props conditional option.
  233. * Tue Sep 13 2005 Matthias Saou <http://freshrpms.net/> 1.4.3-2
  234. - Include lighttpd-1.4.3-stat_cache.patch to fix memleak.
  235. * Fri Sep 2 2005 Matthias Saou <http://freshrpms.net/> 1.4.3-1.1
  236. - Rearrange the included index.html to include the new logo, button and
  237. favicon from lighttpd.net.
  238. * Fri Sep 2 2005 Matthias Saou <http://freshrpms.net/> 1.4.3-1
  239. - Update to 1.4.3.
  240. - No longer override libdir at make install stage, use DESTDIR instead, as
  241. the resulting binary would now have referenced to %%{buildroot} :-(
  242. * Tue Aug 30 2005 Matthias Saou <http://freshrpms.net/> 1.4.2-1
  243. - Update to 1.4.2.
  244. * Mon Aug 22 2005 Matthias Saou <http://freshrpms.net/> 1.4.1-1
  245. - Update to 1.4.1.
  246. * Sun Aug 21 2005 Matthias Saou <http://freshrpms.net/> 1.4.0-1
  247. - Update to 1.4.0.
  248. - Add conditional of gamin, gdbm, memcache and lua options.
  249. * Mon Aug 1 2005 Matthias Saou <http://freshrpms.net/> 1.3.16-2
  250. - Update to 1.3.16, rebuild.
  251. * Mon Jul 18 2005 Matthias Saou <http://freshrpms.net/> 1.3.15-1
  252. - Update to 1.3.15.
  253. * Mon Jun 20 2005 Matthias Saou <http://freshrpms.net/> 1.3.14-1
  254. - Update to 1.3.14.
  255. * Sun May 22 2005 Jeremy Katz <katzj@redhat.com> - 1.3.13-5
  256. - rebuild on all arches
  257. * Mon Apr 4 2005 Matthias Saou <http://freshrpms.net/> 1.3.13-4
  258. - Change signal sent from the logrotate script from USR1 to HUP, as that's the
  259. correct one.
  260. * Fri Apr 1 2005 Michael Schwendt <mschwendt[AT]users.sf.net> 1.3.13-2
  261. - Include /etc/lighttpd directory.
  262. * Sun Mar 6 2005 Matthias Saou <http://freshrpms.net/> 1.3.13-1
  263. - Update to 1.3.13.
  264. * Wed Mar 2 2005 Matthias Saou <http://freshrpms.net/> 1.3.12-1
  265. - Update to 1.3.12.
  266. - Remove obsolete empty_cgi_handler patch.
  267. * Tue Mar 1 2005 Matthias Saou <http://freshrpms.net/> 1.3.11-2
  268. - Add missing defattr to sub-packages (#150018).
  269. * Mon Feb 21 2005 Matthias Saou <http://freshrpms.net/> 1.3.11-0
  270. - Update to 1.3.11.
  271. - Remove cleanconf and init.d patches (merged upstream).
  272. - Add empty_cgi_handler patch.
  273. * Fri Feb 18 2005 Matthias Saou <http://freshrpms.net/> 1.3.10-0
  274. - Split off -fastcgi sub-package.
  275. - Include php.d entry to set sane FastCGI defaults.
  276. * Wed Feb 16 2005 Matthias Saou <http://freshrpms.net/> 1.3.10-0
  277. - Spec file cleanup for freshrpms.net/Extras.
  278. - Compile OpenSSL support unconditionally.
  279. - Put modules in a subdirectory of libdir.
  280. - Don't include all of libdir's content to avoid debuginfo content.
  281. - Add optional LDAP support.
  282. - Add patch to change the default configuration.
  283. - Add dedicated lighttpd user/group creation.
  284. - Add logrotate entry.
  285. - Include a nice little default page for the default setup.
  286. - Split off mod_mysql_vhost sub-package, get dep only there.
  287. - Use webroot in /srv by default.
  288. - Exclude .la files, I doubt anyone will need them.
  289. * Thu Sep 30 2004 <jan@kneschke.de> 1.3.1
  290. - upgraded to 1.3.1
  291. * Tue Jun 29 2004 <jan@kneschke.de> 1.2.3
  292. - rpmlint'ed the package
  293. - added URL
  294. - added (noreplace) to start-script
  295. - change group to Networking/Daemon (like apache)
  296. * Sun Feb 23 2003 <jan@kneschke.de>
  297. - initial version