aboutsummaryrefslogtreecommitdiff
path: root/sysutils/pkg_install-devel/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/pkg_install-devel/Makefile')
-rw-r--r--sysutils/pkg_install-devel/Makefile18
1 files changed, 15 insertions, 3 deletions
diff --git a/sysutils/pkg_install-devel/Makefile b/sysutils/pkg_install-devel/Makefile
index 2eeef61c6ae0..fbc1d6c679d4 100644
--- a/sysutils/pkg_install-devel/Makefile
+++ b/sysutils/pkg_install-devel/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= pkg_install
-PORTVERSION= 20040623
+PORTVERSION= 20040629
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= eik
@@ -22,6 +22,10 @@ MANCOMPRESSED= yes
MAN1= pkg_add.1 pkg_create.1 pkg_delete.1 \
pkg_info.1 pkg_version.1
+PKGREQ= ${WRKDIR}/pkg-req
+
+SED_SCRIPT= -e "s|%%PORTVERSION%%|${PORTVERSION}|g"
+
.if defined(PREFIX)
.if ${PREFIX} == "/usr"
PKGNAMESUFFIX= -base-devel
@@ -77,8 +81,13 @@ post-patch:
| ${XARGS} ${PERL} -pi.orig -e 's/__FBSDID\(("[^"]*")\)/static const char rcsid[] = $$1/'
.endif
-test: build
- @(cd ${BUILD_WRKSRC}/version && ${SH} test-pkg_version.sh)
+post-build:
+ @${SED} ${SED_SCRIPT} ${PKGDIR}/pkg-req >${WRKDIR}/pkg-req
+
+.if !defined(PACKAGE_BUILDING)
+pre-install:
+ @${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGREQ} ${PKGNAME} INSTALL
+.endif
# Call pkg-install in `do-install:' instead of `pre-install:' because it might
# deinstall pkg_info, which is fatal during `check-already-installed:'.
@@ -86,4 +95,7 @@ do-install:
${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
@(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET})
+test: build
+ @(cd ${BUILD_WRKSRC}/version && ${SH} test-pkg_version.sh)
+
.include <bsd.port.post.mk>