]> git.pld-linux.org Git - packages/apache.git/blobdiff - apache.spec
- new IPv6 patches from KAME and Japan Linux IPv6 Users Group
[packages/apache.git] / apache.spec
index c6aa557a682686e0110e3245da5d8342916e36f7..c7f8534b40eef68f6d5a482c347430207dc28ccd 100644 (file)
@@ -5,7 +5,7 @@ Summary(pl):    Serwer WWW (World Wide Web) ze wsparciem dla IPv6
 Summary(tr):   Lider WWW tarayýcý
 Name:          apache
 Version:       1.3.9
-Release:       3
+Release:       5
 Group:         Networking/Daemons
 Group(pl):     Sieciowe/Serwery
 Source0:       ftp://ftp.apache.org/apache/dist/%{name}_%{version}.tar.gz
@@ -14,15 +14,20 @@ Source2:    apache.logrotate
 Source3:       apache-extra1.tar.bz2
 Source8:       apache.sysconfig
 Patch0:                apache-suexec.patch
-Patch1:                apache-1.3.9-ipv6-23081999.patch.gz
-Patch2:                apache-htdocs.patch
-Patch3:                apache-release.patch
-Patch4:                apache-pld.patch
+Patch1:                ftp://ftp.kame.net/pub/kame/misc/apache-139-v6-19991013a.diff.gz
+Patch2:                ftp://ftp.nemoto.ecei.tohoku.ac.jp/pub/Net/IPv6/Patches/apache-139-v6-19991013a.new4.patch.gz
+Patch3:                ftp://ftp.nemoto.ecei.tohoku.ac.jp/pub/Net/IPv6/Patches/apache-139-v6-19991013a.new4_to_4.1.patch
+Patch4:                apache-htdocs.patch
+Patch5:                apache-release.patch
+Patch6:                apache-pld.patch
 Copyright:     BSD-like
 Provides:      httpd
 Provides:      webserver
 Prereq:                /sbin/chkconfig
-Prereq:                %{_sbindir}/useradd
+Prereq:                /usr/sbin/useradd
+Prereq:                /usr/bin/getgid
+Prereq:                /usr/bin/id
+Prereq:                sh-utils
 Requires:      rc-scripts
 URL:           http://www.apache.org/
 BuildRoot:     /tmp/%{name}-%{version}-root
@@ -105,6 +110,8 @@ Dokumentacja do Apache w formacie HTML.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
+%patch6 -p1
 
 %build
 OPTIM="$RPM_OPT_FLAGS" LDFLAGS="-s" \
@@ -161,21 +168,27 @@ gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man*/* \
        ABOUT_APACHE src/CHANGES KEYS README README.v6
 
 %pre
-if [ -n `id -g http` ]; then
-       if [ "`id -g http`" != "51" ]; then
-               echo "Warning: group http haven't gid=51. Corect this before install apache"
+if [ -n "`getgid http`" ]; then
+       if [ "`getgid http`" != "51" ]; then
+               echo "Warning: group http haven't gid=51. Corect this before install apache" 1>&2
                exit 1
        fi
 else
-       /usr/sbin/groupadd -u 51 -r -f httpd
+       /usr/sbin/groupadd -g 51 -r -f http
+       if [ -f /var/db/group.db ]; then
+               /usr/bin/update-db 1>&2
+       fi
 fi
-if [ -n `id -u http` ]; then
+if [ -n "`id -u http 2>/dev/null`" ]; then
        if [ "`id -u http`" != "51" ]; then
-               echo "Warning: user http haven't gid=51. Corect this before install apache"
+               echo "Warning: user http haven't uid=51. Corect this before install apache" 1>&2
                exit 1
        fi
 else
-       /usr/sbin/useradd -u 51 -r -f httpd
+       /usr/sbin/useradd -u 51 -r -d /home/httpd -s /bin/false -c "HTTP User" -g http http 1>&2
+       if [ -f /var/db/passwd.db ]; then
+               /usr/bin/update-db 1>&2
+       fi
 fi
 
 
@@ -195,6 +208,18 @@ if [ "$1" = "0" ]; then
        /sbin/chkconfig --del httpd
 fi
 
+%postun
+if [ "$1" = "0" ]; then
+       /usr/sbin/userdel http
+       if [ -f /var/db/passwd.db ]; then
+               /usr/bin/update-db
+       fi
+       /usr/sbin/groupdel http
+       if [ -f /var/db/group.db ]; then
+               /usr/bin/update-db
+       fi
+fi
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
This page took 0.047851 seconds and 4 git commands to generate.