lighttpd-vl.spec 11 KB

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