summaryrefslogtreecommitdiff
path: root/mk/bsd.pkg.install.mk
diff options
context:
space:
mode:
authorjlam <jlam>2003-07-29 20:34:17 +0000
committerjlam <jlam>2003-07-29 20:34:17 +0000
commitb2b4b09f30c2ef27734f3530c503675c07de5da2 (patch)
treef88e233fd5a0d0c2c2115d779cf276c1e5346827 /mk/bsd.pkg.install.mk
parentb7c9a8d1bb95b31282bc44bf6d101b3838ab328f (diff)
downloadpkgsrc-b2b4b09f30c2ef27734f3530c503675c07de5da2.tar.gz
Config file handling in the pkgviews world is that each package
installed on the system has a unique config file directory by default, and that the config files are symlinked into view-friendly places during the VIEW-INSTALL step. There are three cases: (1) If PKG_SYSCONFBASE points to somewhere under PREFIX, then we don't have to do anything, as everything (except for scratch files: *[~#], *.OLD, *.orig, *,v) in PREFIX is symlinked into the view automatically when the package is added to the view using pkg_view(1). (2) If PKG_SYSCONFBASE points outside of PREFIX, then we construct a PKG_SYSCONFDIR as: ${PKG_SYSCONFBASE}/${DEPOT_SUBDIR}/${PKGNAME} This mirrors the directory layout in ${LOCALBASE}/${X11BASE} for depoted packages. Then during VIEW-INSTALL time, we "add" a view to the package config files by using linkfarm(1) to symlink everything (again, except for scratch files) from PKG_SYSCONFDIR into PKG_SYSCONFBASE. (3) If PKG_SYSCONFDIR.${PKG_SYSCONFVAR} is set, then we don't do any view-friendly symlinking. Case (1) is the default. Case (2) handles the NFS-shared /usr/pkg case where config files really shouldn't be shared, and the usual setting of PKG_SYSCONFBASE=/etc in /etc/mk.conf should do the right thing. Case (3) tries to avoid being overly smart and possibly messing up when the package builder does something special for the package.
Diffstat (limited to 'mk/bsd.pkg.install.mk')
-rw-r--r--mk/bsd.pkg.install.mk7
1 files changed, 5 insertions, 2 deletions
diff --git a/mk/bsd.pkg.install.mk b/mk/bsd.pkg.install.mk
index 556cae990c3..7419134a424 100644
--- a/mk/bsd.pkg.install.mk
+++ b/mk/bsd.pkg.install.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.install.mk,v 1.40.4.1 2003/07/24 23:45:06 jlam Exp $
+# $NetBSD: bsd.pkg.install.mk,v 1.40.4.2 2003/07/29 20:34:17 jlam Exp $
#
# This Makefile fragment is included by package Makefiles to use the common
# INSTALL/DEINSTALL scripts. To use this Makefile fragment, simply:
@@ -63,7 +63,9 @@ 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_SYSCONFBASE=${_PKG_SYSCONFBASE}
+FILES_SUBST+= PKG_SYSCONFDEPOTBASE=${PKG_SYSCONFDEPOTBASE}
+FILES_SUBST+= PKG_SYSCONFVIEWBASE=${PKG_SYSCONFVIEWBASE}
FILES_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
FILES_SUBST+= PKGBASE=${PKGBASE}
FILES_SUBST+= PKG_INSTALLATION_TYPE=${PKG_INSTALLATION_TYPE}
@@ -248,6 +250,7 @@ FILES_SUBST+= GTAR=${GTAR:Q}
FILES_SUBST+= HEAD=${HEAD:Q}
FILES_SUBST+= ID=${ID:Q}
FILES_SUBST+= INSTALL_INFO=${INSTALL_INFO:Q}
+FILES_SUBST+= LINKFARM=${LINKFARM:Q}
FILES_SUBST+= LN=${LN:Q}
FILES_SUBST+= MKDIR=${MKDIR:Q}
FILES_SUBST+= MV=${MV:Q}