summaryrefslogtreecommitdiff
path: root/mk/package/package.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
commit5b374e445d1af7cb5c191eded8e436c25ef84c54 (patch)
tree9814d8b785561d4625d3535aa344ea9c5b84ef85 /mk/package/package.mk
parenta8e70089029ef60b4f74d3451dfa967cab20e71e (diff)
downloadpkgsrc-5b374e445d1af7cb5c191eded8e436c25ef84c54.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/package/package.mk')
-rw-r--r--mk/package/package.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/mk/package/package.mk b/mk/package/package.mk
index d3a9ca63530..b7fd8ada7c5 100644
--- a/mk/package/package.mk
+++ b/mk/package/package.mk
@@ -1,4 +1,4 @@
-# $NetBSD: package.mk,v 1.17 2006/10/09 11:44:07 joerg Exp $
+# $NetBSD: package.mk,v 1.18 2006/10/09 12:25:44 joerg Exp $
######################################################################
### package (PUBLIC)
@@ -77,7 +77,9 @@ package-cookie:
### package-all is a helper target to create the binary package and
### generate any necessary warnings.
###
+.if ${_USE_DESTDIR} == "no"
_PACKAGE_ALL_TARGETS+= package-check-installed
+.endif
_PACKAGE_ALL_TARGETS+= package-create
_PACKAGE_ALL_TARGETS+= package-warnings
_PACKAGE_ALL_TARGETS+= error-check