diff options
author | joerg <joerg@pkgsrc.org> | 2006-10-09 12:25:44 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2006-10-09 12:25:44 +0000 |
commit | 5b374e445d1af7cb5c191eded8e436c25ef84c54 (patch) | |
tree | 9814d8b785561d4625d3535aa344ea9c5b84ef85 /mk/check/check-files.mk | |
parent | a8e70089029ef60b4f74d3451dfa967cab20e71e (diff) | |
download | pkgsrc-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/check/check-files.mk')
-rw-r--r-- | mk/check/check-files.mk | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mk/check/check-files.mk b/mk/check/check-files.mk index 9bf97b02382..7a2170b58a6 100644 --- a/mk/check/check-files.mk +++ b/mk/check/check-files.mk @@ -1,4 +1,4 @@ -# $NetBSD: check-files.mk,v 1.8 2006/09/22 21:53:58 joerg Exp $ +# $NetBSD: check-files.mk,v 1.9 2006/10/09 12:25:44 joerg Exp $ .if defined(PKG_DEVELOPER) CHECK_FILES?= yes @@ -65,7 +65,7 @@ CHECK_FILES_SKIP+= ${PREFIX}/.*/fonts.cache-1 # Mutable charset.alias file CHECK_FILES_SKIP+= ${PREFIX}/lib/charset.alias -_CHECK_FILES_SKIP_FILTER= ${GREP} -vx ${CHECK_FILES_SKIP:@f@-e ${f:Q}@} +_CHECK_FILES_SKIP_FILTER= ${GREP} -vx ${CHECK_FILES_SKIP:@f@-e ${DESTDIR:Q}${f:Q}@} ########################################################################### # These are the files generated and used by the check-files implementation @@ -144,7 +144,7 @@ check-files-post-message: ${_CHECK_FILES_PRE.prefix} ${_CHECK_FILES_POST.prefix}: ${_PKG_SILENT}${_PKG_DEBUG} \ - ${FIND} ${PREFIX}/. \( -type f -o -type l \) -print 2>/dev/null \ + ${FIND} ${DESTDIR}${PREFIX}/. \( -type f -o -type l \) -print 2>/dev/null \ | ${SED} -e 's,/\./,/,' \ | ${_CHECK_FILES_SKIP_FILTER} \ | ${SORT} > ${.TARGET} \ @@ -152,7 +152,7 @@ ${_CHECK_FILES_PRE.prefix} ${_CHECK_FILES_POST.prefix}: ${_CHECK_FILES_PRE.sysconfdir} ${_CHECK_FILES_POST.sysconfdir}: ${_PKG_SILENT}${_PKG_DEBUG} \ - ${FIND} ${PKG_SYSCONFDIR}/. -print 2>/dev/null \ + ${FIND} ${DESTDIR}${PKG_SYSCONFDIR}/. -print 2>/dev/null \ | ${SED} -e 's,/\./,/,' \ | ${_CHECK_FILES_SKIP_FILTER} \ | ${SORT} > ${.TARGET} \ @@ -160,7 +160,7 @@ ${_CHECK_FILES_PRE.sysconfdir} ${_CHECK_FILES_POST.sysconfdir}: ${_CHECK_FILES_PRE.varbase} ${_CHECK_FILES_POST.varbase}: ${_PKG_SILENT}${_PKG_DEBUG} \ - ${FIND} ${VARBASE}/. -print 2>/dev/null \ + ${FIND} ${DESTDIR}${VARBASE}/. -print 2>/dev/null \ | ${SED} -e 's,/\./,/,' \ | ${_CHECK_FILES_SKIP_FILTER} \ | ${SORT} > ${.TARGET} \ @@ -221,7 +221,7 @@ ${_CHECK_FILES_DELETED}: ${_CHECK_FILES_DIFF} ${_CHECK_FILES_EXPECTED}: plist ${_PKG_SILENT}${_PKG_DEBUG} \ - ${GREP} '^[^@]' ${PLIST} | ${SED} "s|^|${PREFIX}/|" | ${SORT} \ + ${GREP} '^[^@]' ${PLIST} | ${SED} "s|^|${DESTDIR}${PREFIX}/|" | ${SORT} \ > ${.TARGET} ${_CHECK_FILES_MISSING}: ${_CHECK_FILES_EXPECTED} ${_CHECK_FILES_ADDED} |