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
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
%patch2 -p1
%patch3 -p1
%patch4 -p1
+%patch5 -p1
+%patch6 -p1
%build
OPTIM="$RPM_OPT_FLAGS" LDFLAGS="-s" \
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
/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