diff options
author | joerg <joerg@pkgsrc.org> | 2006-11-03 08:01:04 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2006-11-03 08:01:04 +0000 |
commit | 62b03eb280a0a0154561b8d87271a734f2939b9a (patch) | |
tree | 1375c4fddb43ede53151ad40f511b0ec63c2c28a /mk/flavor | |
parent | 30fd24550341d9a6a22039d9bb6945580121ddcb (diff) | |
download | pkgsrc-62b03eb280a0a0154561b8d87271a734f2939b9a.tar.gz |
Add package-install. For non-DESTDIR builds, package and package-install
are identical. For DESTDIR builds, the package is not installed to
PREFIX as part of the build, so package-install does exactly that after
package is done. Change bin-install to call package-install.
Diffstat (limited to 'mk/flavor')
-rw-r--r-- | mk/flavor/pkg/package.mk | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/mk/flavor/pkg/package.mk b/mk/flavor/pkg/package.mk index 291cef480ca..4630e6a2ef7 100644 --- a/mk/flavor/pkg/package.mk +++ b/mk/flavor/pkg/package.mk @@ -1,4 +1,4 @@ -# $NetBSD: package.mk,v 1.5 2006/10/09 12:25:44 joerg Exp $ +# $NetBSD: package.mk,v 1.6 2006/11/03 08:01:04 joerg Exp $ PKG_SUFX?= .tgz PKGFILE?= ${PKGREPOSITORY}/${PKGNAME}${PKG_SUFX} @@ -111,3 +111,29 @@ tarup-pkg: ${SETENV} PKG_DBDIR=${_PKG_DBDIR} PKG_SUFX=${PKG_SUFX} \ PKGREPOSITORY=${PKGREPOSITORY} \ ${_PKG_TARUP_CMD} ${PKGNAME} + +###################################################################### +### package-install (PUBLIC) +###################################################################### +### When DESTDIR support is active, package-install uses package to +### create a binary package and installs it. +### Otherwise it is identical to calling package. +### + +.PHONY: package-install real-package-install su-real-package-install +.if defined(_PKGSRC_BARRIER) +package-install: package real-package-install +.else +package-install: barrier +.endif + +.if ${_USE_DESTDIR} != "no" +real-package-install: su-target +.else +real-package-install: + @${DO_NADA} +.endif + +su-real-package-install: + @${PHASE_MSG} "Install binary package of "${PKGNAME:Q} + cd ${PREFIX} && ${PKG_ADD} ${PKGFILE} |