diff options
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.install.mk | 4 | ||||
-rw-r--r-- | mk/bsd.pkg.mk | 5 | ||||
-rw-r--r-- | mk/install/deinstall | 8 | ||||
-rw-r--r-- | mk/install/header | 16 | ||||
-rw-r--r-- | mk/install/install | 6 |
5 files changed, 23 insertions, 16 deletions
diff --git a/mk/bsd.pkg.install.mk b/mk/bsd.pkg.install.mk index ea8c515b4c0..db9295ee410 100644 --- a/mk/bsd.pkg.install.mk +++ b/mk/bsd.pkg.install.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.install.mk,v 1.50 2003/09/06 11:51:16 jlam Exp $ +# $NetBSD: bsd.pkg.install.mk,v 1.51 2003/09/12 05:15:03 jlam Exp $ # # This Makefile fragment is included by package Makefiles to use the common # INSTALL/DEINSTALL scripts. To use this Makefile fragment, simply: @@ -62,8 +62,8 @@ INSTALL_SRC?= ${INSTALL_TEMPLATES} FILES_SUBST+= PREFIX=${PREFIX} FILES_SUBST+= LOCALBASE=${LOCALBASE} FILES_SUBST+= X11BASE=${X11BASE} +FILES_SUBST+= PKG_SYSCONFBASE=${PKG_SYSCONFBASE} FILES_SUBST+= PKG_SYSCONFDEPOTBASE=${PKG_SYSCONFDEPOTBASE} -FILES_SUBST+= PKG_SYSCONFVIEWBASE=${PKG_SYSCONFVIEWBASE} FILES_SUBST+= PKG_SYSCONFBASEDIR=${PKG_SYSCONFBASEDIR} FILES_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR} FILES_SUBST+= PKGBASE=${PKGBASE} diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index e99ddfa4af2..160e99abc96 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1269 2003/09/10 22:29:10 jmmv Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1270 2003/09/12 05:15:04 jlam Exp $ # # This file is in the public domain. # @@ -1245,15 +1245,12 @@ PKG_SYSCONFVAR?= ${PKGBASE} PKG_SYSCONFDIR= ${PKG_SYSCONFDIR.${PKG_SYSCONFVAR}} PKG_SYSCONFBASEDIR= ${PKG_SYSCONFDIR.${PKG_SYSCONFVAR}} PKG_SYSCONFDEPOTBASE= # empty -PKG_SYSCONFVIEWBASE= # empty .else PKG_SYSCONFSUBDIR?= # empty . if ${PKG_INSTALLATION_TYPE} == "overwrite" PKG_SYSCONFDEPOTBASE= # empty -PKG_SYSCONFVIEWBASE= # empty PKG_SYSCONFBASEDIR= ${PKG_SYSCONFBASE} . else -PKG_SYSCONFVIEWBASE= ${PKG_SYSCONFBASE} . if !empty(PKG_SYSCONFBASE:M${PREFIX}) || \ !empty(PKG_SYSCONFBASE:M${PREFIX}/*) PKG_SYSCONFDEPOTBASE= # empty 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 \ |