Search
j0ke.net Open Build Service
>
Projects
>
ha
>
lighttpd
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 44
[-]
[+]
Added
lighttpd-RHEL_6.spec
@@ -0,0 +1,298 @@ +# $Id: lighttpd.spec 6519 2008-10-16 09:44:54Z cmr $ +# Authority: dag + +%{?dtag: %{expand: %%define %dtag 1}} +%{?el5:%define _without_lua 1} +%{?el4:%define _without_lua 1} +%{?el3:%define _without_lua 1} +%{?rh9:%define _without_lua 1} + +%{?rh7:%define _without_lua 1} +%{?rh7:%define _without_ssl 1} + +%{?el2:%define _without_lua 1} +%{?el2:%define _without_ssl 1} + +%define webroot /srv/www/lighttpd + +Summary: Lightning fast webserver with light system requirements +Name: lighttpd +Version: 1.4.28 +Release: 14 +License: BSD +Group: System Environment/Daemons +URL: http://www.lighttpd.net/ + +Packager: Dag Wieers <dag@wieers.com> +Vendor: Dag Apt Repository, http://dag.wieers.com/apt/ + +Source: http://www.lighttpd.net/download/lighttpd-%{version}.tar.bz2 +##Patch0: lighttpd-1.4.23-defaultconf.patch +## included in 1.4.27 +##Patch1: lighttpd-ssl-retval-fix.patch +## included in 1.4.23 +##Patch1: log-cronolog2.diff +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root + +BuildRequires: pcre-devel, bzip2-devel, zlib-devel, readline-devel +BuildRequires: gawk +%{?_with_gamin:BuildRequires: gamin-devel} +%{!?_without_gdbm:BuildRequires: gdbm-devel} +%{!?_without_lua:BuildRequires: lua-devel >= 5.1} +%{!?_without_ldap:BuildRequires: openldap-devel} +%{!?_without_ssl:BuildRequires: openssl-devel} +Requires(pre): /usr/sbin/useradd +Requires(post): /sbin/chkconfig +Requires(preun): /sbin/service, /sbin/chkconfig +Requires(postun): /sbin/service + +%description +Secure, fast, compliant and very flexible web-server which has been optimized +for high-performance environments. It has a very low memory footprint compared +to other webservers and takes care of cpu-load. Its advanced feature-set +(FastCGI, CGI, Auth, Output-Compression, URL-Rewriting and many more) make +it the perfect webserver-software for every server that is suffering load +problems. + +Available rpmbuild rebuild options : +--with : gamin webdavprops webdavlocks memcache +--without : ldap gdbm lua (cml) ssl + +%package mod_mysql_vhost +Summary: Virtual host module for lighttpd that uses a MySQL database +Group: System Environment/Daemons +Requires: %{name} = %{version}-%{release} +BuildRequires: mysql-devel + +%description mod_mysql_vhost +Virtual host module for lighttpd that uses a MySQL database. + +%package fastcgi +Summary: FastCGI module and spawning helper for lighttpd and PHP configuration +Group: System Environment/Daemons +Requires: %{name} = %{version}-%{release} + +%description fastcgi +This package contains the spawn-fcgi helper for lighttpd's automatic spawning +of local FastCGI programs. Included is also a PHP .ini file to change a few +defaults needed for correct FastCGI behavior. +Note that for FastCGI to work with PHP, you will most likely need to find a +tweaked PHP package (--enable-fastcgi and --enable-discard-path added) or +recompile PHP yourself. + +%prep +%setup +##patch0 -p1 -b .defaultconf +##patch1 -p1 -b .sslretvalfix +##%patch1 -p0 -b .cronolog2 + +%{__cat} <<EOF >lighttpd.logrotate +%{_localstatedir}/log/lighttpd/*log { + missingok + notifempty + sharedscripts + postrotate + /bin/kill -HUP $(cat %{_localstatedir}/run/lighttpd.pid 2>/dev/null) 2>/dev/null || : + endscript +} +EOF + +%{__cat} <<EOF >php.d-lighttpd.ini +; Required so that PHP_SELF gets set correctly when using PHP through +; FastCGI with lighttpd (see main php.ini for more about this option) +cgi.fix_pathinfo = 1 +EOF + +%build +%configure \ + --libdir="%{_libdir}/lighttpd" \ + --program-prefix="%{?_program_prefix}" \ + %{?_with_gamin:--with-fam} \ + %{!?_without_gdbm:--with-gdbm} \ + %{!?_without_ldap:--with-ldap} \ + %{?!_without_lua:--with-lua} \ + %{?_with_memcache:--with-memcache} \ + --with-mysql \ + %{?_without_ssl:--without-openssl} \ + %{!?_without_ssl:--with-openssl} \ + %{?_with_webdavlocks:--with-webdav-locks} \ + %{?_with_webdavprops:--with-webdav-props} +%{__make} %{?_smp_mflags} + +%install +%{__rm} -rf %{buildroot} +%{__make} install DESTDIR="%{buildroot}" + +### Install included init script and sysconfig entry +%{__install} -Dp -m0755 doc/initscripts/rc.lighttpd.redhat %{buildroot}%{_sysconfdir}/rc.d/init.d/lighttpd +%{__install} -Dp -m0644 doc/initscripts/sysconfig.lighttpd %{buildroot}%{_sysconfdir}/sysconfig/lighttpd + +### Install (*patched above*) sample config file +%{__install} -Dp -m0640 doc/config/lighttpd.conf %{buildroot}%{_sysconfdir}/lighttpd/lighttpd.conf +%{__install} -m0755 -d %{buildroot}%{_sysconfdir}/lighttpd/conf.d/ +%{__install} -m0755 -d %{buildroot}%{_sysconfdir}/lighttpd/vhosts.d/ +%{__install} -p -m0640 doc/config/conf.d/*.conf %{buildroot}%{_sysconfdir}/lighttpd/conf.d/ +%{__install} -p -m0640 doc/config/vhosts.d/vhosts.template %{buildroot}%{_sysconfdir}/lighttpd/vhosts.d/ + +### Install our own logrotate entry +%{__install} -Dp -m0644 lighttpd.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/lighttpd + +### Install our own php.d ini file +%{__install} -Dp -m0644 php.d-lighttpd.ini %{buildroot}%{_sysconfdir}/php.d/lighttpd.ini + +### Install empty log directory to include +%{__install} -d -m0755 %{buildroot}%{_localstatedir}/log/lighttpd + +### Install empty run directory to include (for the example fastcgi socket) +%{__install} -d -m0755 %{buildroot}%{_localstatedir}/run/lighttpd + +### Create an empty document root +%{__install} -d -m0755 %{buildroot}%{webroot} + + +%pre +/usr/sbin/useradd -s /sbin/nologin -M -r -d %{webroot} \ + -c "lighttpd web server" lighttpd &>/dev/null || : + +%post +/sbin/chkconfig --add lighttpd + +%preun +if [ $1 -eq 0 ]; then + /sbin/service lighttpd stop &>/dev/null || : + /sbin/chkconfig --del lighttpd +fi + +%postun +if [ $1 -ge 1 ]; then + /sbin/service lighttpd condrestart &>/dev/null || : +fi + +%clean +%{__rm} -rf %{buildroot} + +%files +%defattr(-, root, root, 0755) +%doc AUTHORS COPYING README +%doc doc/*.txt tests/lighttpd.conf tests/lighttpd.user +%doc %{_mandir}/man8/lighttpd.8* +%dir %{_sysconfdir}/lighttpd/ +%dir %{_sysconfdir}/lighttpd/conf.d/ +%dir %{_sysconfdir}/lighttpd/vhosts.d/ +%config(noreplace) %{_sysconfdir}/lighttpd/lighttpd.conf +%config(noreplace) %{_sysconfdir}/lighttpd/conf.d/*.conf +%config %{_sysconfdir}/lighttpd/vhosts.d/vhosts.template +%config(noreplace) %{_sysconfdir}/logrotate.d/lighttpd +%config(noreplace) %{_sysconfdir}/sysconfig/lighttpd +%{_sysconfdir}/rc.d/init.d/lighttpd +%{_sbindir}/lighttpd +%{_sbindir}/lighttpd-angel +%{_libdir}/lighttpd/ +%{webroot}/ +%exclude %{_libdir}/lighttpd/*.la +%exclude %{_libdir}/lighttpd/mod_fastcgi.so +%exclude %{_libdir}/lighttpd/mod_mysql_vhost.so + +%defattr(-, lighttpd, lighttpd, 0750) +%{_localstatedir}/log/lighttpd/ + +%files mod_mysql_vhost