summaryrefslogtreecommitdiff
path: root/net/netatalk
diff options
context:
space:
mode:
authorjlam <jlam>2000-07-26 19:03:18 +0000
committerjlam <jlam>2000-07-26 19:03:18 +0000
commitd7d3de4602b4c80734d3c94ef1b6c5c9d338e74b (patch)
treef80d62c181a96524aff026476544f156c3da43a3 /net/netatalk
parentc4525f7d0d36717ccbb3778c5ca1b579616de358 (diff)
downloadpkgsrc-d7d3de4602b4c80734d3c94ef1b6c5c9d338e74b.tar.gz
Change configuration file directory from ${PREFIX}/etc to /etc/netatalk.
Configuration files really are host-dependent, so putting them in ${PREFIX} which is often shared across machines of the same architecture, doesn't make sense. Add machinery to install default configuration files. Closes pkg/9948.
Diffstat (limited to 'net/netatalk')
-rw-r--r--net/netatalk/Makefile6
-rw-r--r--net/netatalk/files/patch-sum4
-rw-r--r--net/netatalk/patches/patch-aa4
-rw-r--r--net/netatalk/pkg/DEINSTALL28
-rw-r--r--net/netatalk/pkg/INSTALL69
5 files changed, 106 insertions, 5 deletions
diff --git a/net/netatalk/Makefile b/net/netatalk/Makefile
index 96cf50847b0..b7d3dec86c5 100644
--- a/net/netatalk/Makefile
+++ b/net/netatalk/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 1999/03/01 18:57:13 wrstuden Exp $
+# $NetBSD: Makefile,v 1.5 2000/07/26 19:03:18 jlam Exp $
#
DISTNAME= netatalk-990130
@@ -12,4 +12,8 @@ HOMEPAGE= http://www.umich.edu/~rsug/netatalk/
CONFLICTS= netatalk-19981109
+post-install:
+ ${INSTALL_DATA} ${WRKSRC}/sys/netbsd/rc.atalk ${PREFIX}/etc
+ PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
+
.include "../../mk/bsd.pkg.mk"
diff --git a/net/netatalk/files/patch-sum b/net/netatalk/files/patch-sum
index dec97b01faf..9fd405759d0 100644
--- a/net/netatalk/files/patch-sum
+++ b/net/netatalk/files/patch-sum
@@ -1,6 +1,6 @@
-$NetBSD: patch-sum,v 1.5 2000/06/29 03:03:07 wrstuden Exp $
+$NetBSD: patch-sum,v 1.6 2000/07/26 19:03:20 jlam Exp $
-MD5 (patch-aa) = 0cae7e0efa5144d16ebb3319b65967d7
+MD5 (patch-aa) = db4dd5105f7563b533f5ee32ad0a557a
MD5 (patch-ab) = c9013bae176432478a2b323bb5b42dd5
MD5 (patch-ac) = dff113a1a22e9ade41ddb518dba9948c
MD5 (patch-ad) = 5a929de9ae75477f36a4ae52ef7b8d8d
diff --git a/net/netatalk/patches/patch-aa b/net/netatalk/patches/patch-aa
index 252c35095c0..2a8c82da0d0 100644
--- a/net/netatalk/patches/patch-aa
+++ b/net/netatalk/patches/patch-aa
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.2 1999/08/31 22:09:42 wrstuden Exp $
+$NetBSD: patch-aa,v 1.3 2000/07/26 19:03:20 jlam Exp $
--- Makefile Wed Dec 17 09:25:39 1997
+++ Makefile Tue Aug 31 02:06:35 1999
@@ -26,7 +26,7 @@ $NetBSD: patch-aa,v 1.2 1999/08/31 22:09:42 wrstuden Exp $
+RESDIR=$(ATALK_DESTDIR)/share
# for configuration files (AppleVolumes.system, etc.)
-ETCDIR=$(DESTDIR)/etc
-+ETCDIR=$(ATALK_DESTDIR)/etc
++ETCDIR=/etc/netatalk
# for include files
-INCDIR=$(DESTDIR)/include
+INCDIR=$(ATALK_DESTDIR)/include
diff --git a/net/netatalk/pkg/DEINSTALL b/net/netatalk/pkg/DEINSTALL
new file mode 100644
index 00000000000..b1f68c0a993
--- /dev/null
+++ b/net/netatalk/pkg/DEINSTALL
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# $NetBSD: DEINSTALL,v 1.1 2000/07/26 19:03:20 jlam Exp $
+
+PKGNAME=$1
+STAGE=$2
+
+case ${STAGE} in
+DEINSTALL)
+ ;;
+POST-DEINSTALL)
+ ETCDIR=/etc/netatalk
+
+ cat << EOF
+===========================================================================
+If you won't be using ${PKGNAME} any longer, you may want to
+remove the netatalk configuration file directory:
+
+ ${ETCDIR}
+===========================================================================
+EOF
+ ;;
+*)
+ echo "Unexpected argument: ${STAGE}"
+ exit 1
+ ;;
+esac
+exit 0
diff --git a/net/netatalk/pkg/INSTALL b/net/netatalk/pkg/INSTALL
new file mode 100644
index 00000000000..fda230ad90d
--- /dev/null
+++ b/net/netatalk/pkg/INSTALL
@@ -0,0 +1,69 @@
+#!/bin/sh
+#
+# $NetBSD: INSTALL,v 1.1 2000/07/26 19:03:23 jlam Exp $
+
+PKGNAME=$1
+STAGE=$2
+
+case ${STAGE} in
+PRE-INSTALL)
+ ;;
+POST-INSTALL)
+ ETCDIR=/etc/netatalk
+
+ mkdir -p ${ETCDIR}
+
+ # The idea is to copy old config files over to the new location if
+ # they exist. Otherwise, copy the default config from the examples
+ # directory.
+ #
+ if [ -f ${PKG_PREFIX}/etc/atalkd.conf ]
+ then
+ for file in \
+ AppleVolumes.default \
+ AppleVolumes.system \
+ atalkd.conf \
+ papd.conf
+ do
+ if [ ! -f ${ETCDIR}/${file} -a -f ${PKG_PREFIX}/etc/${file}]
+ then
+ echo " ${ETCDIR}/${file}"
+ cp ${PKG_PREFIX}/etc/${file} ${ETCDIR}/${file}
+ chmod 644 ${ETCDIR}/${file}
+ fi
+ done
+ echo "done."
+ cat << EOF
+===========================================================================
+Old configuration files were copied from ${PKG_PREFIX}/etc to
+${ETCDIR}. You may want to remove the old files as they are no
+longer necessary.
+===========================================================================
+EOF
+ else
+ echo "Installing configuration files:"
+ for file in \
+ AppleVolumes.default \
+ AppleVolumes.system \
+ atalkd.conf \
+ papd.conf
+ do
+ if [ -f ${ETCDIR}/${file} ]
+ then
+ echo " ${ETCDIR}/${file} already exists"
+ else
+ echo " ${ETCDIR}/${file}"
+ cp ${PKG_PREFIX}/share/examples/netatalk/${file} \
+ ${ETCDIR}/${file}
+ chmod 644 ${ETCDIR}/${file}
+ fi
+ done
+ echo "done."
+ fi
+ ;;
+*)
+ echo "Unexpected argument: ${STAGE}"
+ exit 1
+ ;;
+esac
+exit 0