From 0ec5367e84e409b471dffdbee60b243c7dc4d427 Mon Sep 17 00:00:00 2001 From: jlam Date: Wed, 24 Jul 2002 20:30:06 +0000 Subject: Create a new variable "RCD_SCRIPTS_EXAMPLEDIR" that contains the location of the example rc.d scripts for a package. This defaults to ${PREFIX}/etc/rc.d, but may be reset for those odd packages, e.g. qmail, that set LOCALBASE=/. --- mk/bsd.pkg.install.mk | 11 +++++++---- mk/install/deinstall | 4 ++-- mk/install/header | 3 ++- mk/install/install | 4 ++-- 4 files changed, 13 insertions(+), 9 deletions(-) (limited to 'mk') diff --git a/mk/bsd.pkg.install.mk b/mk/bsd.pkg.install.mk index a1df486aa80..4c01359c60e 100644 --- a/mk/bsd.pkg.install.mk +++ b/mk/bsd.pkg.install.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.install.mk,v 1.23 2002/06/27 20:41:44 jlam Exp $ +# $NetBSD: bsd.pkg.install.mk,v 1.24 2002/07/24 20:30:06 jlam Exp $ # # This Makefile fragment is included by package Makefiles to use the common # INSTALL/DEINSTALL scripts. To use this Makefile fragment, simply: @@ -108,9 +108,10 @@ USE_USERGROUP= YES # same way, but the package admin isn't prompted to customize the file # at post-install time. # -# RCD_SCRIPTS works lists the basenames of the rc.d scripts. It's assumed that -# they live in ${PREFIX}/etc/rc.d, and the scripts will be copied into -# ${RCD_SCRIPTS_DIR} with ${RCD_SCRIPTS_MODE} permissions. +# RCD_SCRIPTS works lists the basenames of the rc.d scripts. They are +# expected to be found in ${RCD_SCRIPTS_EXAMPLEDIR}, and the scripts +# will be copied into ${RCD_SCRIPTS_DIR} with ${RCD_SCRIPTS_MODE} +# permissions. # CONF_FILES?= # empty CONF_FILES_MODE?= 0644 @@ -121,6 +122,7 @@ SUPPORT_FILES_PERMS?= # empty RCD_SCRIPTS?= # empty RCD_SCRIPTS_MODE?= 0755 RCD_SCRIPTS_DIR?= /etc/rc.d +RCD_SCRIPTS_EXAMPLEDIR?= ${PREFIX}/etc/rc.d FILES_SUBST+= CONF_FILES=${CONF_FILES:Q} FILES_SUBST+= CONF_FILES_MODE=${CONF_FILES_MODE} FILES_SUBST+= CONF_FILES_PERMS=${CONF_FILES_PERMS:Q} @@ -130,6 +132,7 @@ FILES_SUBST+= SUPPORT_FILES_PERMS=${SUPPORT_FILES_PERMS:Q} FILES_SUBST+= RCD_SCRIPTS=${RCD_SCRIPTS:Q} FILES_SUBST+= RCD_SCRIPTS_MODE=${RCD_SCRIPTS_MODE} FILES_SUBST+= RCD_SCRIPTS_DIR=${RCD_SCRIPTS_DIR} +FILES_SUBST+= RCD_SCRIPTS_EXAMPLEDIR=${RCD_SCRIPTS_EXAMPLEDIR} # OWN_DIRS contains a list of directories for this package that should be # created and should attempt to be destroyed by the INSTALL/DEINSTALL diff --git a/mk/install/deinstall b/mk/install/deinstall index ffd4e1b82a1..ec5499092e3 100644 --- a/mk/install/deinstall +++ b/mk/install/deinstall @@ -1,6 +1,6 @@ # start of deinstall # -# $NetBSD: deinstall,v 1.10 2002/06/27 20:43:44 jlam Exp $ +# $NetBSD: deinstall,v 1.11 2002/07/24 20:30:06 jlam Exp $ eval set -- ${PKG_USERS} for userset; do @@ -27,7 +27,7 @@ for file; do done eval set -- ${RCD_SCRIPTS} for script; do - samplefile="${PKG_PREFIX}/etc/rc.d/${script}" + samplefile="${RCD_SCRIPTS_EXAMPLEDIR}/${script}" file="${RCD_SCRIPTS_DIR}/${script}" shift ALL_FILES="${ALL_FILES} \"${samplefile}\" \"${file}\"" diff --git a/mk/install/header b/mk/install/header index 599c5270dca..7c6fdb536f7 100644 --- a/mk/install/header +++ b/mk/install/header @@ -2,7 +2,7 @@ # # start of header # -# $NetBSD: header,v 1.11 2002/06/27 20:42:15 jlam Exp $ +# $NetBSD: header,v 1.12 2002/07/24 20:30:06 jlam Exp $ PKGNAME=$1 STAGE=$2 @@ -50,6 +50,7 @@ SUPPORT_FILES="@SUPPORT_FILES@" SUPPORT_FILES_PERMS="@SUPPORT_FILES_PERMS@" RCD_SCRIPTS="@RCD_SCRIPTS@" RCD_SCRIPTS_DIR="@RCD_SCRIPTS_DIR@" +RCD_SCRIPTS_EXAMPLEDIR="@RCD_SCRIPTS_EXAMPLEDIR@" MAKE_DIRS="@MAKE_DIRS@" MAKE_DIRS_PERMS="@MAKE_DIRS_PERMS@" diff --git a/mk/install/install b/mk/install/install index 0f65c9491da..7a978bcc23d 100644 --- a/mk/install/install +++ b/mk/install/install @@ -1,6 +1,6 @@ # start of install # -# $NetBSD: install,v 1.10 2002/06/27 20:46:31 jlam Exp $ +# $NetBSD: install,v 1.11 2002/07/24 20:30:07 jlam Exp $ case ${STAGE} in PRE-INSTALL) @@ -296,7 +296,7 @@ EOF done eval set -- ${RCD_SCRIPTS} for script; do - samplefile="${PKG_PREFIX}/etc/rc.d/${script}" + samplefile="${RCD_SCRIPTS_EXAMPLEDIR}/${script}" file="${RCD_SCRIPTS_DIR}/${script}" if [ "${_PKG_CONFIG}" = "NO" ]; then -- cgit v1.2.3