summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-11-19 23:33:52 +0000
committerjlam <jlam@pkgsrc.org>2001-11-19 23:33:52 +0000
commitb1d477e8633cb09749246bec40219f27e4216a85 (patch)
treee42f8e2162abd97a8291104495c6e313ee75526c /mk
parente4565027f9a159ac42c8026fa2de4395caaa7fa6 (diff)
downloadpkgsrc-b1d477e8633cb09749246bec40219f27e4216a85.tar.gz
For completeness, add a SUPPORT_FILES_PERMS that acts like CONF_FILES_PERMS
but the user isn't prompted to customize the files at post-install time.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.install.mk10
-rw-r--r--mk/install/deinstall8
-rw-r--r--mk/install/header3
-rw-r--r--mk/install/install32
4 files changed, 29 insertions, 24 deletions
diff --git a/mk/bsd.pkg.install.mk b/mk/bsd.pkg.install.mk
index 25289261703..1be158c2e7e 100644
--- a/mk/bsd.pkg.install.mk
+++ b/mk/bsd.pkg.install.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.install.mk,v 1.1 2001/11/19 16:18:44 jlam Exp $
+# $NetBSD: bsd.pkg.install.mk,v 1.2 2001/11/19 23:33:52 jlam Exp $
#
# This Makefile fragment is included by package Makefiles to use the common
# INSTALL/DEINSTALL scripts. To use this Makefile fragment, simply:
@@ -103,7 +103,9 @@ USE_USERGROUP= YES
# CONF_FILES_PERMS are lists that look like:
# example_file config_file user group mode
# and works like CONF_FILES, except the config files are owned by
-# user:group have mode permissions.
+# user:group have mode permissions. SUPPORT_FILES_PERMS is used in the
+# same way, but the package admin isn't prompted to customize the file
+# at post-install time.
#
# RCD_SCRIPTS works like CONF_FILES but deals with rc.d startup scripts. The
# scripts are copied with ${RCD_SCRIPTS_MODE} permissions.
@@ -113,13 +115,15 @@ CONF_FILES_MODE?= 0644
CONF_FILES_PERMS?= # empty
SUPPORT_FILES?= # empty
SUPPORT_FILES_MODE?= 0644
+SUPPORT_FILES_PERMS?= # empty
RCD_SCRIPTS?= # empty
RCD_SCRIPTS_MODE?= 0755
FILES_SUBST+= CONF_FILES=${CONF_FILES:Q}
FILES_SUBST+= CONF_FILES_MODE=${CONF_FILES_MODE}
+FILES_SUBST+= CONF_FILES_PERMS=${CONF_FILES_PERMS:Q}
FILES_SUBST+= SUPPORT_FILES=${SUPPORT_FILES:Q}
FILES_SUBST+= SUPPORT_FILES_MODE=${SUPPORT_FILES_MODE}
-FILES_SUBST+= CONF_FILES_PERMS=${CONF_FILES_PERMS:Q}
+FILES_SUBST+= SUPPORT_FILES_PERMS=${SUPPORT_FILES_PERMS:Q}
FILES_SUBST+= RCD_SCRIPTS=${RCD_SCRIPTS:Q}
FILES_SUBST+= RCD_SCRIPTS_MODE=${RCD_SCRIPTS_MODE}
diff --git a/mk/install/deinstall b/mk/install/deinstall
index 41512fe9628..f881e1324aa 100644
--- a/mk/install/deinstall
+++ b/mk/install/deinstall
@@ -1,9 +1,9 @@
# start of deinstall
#
-# $NetBSD: deinstall,v 1.1 2001/11/19 16:18:44 jlam Exp $
+# $NetBSD: deinstall,v 1.2 2001/11/19 23:33:53 jlam Exp $
ALL_FILES="${CONF_FILES} ${SUPPORT_FILES} ${RCD_SCRIPTS}"
-set -- ${CONF_FILES_PERMS}
+set -- ${CONF_FILES_PERMS} ${SUPPORT_FILES_PERMS}
while [ $# -gt 0 ]
do
samplefile="$1"; file="$2"; owner="$3"; group="$4"; mode="$5"
@@ -46,7 +46,7 @@ DEINSTALL)
shift; shift
if [ "${file}" != "${samplefile}" -a \
- -f ${file} -a -f ${samplefile} ]
+ -e ${file} -a -e ${samplefile} ]
then
if ${CMP} -s ${file} ${samplefile}
then
@@ -64,7 +64,7 @@ POST-DEINSTALL)
samplefile="$1"; file="$2"
shift; shift
- if [ -f ${file} ]
+ if [ -e ${file} ]
then
modified_files="${modified_files} ${file}"
fi
diff --git a/mk/install/header b/mk/install/header
index 8e6278f2356..ac2275f6a83 100644
--- a/mk/install/header
+++ b/mk/install/header
@@ -2,7 +2,7 @@
#
# start of header
#
-# $NetBSD: header,v 1.1 2001/11/19 16:18:44 jlam Exp $
+# $NetBSD: header,v 1.2 2001/11/19 23:33:53 jlam Exp $
PKGNAME=$1
STAGE=$2
@@ -41,6 +41,7 @@ PKG_GROUPID="@PKG_GROUPID@"
CONF_FILES="@CONF_FILES@"
CONF_FILES_PERMS="@CONF_FILES_PERMS@"
SUPPORT_FILES="@SUPPORT_FILES@"
+SUPPORT_FILES_PERMS="@SUPPORT_FILES_PERMS@"
RCD_SCRIPTS="@RCD_SCRIPTS@"
MAKE_DIRS="@MAKE_DIRS@"
diff --git a/mk/install/install b/mk/install/install
index 9344ee3915a..cac9be212b2 100644
--- a/mk/install/install
+++ b/mk/install/install
@@ -1,6 +1,6 @@
# start of install
#
-# $NetBSD: install,v 1.1 2001/11/19 16:18:44 jlam Exp $
+# $NetBSD: install,v 1.2 2001/11/19 23:33:53 jlam Exp $
case ${STAGE} in
PRE-INSTALL)
@@ -71,7 +71,7 @@ POST-INSTALL)
done
if [ -n "${CONF_FILES}" -o -n "${CONF_FILES_PERMS}" -o \
- -n "${SUPPORT_FILES}" ]
+ -n "${SUPPORT_FILES}" -o -n "${SUPPORT_FILES_PERMS}" ]
then
${ECHO} "Installing configuration files:"
fi
@@ -81,7 +81,7 @@ POST-INSTALL)
samplefile="$1"; file="$2"
shift; shift
- if [ -f ${file} ]
+ if [ -e ${file} ]
then
${ECHO} " ${file} already exists"
else
@@ -90,36 +90,36 @@ POST-INSTALL)
${CHMOD} @CONF_FILES_MODE@ ${file}
fi
done
- set -- ${CONF_FILES_PERMS}
+ set -- ${SUPPORT_FILES}
while [ $# -gt 0 ]
do
- samplefile="$1"; file="$2"; owner="$3"; group="$4"; mode="$5"
- shift; shift; shift; shift; shift
+ samplefile="$1"; file="$2"
+ shift; shift
- if [ -f ${file} ]
+ if [ -e ${file} ]
then
${ECHO} " ${file} already exists"
else
${ECHO} " ${file}"
${CP} ${samplefile} ${file}
- ${CHOWN} ${owner} ${file}
- ${CHGRP} ${group} ${file}
- ${CHMOD} ${mode} ${file}
+ ${CHMOD} @SUPPORT_FILES_MODE@ ${file}
fi
done
- set -- ${SUPPORT_FILES}
+ set -- ${CONF_FILES_PERMS} ${SUPPORT_FILES_PERMS}
while [ $# -gt 0 ]
do
- samplefile="$1"; file="$2"
- shift; shift
+ samplefile="$1"; file="$2"; owner="$3"; group="$4"; mode="$5"
+ shift; shift; shift; shift; shift
- if [ -f ${file} ]
+ if [ -e ${file} ]
then
${ECHO} " ${file} already exists"
else
${ECHO} " ${file}"
${CP} ${samplefile} ${file}
- ${CHMOD} @SUPPORT_FILES_MODE@ ${file}
+ ${CHOWN} ${owner} ${file}
+ ${CHGRP} ${group} ${file}
+ ${CHMOD} ${mode} ${file}
fi
done
set -- ${RCD_SCRIPTS}
@@ -128,7 +128,7 @@ POST-INSTALL)
samplefile="$1"; file="$2"
shift; shift
- if [ -f ${file} ]
+ if [ -e ${file} ]
then
${ECHO} " ${file} already exists"
else