summaryrefslogtreecommitdiff
path: root/www/thttpd
diff options
context:
space:
mode:
authorjlam <jlam>2000-12-17 22:21:44 +0000
committerjlam <jlam>2000-12-17 22:21:44 +0000
commit38be576be6ccc3aa134f027a9dc64f3d0585bb00 (patch)
tree58bd1a45f189bdef96bd196a0196d1feeb47e24f /www/thttpd
parent74cf21eba1743350d3af8a947e341f522bed8367 (diff)
downloadpkgsrc-38be576be6ccc3aa134f027a9dc64f3d0585bb00.tar.gz
Honor CFLAGS passed in from environment during build. Improve the INSTALL
script and add a DEINSTALL script in handling the config file.
Diffstat (limited to 'www/thttpd')
-rw-r--r--www/thttpd/Makefile13
-rw-r--r--www/thttpd/files/patch-sum8
-rw-r--r--www/thttpd/patches/patch-aa15
-rw-r--r--www/thttpd/patches/patch-ab15
-rw-r--r--www/thttpd/patches/patch-ac17
-rw-r--r--www/thttpd/pkg/DEINSTALL65
-rw-r--r--www/thttpd/pkg/INSTALL50
7 files changed, 158 insertions, 25 deletions
diff --git a/www/thttpd/Makefile b/www/thttpd/Makefile
index 4c85c658b57..46a1513f34d 100644
--- a/www/thttpd/Makefile
+++ b/www/thttpd/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2000/10/28 02:35:52 itojun Exp $
+# $NetBSD: Makefile,v 1.10 2000/12/17 22:21:44 jlam Exp $
DISTNAME= thttpd-2.20b
CATEGORIES= www
@@ -15,6 +15,9 @@ GNU_CONFIGURE= # defined
# Note: this pkg auto-detects IPv6 without regarding USE_INET6.
BUILD_DEFS+= USE_INET6
+DEINSTALL_FILE= ${WRKDIR}/DEINSTALL
+INSTALL_FILE= ${WRKDIR}/INSTALL
+
pre-configure:
${MV} ${WRKSRC}/extras/htpasswd.1 ${WRKSRC}/extras/thtpasswd.1
${MV} ${WRKSRC}/extras/htpasswd.c ${WRKSRC}/extras/thtpasswd.c
@@ -32,6 +35,14 @@ post-build:
pre-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/thttpd
+ ${SED} -e "s,@CAT@,${CAT},g" \
+ -e "s,@RM@,${RM},g" \
+ < ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
+ ${SED} -e "s,@CAT@,${CAT},g" \
+ -e "s,@CHMOD@,${CHMOD},g" \
+ -e "s,@CP@,${CP},g" \
+ < ${PKGDIR}/INSTALL > ${INSTALL_FILE}
+ PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL
post-install:
${INSTALL_DATA} ${WRKDIR}/thttpd.conf ${PREFIX}/share/examples
diff --git a/www/thttpd/files/patch-sum b/www/thttpd/files/patch-sum
index 44dad19a604..df66e7f57cc 100644
--- a/www/thttpd/files/patch-sum
+++ b/www/thttpd/files/patch-sum
@@ -1,6 +1,6 @@
-$NetBSD: patch-sum,v 1.8 2000/08/01 12:38:45 jlam Exp $
+$NetBSD: patch-sum,v 1.9 2000/12/17 22:21:44 jlam Exp $
-MD5 (patch-aa) = 0869786445b560baedcc357f4c419cf2
-MD5 (patch-ab) = 2aa3d6ab165cc262aea5781558437f04
-MD5 (patch-ac) = 081c3519051468b732cae36d621a3583
+MD5 (patch-aa) = 0849eeaf8e38c6a920cc6f7cdd4f0132
+MD5 (patch-ab) = 947db3fea2e41d03e5fe2324d5a75727
+MD5 (patch-ac) = 3af8b6c6b56c05bae0d3d1b18df6c7ce
MD5 (patch-ad) = 6125ef20626049c8ba0560243d4a2695
diff --git a/www/thttpd/patches/patch-aa b/www/thttpd/patches/patch-aa
index ee71d74dbea..c8b39dedfd4 100644
--- a/www/thttpd/patches/patch-aa
+++ b/www/thttpd/patches/patch-aa
@@ -1,7 +1,7 @@
-$NetBSD: patch-aa,v 1.4 2000/07/27 12:47:34 jlam Exp $
+$NetBSD: patch-aa,v 1.5 2000/12/17 22:21:44 jlam Exp $
---- Makefile.in.BAK Wed Feb 9 21:05:49 2000
-+++ Makefile.in Wed Feb 9 21:06:50 2000
+--- Makefile.in.orig Tue Jul 4 12:21:32 2000
++++ Makefile.in
@@ -34,7 +34,7 @@
# Pathname of directory to install the man page.
MANDIR = @mandir@
@@ -20,6 +20,15 @@ $NetBSD: patch-aa,v 1.4 2000/07/27 12:47:34 jlam Exp $
# You shouldn't need to edit anything below here.
+@@ -50,7 +50,7 @@
+ CCOPT = @V_CCOPT@
+ DEFS = @DEFS@
+ INCLS = -I.
+-CFLAGS = $(CCOPT) $(DEFS) $(INCLS)
++CFLAGS += $(CCOPT) $(DEFS) $(INCLS)
+ LDFLAGS = @LDFLAGS@
+ LIBS = @LIBS@
+ NETLIBS = @V_NETLIBS@
@@ -111,10 +111,10 @@
install: installthis install-man installsubdirs
diff --git a/www/thttpd/patches/patch-ab b/www/thttpd/patches/patch-ab
index ca00c036235..4658503e53c 100644
--- a/www/thttpd/patches/patch-ab
+++ b/www/thttpd/patches/patch-ab
@@ -1,7 +1,16 @@
-$NetBSD: patch-ab,v 1.2 2000/02/09 20:55:29 hubertf Exp $
+$NetBSD: patch-ab,v 1.3 2000/12/17 22:21:45 jlam Exp $
---- extras/Makefile.in.BAK Wed Feb 9 21:07:16 2000
-+++ extras/Makefile.in Wed Feb 9 21:11:37 2000
+--- extras/Makefile.in.orig Wed Sep 15 12:00:14 1999
++++ extras/Makefile.in
+@@ -35,7 +35,7 @@
+ CCOPT = @V_CCOPT@
+ DEFS = @DEFS@
+ INCLS = -I..
+-CFLAGS = $(CCOPT) $(DEFS) $(INCLS)
++CFLAGS += $(CCOPT) $(DEFS) $(INCLS)
+ STATICFLAG = @V_STATICFLAG@
+ LDFLAGS = @LDFLAGS@
+ LIBS = @LIBS@
@@ -67,17 +67,15 @@
install: all
diff --git a/www/thttpd/patches/patch-ac b/www/thttpd/patches/patch-ac
index fda755419aa..47139e1f23f 100644
--- a/www/thttpd/patches/patch-ac
+++ b/www/thttpd/patches/patch-ac
@@ -1,8 +1,17 @@
-$NetBSD: patch-ac,v 1.3 2000/07/27 12:42:08 jlam Exp $
+$NetBSD: patch-ac,v 1.4 2000/12/17 22:21:45 jlam Exp $
---- cgi-src/Makefile.in.BAK Wed Feb 9 21:12:32 2000
-+++ cgi-src/Makefile.in Wed Feb 9 21:13:16 2000
-@@ -67,15 +67,15 @@
+--- cgi-src/Makefile.in.orig Tue Sep 26 16:20:14 2000
++++ cgi-src/Makefile.in
+@@ -34,7 +34,7 @@
+ CCOPT = @V_CCOPT@
+ DEFS = @DEFS@
+ INCLS = -I..
+-CFLAGS = $(CCOPT) $(DEFS) $(INCLS)
++CFLAGS += $(CCOPT) $(DEFS) $(INCLS)
+ LDFLAGS = @LDFLAGS@ @V_STATICFLAG@
+ LIBS = @LIBS@
+ NETLIBS = @V_NETLIBS@
+@@ -69,15 +69,15 @@
install: all
-mkdir $(CGIBINDIR)
rm -f $(CGIBINDIR)/redirect
diff --git a/www/thttpd/pkg/DEINSTALL b/www/thttpd/pkg/DEINSTALL
new file mode 100644
index 00000000000..739c15f6dce
--- /dev/null
+++ b/www/thttpd/pkg/DEINSTALL
@@ -0,0 +1,65 @@
+#!/bin/sh
+#
+# $NetBSD: DEINSTALL,v 1.1 2000/12/17 22:21:45 jlam Exp $
+
+PKGNAME=$1
+STAGE=$2
+
+CAT="@CAT@"
+RM="@RM@"
+
+SAMPLECONFDIR=${PKG_PREFIX}/share/examples
+CONFDIR=/etc
+CONFFILES="thttpd.conf"
+
+case ${STAGE} in
+DEINSTALL)
+ # Remove configuration files if they don't differ from the default
+ # config file.
+ #
+ for file in ${CONFFILES}
+ do
+ FILE=${CONFDIR}/${file}
+ SAMPLEFILE=${SAMPLECONFDIR}/${file}
+ if diff -q ${FILE} ${SAMPLEFILE} >/dev/null
+ then
+ ${RM} -f ${FILE}
+ fi
+ done
+ ;;
+
+POST-DEINSTALL)
+ modified_files=''
+ for file in ${CONFFILES}
+ do
+ FILE=${CONFDIR}/${file}
+ if [ -f ${FILE} ]
+ then
+ modified_files="${modified_files} ${FILE}"
+ fi
+ done
+
+ if [ -n "${modified_files}" ]
+ then
+ ${CAT} << EOF
+===========================================================================
+If you won't be using ${PKGNAME} any longer, you may want to remove the
+following files:
+
+EOF
+ for file in ${modified_files}
+ do
+ echo " ${file}"
+ done
+ ${CAT} << EOF
+===========================================================================
+EOF
+ fi
+ ;;
+
+*)
+ echo "Unexpected argument: ${STAGE}"
+ exit 1
+ ;;
+esac
+exit 0
diff --git a/www/thttpd/pkg/INSTALL b/www/thttpd/pkg/INSTALL
index 767d3a7c8e2..d02be46173e 100644
--- a/www/thttpd/pkg/INSTALL
+++ b/www/thttpd/pkg/INSTALL
@@ -1,23 +1,53 @@
-#!/bin/sh
+#! /bin/sh
#
-# $NetBSD: INSTALL,v 1.1 2000/07/27 12:42:09 jlam Exp $
+# $NetBSD: INSTALL,v 1.2 2000/12/17 22:21:45 jlam Exp $
PKGNAME=$1
STAGE=$2
+CAT="@CAT@"
+CHMOD="@CHMOD@"
+CP="@CP@"
+
+SAMPLECONFDIR=${PKG_PREFIX}/share/examples
+CONFDIR=/etc
+CONFFILES="thttpd.conf"
+
case ${STAGE} in
PRE-INSTALL)
;;
+
POST-INSTALL)
- EXAMPLE_DIR=${PKG_PREFIX}/share/examples
- INSTALL_DATA="/usr/bin/install -c -o root -g wheel -m 0644"
-
- if [ ! -f /etc/thttpd.conf ]
- then
- echo "Installing example thttpd.conf in /etc..."
- ${INSTALL_DATA} ${EXAMPLE_DIR}/thttpd.conf /etc/thttpd.conf
- fi
+ echo "Installing configuration files:"
+ for file in ${CONFFILES}
+ do
+ FILE=${CONFDIR}/${file}
+ SAMPLEFILE=${SAMPLECONFDIR}/${file}
+ if [ -f ${FILE} ]
+ then
+ echo " ${FILE} already exists"
+ else
+ echo " ${FILE}"
+ ${CP} ${SAMPLEFILE} ${FILE}
+ ${CHMOD} 644 ${FILE}
+ fi
+ done
+ ${CAT} << EOF
+
+===========================================================================
+Some files you might need to customize include the following:
+
+EOF
+ for file in ${CONFFILES}
+ do
+ FILE=${CONFDIR}/${file}
+ echo " ${FILE}"
+ done
+ ${CAT} << EOF
+===========================================================================
+EOF
;;
+
*)
echo "Unexpected argument: ${STAGE}"
exit 1