]> git.pld-linux.org Git - packages/lighttpd.git/blobdiff - lighttpd.spec
- svn 1154 is known to build
[packages/lighttpd.git] / lighttpd.spec
index 39db891dbf321ee01c9b09f6d69012d90a803211..3cd21f6ee0ad347a44b7cdc116e29beaadbdbeb3 100644 (file)
 %bcond_without ssl             # ssl support
 %bcond_with    mysql           # mysql support in mod_mysql_vhost
 %bcond_with    ldap            # ldap support in mod_auth
-%bcond_with    lua             # LUA support in mod_cml
+%bcond_without lua             # LUA support in mod_cml
 %bcond_with    memcache        # memcached support in mod_cml / mod_trigger_b4_dl
-%bcond_with    gamin           # gamin for reducing number of stat() calls. 
+%bcond_with    gamin           # gamin for reducing number of stat() calls.
                                # NOTE: must be enabled in config: server.stat-cache-engine = "fam"
 %bcond_with    gdbm            # gdbm in mod_trigger_b4_dl
 %bcond_with    webdav_props    # properties in mod_webdav (includes extra sqlite3/libxml deps)
 %bcond_with    valgrind        # compile code with valgrind support.
 
 # Prerelease snapshot: DATE-TIME
-#define _snap 20050116-1743
+#define _snap 20060104-1523
 
 %if 0%{?_snap}
 %define _source http://www.lighttpd.net/download/%{name}-%{version}-%{_snap}.tar.gz
 %define _source http://www.lighttpd.net/download/%{name}-%{version}.tar.gz
 %endif
 
-%define                _rel 2
+%define                _rel 3
 
 Summary:       Fast and light HTTP server
 Summary(pl):   Szybki i lekki serwer HTTP
 Name:          lighttpd
-Version:       1.4.8
+Version:       1.4.11
 Release:       %{_rel}%{?_snap:.%(echo %{_snap}|tr - _)}
-Group:         Networking/Daemons
 License:       BSD
+Group:         Networking/Daemons
 Source0:       %{_source}
-# Source0-md5: 7d7790ef95ff5755f73bfcda4f13696d
+# Source0-md5: f55eebb9815c94a7de35906bb557ecd3
 Source1:       %{name}.init
 Source2:       %{name}.conf
 Source3:       %{name}.user
@@ -61,7 +61,10 @@ Source9:     http://www.lighttpd.net/light_logo.png
 # Source9-md5: ac20784510e420d5cbe5fc1cdb53d7a7
 Source10:      http://gdl.hopto.org/~spider/pldstats/gfx/pld1.png
 # Source10-md5:        486ecec3f6f4fe7f9bf7cee757b864f4
-Source11:      lighttpd-pld.html
+Source11:      %{name}-pld.html
+Patch0:                %{name}-mod_deflate.patch
+Patch1:                %{name}-use_bin_sh.patch
+Patch2:                %{name}-initgroups.patch
 URL:           http://www.lighttpd.net/
 %{?with_xattr:BuildRequires:   attr-devel}
 BuildRequires: autoconf
@@ -72,7 +75,6 @@ BuildRequires:        bzip2-devel
 %{?with_memcache:BuildRequires:        libmemcache-devel}
 BuildRequires: libtool
 %{?with_webdav_props:BuildRequires:    libxml2-devel}
-%{?with_webdav_props:BuildRequires:    sqlite3-devel}
 %{?with_lua:BuildRequires:     lua50-devel >= 5.0.2-5.1}
 BuildRequires: mailcap >= 2.1.14-4.4
 %{?with_mysql:BuildRequires:   mysql-devel}
@@ -80,23 +82,24 @@ BuildRequires:      mailcap >= 2.1.14-4.4
 %{?with_ssl:BuildRequires:     openssl-devel}
 BuildRequires: pcre-devel
 BuildRequires: pkgconfig
-BuildRequires: rpmbuild(macros) >= 1.202
+BuildRequires: rpmbuild(macros) >= 1.268
+%{?with_webdav_props:BuildRequires:    sqlite3-devel}
 %{?with_valgrind:BuildRequires:        valgrind}
 BuildRequires: zlib-devel
-PreReq:                rc-scripts
-Requires(pre): sh-utils
+Requires(post,preun):  /sbin/chkconfig
+Requires(postun):      /usr/sbin/groupdel
+Requires(postun):      /usr/sbin/userdel
 Requires(pre): /bin/id
 Requires(pre): /usr/bin/getgid
 Requires(pre): /usr/sbin/groupadd
 Requires(pre): /usr/sbin/useradd
-Requires(post,preun):  /sbin/chkconfig
-Requires(postun):      /usr/sbin/groupdel
-Requires(postun):      /usr/sbin/userdel
+Requires:      rc-scripts
 Provides:      group(http)
 Provides:      group(lighttpd)
