summaryrefslogtreecommitdiff
path: root/mk/plist/plist.mk
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2006-10-09 12:25:44 +0000
committerjoerg <joerg@pkgsrc.org>2006-10-09 12:25:44 +0000
commit1309bbb4267377288c3d88aa567d126a963fceeb (patch)
tree9814d8b785561d4625d3535aa344ea9c5b84ef85 /mk/plist/plist.mk
parentc4170bda15ee54fd5095d9f81bc37151f1d41440 (diff)
downloadpkgsrc-1309bbb4267377288c3d88aa567d126a963fceeb.tar.gz
Main infrastructure for DESTDIR support.
Packages may set PKG_DESTDIR_SUPPORT to either "destdir" or "user-destdir" to flag support for this, following the same rules as PKG_INSTALLATION_TYPES (e.g. define before first include of bsd.prefs.mk). The user activates it via USE_DESTDIR. When set to "yes", packages with "user-destdir" are handled as "destdir". The installation of the package will not go to ${LOCALBASE}, but a subdirectory of ${WRKDIR} instead. pre/post install scripts are not run and the package is not registered either. A binary package can be created instead to be installed normally with pkg_add. For "user-destdir" packages, everything is run as normal user and ownership is supposed to be correctled by pkg_create later. Since the current pkg_install code uses pax and it doesn't allow overwriting owners, this does not work yet. For "destdir" packages, installation, packaging and cleaning is run as root. This commit does not change the handling of DEPENDS_TARGET or bin-install to allow recursive usage.
Diffstat (limited to 'mk/plist/plist.mk')
-rw-r--r--mk/plist/plist.mk12
1 files changed, 6 insertions, 6 deletions
diff --git a/mk/plist/plist.mk b/mk/plist/plist.mk
index 3b0e3101140..ed9948c4b40 100644
--- a/mk/plist/plist.mk
+++ b/mk/plist/plist.mk
@@ -1,4 +1,4 @@
-# $NetBSD: plist.mk,v 1.15 2006/07/21 13:40:27 jlam Exp $
+# $NetBSD: plist.mk,v 1.16 2006/10/09 12:25:44 joerg Exp $
#
# This Makefile fragment handles the creation of PLISTs for use by
# pkg_create(8).
@@ -102,7 +102,7 @@ _PLIST_AWK_ENV+= LS=${TOOLS_LS:Q}
_PLIST_AWK_ENV+= MANINSTALL=${MANINSTALL:Q}
_PLIST_AWK_ENV+= MANZ=${_MANZ:Q}
_PLIST_AWK_ENV+= PKGMANDIR=${PKGMANDIR:Q}
-_PLIST_AWK_ENV+= PREFIX=${PREFIX:Q}
+_PLIST_AWK_ENV+= PREFIX=${DESTDIR:Q}${PREFIX:Q}
_PLIST_AWK_ENV+= TEST=${TOOLS_TEST:Q}
# PLIST_SUBST contains package-settable "${variable}" to "value"
@@ -205,13 +205,13 @@ _PLIST_IGNORE_CMD= \
[ "$$ignore" = "yes" ] || ${ECHO} "$$i"; \
done )
_GENERATE_PLIST= \
- ${FIND} ${PREFIX} \! -type d -print | ${SORT} | \
- ${SED} -e "s|^${PREFIX}/||" | \
+ ${FIND} ${DESTDIR}${PREFIX} \! -type d -print | ${SORT} | \
+ ${SED} -e "s|^${DESTDIR}${PREFIX}/||" | \
${_PLIST_IGNORE_CMD}; \
- ${FIND} ${PREFIX} -type d -print | ${SORT} -r | \
+ ${FIND} ${DESTDIR}${PREFIX} -type d -print | ${SORT} -r | \
${GREP} -v "^${PREFIX}$$" | \
${_PLIST_IGNORE_CMD} | \
- ${SED} -e "s|^${PREFIX}/|@unexec ${RMDIR} -p %D/|" \
+ ${SED} -e "s|^${DESTDIR}${PREFIX}/|@unexec ${RMDIR} -p %D/|" \
-e "s,$$, 2>/dev/null || ${TRUE},";
.else
_GENERATE_PLIST= ${CAT} ${PLIST_SRC}; \