diff options
author | jlam <jlam@pkgsrc.org> | 2003-09-12 05:15:03 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2003-09-12 05:15:03 +0000 |
commit | 08c49aada04eb7a1ed8855daf038766027d4b292 (patch) | |
tree | a36edf357dd0f4a2c742f7efa8e488e4e0c64c41 /mk/install | |
parent | 696ddf176064f250f7020572d1592276aa7deff3 (diff) | |
download | pkgsrc-08c49aada04eb7a1ed8855daf038766027d4b292.tar.gz |
Make adding config files to views other than the default view work if
PKG_SYSCONFBASE points outside of ${PREFIX}.
Diffstat (limited to 'mk/install')
-rw-r--r-- | mk/install/deinstall | 8 | ||||
-rw-r--r-- | mk/install/header | 16 | ||||
-rw-r--r-- | mk/install/install | 6 |
3 files changed, 20 insertions, 10 deletions
diff --git a/mk/install/deinstall b/mk/install/deinstall index 90d2ee3afda..267301c60e3 100644 --- a/mk/install/deinstall +++ b/mk/install/deinstall @@ -1,6 +1,6 @@ # start of deinstall # -# $NetBSD: deinstall,v 1.19 2003/09/05 11:34:27 jlam Exp $ +# $NetBSD: deinstall,v 1.20 2003/09/12 05:15:06 jlam Exp $ eval set -- ${PKG_USERS} for userset; do @@ -75,10 +75,10 @@ ALL_DIRS=` case ${STAGE} in VIEW-DEINSTALL) - if [ "${_PKG_CONFIG}" = "YES" -a \ - -n "${PKG_SYSCONFVIEWBASE}" -a -n "${VIEW_FILES}" ]; then + if [ "${_PKG_CONFIG}" = "YES" -a -n "${VIEW_FILES}" ]; then if [ -n "${PKG_SYSCONFDEPOTBASE}" ]; then ${LINKFARM} -D -t ${PKG_SYSCONFVIEWBASE} -d ${PKG_SYSCONFDEPOTBASE} ${PKGNAME} + ${RMDIR} -p ${PKG_SYSCONFVIEWBASE} 2>/dev/null || ${TRUE} else eval set -- ${VIEW_FILES} for file; do @@ -171,7 +171,7 @@ POST-DEINSTALL) # Don't bother the admin about the following dirs # if they still exist. # - ${PKG_SYSCONFBASEDIR}|${RCD_SCRIPTS_DIR}) + ${PKG_SYSCONFBASE}|${RCD_SCRIPTS_DIR}) ;; *) if [ -d "${dir}" ]; then diff --git a/mk/install/header b/mk/install/header index cdf22c6c06c..a534eb75039 100644 --- a/mk/install/header +++ b/mk/install/header @@ -2,7 +2,7 @@ # # start of header # -# $NetBSD: header,v 1.20 2003/09/05 11:34:27 jlam Exp $ +# $NetBSD: header,v 1.21 2003/09/12 05:15:07 jlam Exp $ PKGNAME=$1 STAGE=$2 @@ -46,7 +46,14 @@ USERADD="@USERADD@" XARGS="@XARGS@" PKGBASE="@PKGBASE@" + +LOCALBASE="@LOCALBASE@" +X11BASE="@X11BASE@" PREFIX="@PREFIX@" +case ${PKG_PREFIX} in +${LOCALBASE}/*) VIEW="${PKG_PREFIX#${LOCALBASE}/}" ;; +*) VIEW="" ;; +esac PKG_USERS="@PKG_USERS@" PKG_GROUPS="@PKG_GROUPS@" @@ -66,11 +73,16 @@ 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@" +case ${VIEW} in +"") PKG_SYSCONFVIEWBASE="${PKG_SYSCONFBASE}" ;; +*) PKG_SYSCONFVIEWBASE="${PKG_SYSCONFBASE}/${VIEW}" ;; +esac + PKG_REGISTER_SHELLS="@PKG_REGISTER_SHELLS@" PKG_SHELL="@PKG_SHELL@" diff --git a/mk/install/install b/mk/install/install index 4bfe4a38ffe..28838adf772 100644 --- a/mk/install/install +++ b/mk/install/install @@ -1,6 +1,6 @@ # start of install # -# $NetBSD: install,v 1.22 2003/09/05 11:34:27 jlam Exp $ +# $NetBSD: install,v 1.23 2003/09/12 05:15:07 jlam Exp $ if [ -z "${CONF_FILES}" -a -z "${CONF_FILES_PERMS}" -a \ -z "${SUPPORT_FILES}" -a -z "${SUPPORT_FILES_PERMS}" -o \ @@ -378,9 +378,7 @@ VIEW-INSTALL) (${GREP} -v ${PKG_SHELL} /etc/shells.pkgsrc."$$" || ${TRUE}; ${ECHO} ${PKG_SHELL}) > /etc/shells ${RM} /etc/shells.pkgsrc."$$" fi - if [ "${_PKG_CONFIG}" = "YES" -a \ - -n "${PKG_SYSCONFVIEWBASE}" -a \ - -n "${PKG_SYSCONFDEPOTBASE}" ]; then + if [ "${_PKG_CONFIG}" = "YES" -a -n "${PKG_SYSCONFDEPOTBASE}" ]; then if [ -n "${CONF_FILES}" -o \ -n "${CONF_FILES_PERMS}" -o \ -n "${SUPPORT_FILES}" -o \ |