aboutsummaryrefslogtreecommitdiff
path: root/www/apache20
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2001-10-24 16:03:38 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2001-10-24 16:03:38 +0000
commit14850c029aa7188d804fcb596f784265cc388475 (patch)
tree48e69f36ec0ece2e6c1e2d1fe8863725d5ace142 /www/apache20
parent274552fc8a2025e59b600ecebb04a4ea662c88c0 (diff)
downloadports-14850c029aa7188d804fcb596f784265cc388475.tar.gz
ports-14850c029aa7188d804fcb596f784265cc388475.zip
Notes
Diffstat (limited to 'www/apache20')
-rw-r--r--www/apache20/Makefile9
-rw-r--r--www/apache20/files/patch-docs:conf:httpd-std.conf10
-rw-r--r--www/apache20/pkg-deinstall20
-rw-r--r--www/apache20/pkg-install34
4 files changed, 66 insertions, 7 deletions
diff --git a/www/apache20/Makefile b/www/apache20/Makefile
index 5ce2baf3327c..ebb0a3af1369 100644
--- a/www/apache20/Makefile
+++ b/www/apache20/Makefile
@@ -1,13 +1,13 @@
# New ports collection makefile for: apache2
# Date created: 7 April 2001
-# Whom: Hye-Shik Chang <perky@python.or.kr>
+# Whom: Hye-Shik Chang <perky@fallin.lv>
#
# $FreeBSD$
#
PORTNAME= apache
PORTVERSION= 2.0.16
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= www ipv6
MASTER_SITES= http://httpd.apache.org/dist/httpd/ \
http://www.cybernic.com/mirror/dist/httpd/ \
@@ -21,7 +21,7 @@ MASTER_SITES= http://httpd.apache.org/dist/httpd/ \
ftp://ftp.cuckoo.com/pub/mirrors/apache/httpd/
DISTNAME= httpd-${PORTVERSION:S/./_/g}-beta
-MAINTAINER?= perky@python.or.kr
+MAINTAINER?= perky@fallin.lv
WRKSRC= ${WRKDIR}/httpd-${PORTVERSION:S/./_/g}
FIND?= find
@@ -65,6 +65,9 @@ CONFIGURE_ARGS+= --enable-${mod}=yes
post-patch:
@${FIND} ${WRKSRC} -name "*.orig"|${XARGS} ${RM} -f
+pre-install:
+ PKG_PREFIX=${PREFIX} ./pkg-install ${PKGNAME} PRE-INSTALL
+
post-install:
@if [ ! -f ${PREFIX}/etc/rc.d/apache.sh ]; then \
${ECHO} "Installing ${PREFIX}/etc/rc.d/apache.sh startup file."; \
diff --git a/www/apache20/files/patch-docs:conf:httpd-std.conf b/www/apache20/files/patch-docs:conf:httpd-std.conf
index f70a76bf17df..928bc48b70d4 100644
--- a/www/apache20/files/patch-docs:conf:httpd-std.conf
+++ b/www/apache20/files/patch-docs:conf:httpd-std.conf
@@ -1,5 +1,5 @@
--- docs/conf/httpd-std.conf.orig Mon Mar 26 01:54:48 2001
-+++ docs/conf/httpd-std.conf Sun Apr 8 04:26:54 2001
++++ docs/conf/httpd-std.conf Tue Oct 23 17:12:59 2001
@@ -64,7 +64,7 @@
# PidFile: The file in which the server should record its process
# identification number when it starts.
@@ -47,12 +47,14 @@
### Section 2: 'Main' server configuration
#
-@@ -221,7 +243,7 @@
+@@ -220,8 +242,8 @@
+ # when the value of (unsigned)Group is above 60000;
# don't use Group #-1 on these systems!
#
- User nobody
+-User nobody
-Group #-1
-+Group nogroup
++User www
++Group www
#
# ServerAdmin: Your address, where problems with the server should be
diff --git a/www/apache20/pkg-deinstall b/www/apache20/pkg-deinstall
new file mode 100644
index 000000000000..a2a78a4a7f6c
--- /dev/null
+++ b/www/apache20/pkg-deinstall
@@ -0,0 +1,20 @@
+#!/bin/sh
+# $FreeBSD: /tmp/pcvs/ports/www/apache20/Attic/pkg-deinstall,v 1.1 2001-10-24 16:03:34 ache Exp $
+#
+
+if [ "$2" != "POST-DEINSTALL" ]; then
+ exit 0
+fi
+
+USER=www
+
+if pw usershow "${USER}" 2>/dev/null 1>&2; then
+ if pw userdel ${USER}; then
+ echo "Delete user/group \"${USER}\"."
+ else
+ echo "Deleting user/group \"${USER}\" failed..."
+ exit 1
+ fi
+fi
+
+exit 0
diff --git a/www/apache20/pkg-install b/www/apache20/pkg-install
new file mode 100644
index 000000000000..cbeae9665004
--- /dev/null
+++ b/www/apache20/pkg-install
@@ -0,0 +1,34 @@
+#!/bin/sh
+# $FreeBSD$
+#
+
+if [ "$2" != "PRE-INSTALL" ]; then
+ exit 0
+fi
+
+USER=www
+GROUP=${USER}
+UID=80
+GID=${UID}
+
+if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
+ if pw groupadd ${GROUP} -g ${GID}; then
+ echo "Added group \"${GROUP}\"."
+ else
+ echo "Adding group \"${GROUP}\" failed..."
+ exit 1
+ fi
+fi
+
+if ! pw usershow "${USER}" 2>/dev/null 1>&2; then
+ if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
+ -s "/sbin/nologin" -d "/nonexistent" \
+ -c "World Wide Web Owner"; \
+ then
+ echo "Added user \"${USER}\"."
+ else
+ echo "Adding user \"${USER}\" failed..."
+ exit 1
+ fi
+fi
+exit 0