diff options
author | jlam <jlam@pkgsrc.org> | 2003-09-05 11:34:25 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2003-09-05 11:34:25 +0000 |
commit | 19fd2859c5aa1414fac54458a83d8fea60985c02 (patch) | |
tree | 44709d065bffeb4880702cf53263d326c5eb8ddf /mk/install | |
parent | 7a88ff7cda72835e9cf1153a74ff25aaef2adb54 (diff) | |
download | pkgsrc-19fd2859c5aa1414fac54458a83d8fea60985c02.tar.gz |
Package Makefiles should refer to PKG_SYSCONFBASEDIR instead of
PKG_SYSCONFBASE when they want PKG_SYSCONFDIR stripped of
PKG_SYSCONFSUBDIR. This makes PKG_SYSCONFBASE=/etc work with pkgviews by
installing all config files into /etc/packages/<pkg> instead of
occasionally putting some directly into /etc.
Also only create PKG_SYSCONFDIR if we're actually going to copy config
files.
Diffstat (limited to 'mk/install')
-rw-r--r-- | mk/install/deinstall | 6 | ||||
-rw-r--r-- | mk/install/header | 4 | ||||
-rw-r--r-- | mk/install/install | 30 |
3 files changed, 22 insertions, 18 deletions
diff --git a/mk/install/deinstall b/mk/install/deinstall index 470c5ffc811..90d2ee3afda 100644 --- a/mk/install/deinstall +++ b/mk/install/deinstall @@ -1,6 +1,6 @@ # start of deinstall # -# $NetBSD: deinstall,v 1.18 2003/09/02 07:00:06 jlam Exp $ +# $NetBSD: deinstall,v 1.19 2003/09/05 11:34:27 jlam Exp $ eval set -- ${PKG_USERS} for userset; do @@ -45,7 +45,7 @@ while [ $# -gt 0 ]; do VIEW_FILES="${VIEW_FILES} \"${file}\"" done -eval set -- ${RCD_SCRIPTS_DIR} ${MAKE_DIRS} +eval set -- ${PKG_SYSCONFDIR} ${RCD_SCRIPTS_DIR} ${MAKE_DIRS} for dir; do ALL_MAKE_DIRS="${ALL_MAKE_DIRS} \"${dir}\"" done @@ -171,7 +171,7 @@ POST-DEINSTALL) # Don't bother the admin about the following dirs # if they still exist. # - ${PKG_SYSCONFBASE}|${RCD_SCRIPTS_DIR}) + ${PKG_SYSCONFBASEDIR}|${RCD_SCRIPTS_DIR}) ;; *) if [ -d "${dir}" ]; then diff --git a/mk/install/header b/mk/install/header index a6bc0ee4692..cdf22c6c06c 100644 --- a/mk/install/header +++ b/mk/install/header @@ -2,7 +2,7 @@ # # start of header # -# $NetBSD: header,v 1.19 2003/09/02 07:00:07 jlam Exp $ +# $NetBSD: header,v 1.20 2003/09/05 11:34:27 jlam Exp $ PKGNAME=$1 STAGE=$2 @@ -66,9 +66,9 @@ MAKE_DIRS_PERMS="@MAKE_DIRS_PERMS@" OWN_DIRS="@OWN_DIRS@" OWN_DIRS_PERMS="@OWN_DIRS_PERMS@" -PKG_SYSCONFBASE="@PKG_SYSCONFBASE@" PKG_SYSCONFDEPOTBASE="@PKG_SYSCONFDEPOTBASE@" PKG_SYSCONFVIEWBASE="@PKG_SYSCONFVIEWBASE@" +PKG_SYSCONFBASEDIR="@PKG_SYSCONFBASEDIR@" PKG_SYSCONFDIR="@PKG_SYSCONFDIR@" PKG_REGISTER_SHELLS="@PKG_REGISTER_SHELLS@" diff --git a/mk/install/install b/mk/install/install index d3a3505a9b0..4bfe4a38ffe 100644 --- a/mk/install/install +++ b/mk/install/install @@ -1,6 +1,20 @@ # start of install # -# $NetBSD: install,v 1.21 2003/09/02 07:00:07 jlam Exp $ +# $NetBSD: install,v 1.22 2003/09/05 11:34:27 jlam Exp $ + +if [ -z "${CONF_FILES}" -a -z "${CONF_FILES_PERMS}" -a \ + -z "${SUPPORT_FILES}" -a -z "${SUPPORT_FILES_PERMS}" -o \ + "${_PKG_CONFIG}" = "NO" ]; then + : +else + MAKE_DIRS="${MAKE_DIRS} \"${PKG_SYSCONFDIR}\"" +fi + +if [ -z "${RCD_SCRIPTS}" -o "${_PKG_RCD_SCRIPTS}" = "NO" ]; then + : +else + MAKE_DIRS="${MAKE_DIRS} \"${RCD_SCRIPTS_DIR}\"" +fi case ${STAGE} in PRE-INSTALL) @@ -96,12 +110,7 @@ PRE-INSTALL) # if [ -n "${MAKE_DIRS}" -o -n "${OWN_DIRS}" -o \ -n "${MAKE_DIRS_PERMS}" -o -n "${OWN_DIRS_PERMS}" ]; then - if [ -z "${RCD_SCRIPTS}" -o "${_PKG_RCD_SCRIPTS}" = "NO" ]; then - _RCD_SCRIPTS_DIR= - else - _RCD_SCRIPTS_DIR="${RCD_SCRIPTS_DIR}" - fi - eval set -- ${_RCD_SCRIPTS_DIR} ${MAKE_DIRS} ${OWN_DIRS} + eval set -- ${MAKE_DIRS} ${OWN_DIRS} for dir; do if [ -d "${dir}" ]; then continue @@ -159,12 +168,7 @@ POST-INSTALL) if [ -n "${MAKE_DIRS}" -o -n "${OWN_DIRS}" -o \ -n "${MAKE_DIRS_PERMS}" -o -n "${OWN_DIRS_PERMS}" ]; then _print_dir_header=1 - if [ -z "${RCD_SCRIPTS}" -o "${_PKG_RCD_SCRIPTS}" = "NO" ]; then - _RCD_SCRIPTS_DIR= - else - _RCD_SCRIPTS_DIR="${RCD_SCRIPTS_DIR}" - fi - eval set -- ${_RCD_SCRIPTS_DIR} ${MAKE_DIRS} ${OWN_DIRS} + eval set -- ${MAKE_DIRS} ${OWN_DIRS} for dir; do if [ -d "${dir}" ]; then continue |