aboutsummaryrefslogtreecommitdiff
path: root/ports-mgmt/pkg_install-devel
diff options
context:
space:
mode:
authorOliver Eikemeier <eik@FreeBSD.org>2004-06-30 10:31:45 +0000
committerOliver Eikemeier <eik@FreeBSD.org>2004-06-30 10:31:45 +0000
commitccceaf623b39786c326fa4cb390dd181d27803c1 (patch)
tree7c9b50ec7a8d81a5341fb6d7e2cbf715694632bd /ports-mgmt/pkg_install-devel
parent7e857913fd6b1f94beefb222a8068b2e22506820 (diff)
downloadports-ccceaf623b39786c326fa4cb390dd181d27803c1.tar.gz
ports-ccceaf623b39786c326fa4cb390dd181d27803c1.zip
Notes
Diffstat (limited to 'ports-mgmt/pkg_install-devel')
-rw-r--r--ports-mgmt/pkg_install-devel/Makefile18
-rw-r--r--ports-mgmt/pkg_install-devel/distinfo4
-rw-r--r--ports-mgmt/pkg_install-devel/pkg-req16
3 files changed, 33 insertions, 5 deletions
diff --git a/ports-mgmt/pkg_install-devel/Makefile b/ports-mgmt/pkg_install-devel/Makefile
index 2eeef61c6ae0..fbc1d6c679d4 100644
--- a/ports-mgmt/pkg_install-devel/Makefile
+++ b/ports-mgmt/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>
diff --git a/ports-mgmt/pkg_install-devel/distinfo b/ports-mgmt/pkg_install-devel/distinfo
index 585ea2079229..6287e86b26b4 100644
--- a/ports-mgmt/pkg_install-devel/distinfo
+++ b/ports-mgmt/pkg_install-devel/distinfo
@@ -1,2 +1,2 @@
-MD5 (pkg_install-20040623.tar.gz) = 9385862abe17c95ac0e5e74fa5ca4113
-SIZE (pkg_install-20040623.tar.gz) = 87798
+MD5 (pkg_install-20040629.tar.gz) = 7e563e7d5fe0eb14c7d11de7b69df9e6
+SIZE (pkg_install-20040629.tar.gz) = 86401
diff --git a/ports-mgmt/pkg_install-devel/pkg-req b/ports-mgmt/pkg_install-devel/pkg-req
new file mode 100644
index 000000000000..c7d1b7507722
--- /dev/null
+++ b/ports-mgmt/pkg_install-devel/pkg-req
@@ -0,0 +1,16 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+PKG_INFO=/usr/sbin/pkg_info
+
+case $2 in
+INSTALL)
+ PKG_INSTALL_VER=`${PKG_INFO} -qP 2>/dev/null`
+ if [ -n "${PKG_INSTALL_VER}" -a "${PKG_INSTALL_VER}" -ge %%PORTVERSION%% ]; then
+ echo "Your base pkg_install tools are already up-to-date"
+ exit 1
+ fi
+ ;;
+esac