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 | |
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')
-rw-r--r-- | mk/bsd.pkg.barrier.mk | 3 | ||||
-rw-r--r-- | mk/flavor/pkg/package.mk | 28 | ||||
-rw-r--r-- | mk/install/bin-install.mk | 4 |
3 files changed, 31 insertions, 4 deletions
diff --git a/mk/bsd.pkg.barrier.mk b/mk/bsd.pkg.barrier.mk index c6a8882d17a..4d873318bcb 100644 --- a/mk/bsd.pkg.barrier.mk +++ b/mk/bsd.pkg.barrier.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.barrier.mk,v 1.12 2006/10/06 19:04:37 rillig Exp $ +# $NetBSD: bsd.pkg.barrier.mk,v 1.13 2006/11/03 08:01:04 joerg Exp $ _COOKIE.barrier= ${WRKDIR}/.barrier_cookie @@ -27,6 +27,7 @@ _BARRIER_POST_TARGETS+= reinstall _BARRIER_POST_TARGETS+= replace _BARRIER_POST_TARGETS+= package _BARRIER_POST_TARGETS+= repackage +_BARRIER_POST_TARGETS+= package-install .for _target_ in ${_BARRIER_POST_TARGETS} . if make(${_target_}) 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} diff --git a/mk/install/bin-install.mk b/mk/install/bin-install.mk index 775606967ae..c645244ceba 100644 --- a/mk/install/bin-install.mk +++ b/mk/install/bin-install.mk @@ -1,4 +1,4 @@ -# $NetBSD: bin-install.mk,v 1.5 2006/10/03 11:07:05 rillig Exp $ +# $NetBSD: bin-install.mk,v 1.6 2006/11/03 08:01:04 joerg Exp $ # # This file provides the following targets: @@ -71,6 +71,6 @@ do-bin-install-from-source: : "Nothing to do"; \ else \ ${STEP_MSG} "No binary package found for ${PKGNAME}; installing from source."; \ - ${RECURSIVE_MAKE} ${MAKEFLAGS} DEPENDS_TARGET=${DEPENDS_TARGET:Q} package \ + ${RECURSIVE_MAKE} ${MAKEFLAGS} DEPENDS_TARGET=${DEPENDS_TARGET:Q} package-install \ && ${RECURSIVE_MAKE} ${MAKEFLAGS} clean; \ fi |