Subject: CVS commit: pkgsrc/mk
To: None <pkgsrc-changes@NetBSD.org>
From: Joerg Sonnenberger <joerg@netbsd.org>
List: pkgsrc-changes
Date: 10/09/2006 12:25:44
Module Name:	pkgsrc
Committed By:	joerg
Date:		Mon Oct  9 12:25:44 UTC 2006

Modified Files:
	pkgsrc/mk: bsd.prefs.mk unprivileged.mk
	pkgsrc/mk/check: check-files.mk check-interpreter.mk check-shlibs.mk
	    check-wrkref.mk
	pkgsrc/mk/flavor/pkg: metadata.mk package.mk
	pkgsrc/mk/install: install.mk
	pkgsrc/mk/package: package.mk
	pkgsrc/mk/plist: plist.mk print-plist.mk

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -r1.240 -r1.241 pkgsrc/mk/bsd.prefs.mk
cvs rdiff -r1.5 -r1.6 pkgsrc/mk/unprivileged.mk
cvs rdiff -r1.8 -r1.9 pkgsrc/mk/check/check-files.mk
cvs rdiff -r1.11 -r1.12 pkgsrc/mk/check/check-interpreter.mk
cvs rdiff -r1.4 -r1.5 pkgsrc/mk/check/check-shlibs.mk \
    pkgsrc/mk/check/check-wrkref.mk
cvs rdiff -r1.11 -r1.12 pkgsrc/mk/flavor/pkg/metadata.mk
cvs rdiff -r1.4 -r1.5 pkgsrc/mk/flavor/pkg/package.mk
cvs rdiff -r1.21 -r1.22 pkgsrc/mk/install/install.mk
cvs rdiff -r1.17 -r1.18 pkgsrc/mk/package/package.mk
cvs rdiff -r1.15 -r1.16 pkgsrc/mk/plist/plist.mk
cvs rdiff -r1.9 -r1.10 pkgsrc/mk/plist/print-plist.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.