pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Make adding config files to views other than the de...
details: https://anonhg.NetBSD.org/pkgsrc/rev/a8439822750a
branches: trunk
changeset: 461168:a8439822750a
user: jlam <jlam%pkgsrc.org@localhost>
date: Fri Sep 12 05:15:03 2003 +0000
description:
Make adding config files to views other than the default view work if
PKG_SYSCONFBASE points outside of ${PREFIX}.
diffstat:
mk/bsd.pkg.install.mk | 4 ++--
mk/bsd.pkg.mk | 5 +----
mk/install/deinstall | 8 ++++----
mk/install/header | 16 ++++++++++++++--
mk/install/install | 6 ++----
5 files changed, 23 insertions(+), 16 deletions(-)
diffs (144 lines):
diff -r d4a0d4e2108a -r a8439822750a mk/bsd.pkg.install.mk
--- a/mk/bsd.pkg.install.mk Fri Sep 12 03:22:31 2003 +0000
+++ b/mk/bsd.pkg.install.mk Fri Sep 12 05:15:03 2003 +0000
@@ -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 @@
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 -r d4a0d4e2108a -r a8439822750a mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk Fri Sep 12 03:22:31 2003 +0000
+++ b/mk/bsd.pkg.mk Fri Sep 12 05:15:03 2003 +0000
@@ -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_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 -r d4a0d4e2108a -r a8439822750a mk/install/deinstall
--- a/mk/install/deinstall Fri Sep 12 03:22:31 2003 +0000
+++ b/mk/install/deinstall Fri Sep 12 05:15:03 2003 +0000
@@ -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 @@
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 @@
# 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 -r d4a0d4e2108a -r a8439822750a mk/install/header
--- a/mk/install/header Fri Sep 12 03:22:31 2003 +0000
+++ b/mk/install/header Fri Sep 12 05:15:03 2003 +0000
@@ -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 @@
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 @@
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 -r d4a0d4e2108a -r a8439822750a mk/install/install
--- a/mk/install/install Fri Sep 12 03:22:31 2003 +0000
+++ b/mk/install/install Fri Sep 12 05:15:03 2003 +0000
@@ -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 @@
(${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 \
Home |
Main Index |
Thread Index |
Old Index