]> git.pld-linux.org Git - packages/lighttpd.git/blobdiff - lighttpd.spec
- use %useradd/%groupadd macros
[packages/lighttpd.git] / lighttpd.spec
index c28c5ad3c1de0d9d3345dcd98b9184f4b23f2afd..3b688fafb043479ca225f7acea1e742938355c3c 100644 (file)
@@ -6,17 +6,17 @@
 #
 # Conditional build for lighttpd:
 %bcond_without xattr           # without support of extended attributes
-%bcond_with    mysql           # with mysql
-%bcond_with    ldap            # with ldap
-%bcond_with    valgrind        # enable valgrind fixes in code.
 %bcond_without ipv6            # IPv4-only version (doesn't require IPv6 in kernel)
-%bcond_without largefile       # without largefile support,
-%bcond_without ssl             # disable ssl support
 # use it if you have 2.4 kernel to get sendfile() support,
 # and don't need > 2GB file requests,
 # see http://article.gmane.org/gmane.comp.web.lighttpd:722
+%bcond_without largefile       # without largefile support
+%bcond_without ssl             # disable ssl support
+%bcond_with    mysql           # with mysql
+%bcond_with    ldap            # with ldap
+%bcond_with    valgrind        # compile code with valgrind support.
+%bcond_with    dirhide         # with 'hide from dirlisting' hack
 #
-
 # Prerelease snapshot: DATE-TIME
 ##define _snap 20050116-1743
 
 %define _source http://www.lighttpd.net/download/%{name}-%{version}.tar.gz
 %endif
 
-%define                _rel 1
+%define                _rel 3.5
 
 Summary:       Fast and light HTTP server
 Summary(pl):   Szybki i lekki serwer HTTP
 Name:          lighttpd
-Version:       1.3.12
+Version:       1.3.13
 Release:       %{_rel}%{?_snap:.%(echo %{_snap}|tr - _)}
 Group:         Networking/Daemons
 License:       BSD
 Source0:       %{_source}
-# Source0-md5: ffd0bc5802646948e2724060031c05b5
+# Source0-md5: 2f017b936be376ad6f6c2ee26db93467
 Source1:       %{name}.init
 Source2:       %{name}.conf
 Source3:       %{name}.user
 Source4:       %{name}.logrotate
 Source5:       %{name}.sysconfig
+Patch0:                http://minghetti.ch/blob/dirlist-hide.patch
+Patch1:                %{name}-fcgi-verbose.patch
+Patch2:                %{name}-proxy-error-handler.patch
+Patch3:                %{name}-fcgi-retry-timeout.patch
+Patch4:                http://glen.alkohol.ee/pld/lighttpd-request_header-print.patch
 URL:           http://www.lighttpd.net/
 BuildRequires: autoconf
 BuildRequires: automake
@@ -56,7 +61,8 @@ BuildRequires:        attr-devel
 %endif
 %{?with_ldap:BuildRequires:    openldap-devel}
 %{?with_mysql:BuildRequires:   mysql-devel}
-%{?with_valgrind:BuildRequires:        valgrind}
+%{?debug:BuildRequires:        valgrind}
+BuildRequires: rpmbuild(macros) >= 1.202
 PreReq:                rc-scripts
 Requires(pre): sh-utils
 Requires(pre): /bin/id
@@ -110,12 +116,18 @@ pomocy serwera WWW ani samego programu.
 
 %prep
 %setup -q
+%{?with_dirhide:%patch0 -p0}
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
 
 %build
 %{__libtoolize}
 %{__aclocal}
 %{__autoconf}
 %configure \
+       CFLAGS="%{rpmcflags} -DFCGI_RETRY_TIMEOUT=20" \
        %{?with_valgrind:--with-valgrind} \
        %{?with_xattr:--with-attr} \
        %{?with_mysql:--with-mysql} \
@@ -148,23 +160,8 @@ mv $RPM_BUILD_ROOT%{_bindir}/spawn-fcgi $RPM_BUILD_ROOT%{_sbindir}/spawn-fcgi
 rm -rf $RPM_BUILD_ROOT
 
 %pre
-if [ -n "`/usr/bin/getgid lighttpd`" ]; then
-       if [ "`/usr/bin/getgid lighttpd`" != 109 ]; then
-               echo "Error: group lighttpd doesn't have gid=109. Correct this before installing %{name}." 1>&2
-               exit 1
-       fi
-else
-       /usr/sbin/groupadd -g 109 lighttpd
-fi
-if [ -n "`/bin/id -u lighttpd 2>/dev/null`" ]; then
-       if [ "`/bin/id -u lighttpd`" != 116 ]; then
-               echo "Error: user lighttpd doesn't have uid=116. Correct this before installing %{name}." 1>&2
-               exit 1
-       fi
-else
-       /usr/sbin/useradd -u 116 -d %{_lighttpddir} -s /bin/false \
-               -c "HTTP User" -g lighttpd lighttpd 1>&2
-fi
+%groupadd -g 109 lighttpd
+%useradd -u 116 -d %{_lighttpddir} -c "HTTP User" -g lighttpd lighttpd
 
 %post
 /sbin/chkconfig --add %{name}
@@ -207,11 +204,11 @@ fi
 %dir %attr(750,lighttpd,root) /var/log/%{name}
 %attr(755,lighttpd,lighttpd) %{_lighttpddir}
 %attr(754,root,root) /etc/rc.d/init.d/%{name}
-%config(noreplace) %verify(not size mtime md5) /etc/sysconfig/*
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
 %dir %attr(750,root,lighttpd) %{_sysconfdir}
-%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}.conf
-%attr(640,root,lighttpd) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*.user
-%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/%{name}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.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}
 %{_mandir}/man?/*
 
 %files -n spawn-fcgi
This page took 0.034216 seconds and 4 git commands to generate.