-Provides:      httpd
 Provides:      user(lighttpd)
 Provides:      webserver
+# for the posttrans scriptlet, conflicts because in vserver environment rpm package is not installed.
+Conflicts:     rpm < 4.4.2-0.2
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _libdir         %{_prefix}/%{_lib}/%{name}
@@ -241,6 +244,9 @@ pomocy serwera WWW ani samego programu.
 
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
 install %{SOURCE6} mime.types.sh
 
 # build mime.types.conf
@@ -272,7 +278,7 @@ install %{SOURCE6} mime.types.sh
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_lighttpddir}/{cgi-bin,html},/etc/{logrotate.d,rc.d/init.d,sysconfig}} \
        $RPM_BUILD_ROOT%{_sysconfdir}/webapps.d \
-       $RPM_BUILD_ROOT/var/log/{%{name},archiv/%{name}}
+       $RPM_BUILD_ROOT{/var/log/{%{name},archiv/%{name}},/var/run/%{name}}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
@@ -307,17 +313,10 @@ rm -rf $RPM_BUILD_ROOT
 
 %post
 /sbin/chkconfig --add %{name}
-if [ -f /var/lock/subsys/%{name} ]; then
-       /etc/rc.d/init.d/%{name} restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon."
-fi
 
 %preun
 if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/%{name} ]; then
-               /etc/rc.d/init.d/%{name} stop 1>&2
-       fi
+       %service %{name} stop
        /sbin/chkconfig --del %{name}
 fi
 
@@ -328,6 +327,44 @@ if [ "$1" = "0" ]; then
        %groupremove http
 fi
 
+%posttrans
+# minimizing lighttpd restarts logics. we restart webserver:
+#
+# 1. at the end of transaction. (posttrans, feature from rpm 4.4.2)
+# 2. first install of module (post: $1 = 1)
+# 2. uninstall of module (postun: $1 == 0)
+#
+# the strict internal deps between lighttpd modules and
+# main package are very important for all this to work.
+%service %{name} restart "LigHTTPd webserver"
+exit 0
+
+# macro called at module post scriptlet
+%define        module_post \
+if [ "$1" = "1" ]; then \
+       %service -q lighttpd restart \
+fi
+
+# macro called at module postun scriptlet
+%define        module_postun \
+if [ "$1" = "0" ]; then \
+       %service -q lighttpd restart \
+fi
+
+# it's sooo annoying to write them
+%define        module_scripts() \
+%post %1 \
+%module_post \
+\
+%postun %1 \
+%module_postun
+
+%module_scripts mod_compress
+%module_scripts mod_cml
+%module_scripts mod_mysql_vhost
+%module_scripts mod_trigger_b4_dl
+%module_scripts mod_webdav
+
 %triggerpostun -- %{name} <= 1.3.6-2
 # upgraded
 if [ "$1" = "2" ]; then
@@ -341,15 +378,15 @@ fi
 %defattr(644,root,root,755)
 %doc NEWS README ChangeLog doc/lighttpd.conf doc/*.txt doc/rrdtool-graph.sh
 %dir %attr(750,root,lighttpd) %{_sysconfdir}
-# FIXME: accessible by webapps?
-%dir %attr(750,root,lighttpd) %{_sysconfdir}/webapps.d
+%dir %attr(750,root,root) %{_sysconfdir}/webapps.d
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mime.types.conf
 %attr(640,root,lighttpd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.user
 
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
 %attr(750,root,root) %dir /var/log/archiv/%{name}
-%dir %attr(750,lighttpd,root) /var/log/%{name}
+%dir %attr(770,root,lighttpd) /var/log/%{name}
+%dir %attr(770,root,lighttpd) /var/run/%{name}
 %attr(754,root,root) /etc/rc.d/init.d/%{name}
 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
 %attr(755,root,root) %{_sbindir}/*
@@ -359,10 +396,13 @@ fi
 %attr(755,root,root) %{_libdir}/mod_alias.so
 %attr(755,root,root) %{_libdir}/mod_auth.so
 %attr(755,root,root) %{_libdir}/mod_cgi.so
+%attr(755,root,root) %{_libdir}/mod_deflate.so
 %attr(755,root,root) %{_libdir}/mod_dirlisting.so
+%attr(755,root,root) %{_libdir}/mod_evasive.so
 %attr(755,root,root) %{_libdir}/mod_evhost.so
 %attr(755,root,root) %{_libdir}/mod_expire.so
 %attr(755,root,root) %{_libdir}/mod_fastcgi.so
+%attr(755,root,root) %{_libdir}/mod_flv_streaming.so
 %attr(755,root,root) %{_libdir}/mod_indexfile.so
 %attr(755,root,root) %{_libdir}/mod_proxy.so
 %attr(755,root,root) %{_libdir}/mod_redirect.so
This page took 0.055247 seconds and 4 git commands to generate.