summaryrefslogtreecommitdiff
path: root/Mk/bsd.port.mk
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1994-08-22 13:11:32 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1994-08-22 13:11:32 +0000
commit6715e4966eb4c6218c59ddf5b59d76d0c5fe13f6 (patch)
treedce06a6814babeeee27a6e696f30c9deca400bb6 /Mk/bsd.port.mk
parentUpdate this for 19.25; no lib/emacs/lisp dir now. (diff)
Make package target a lot more general.
Submitted by: jkh
Diffstat (limited to 'Mk/bsd.port.mk')
-rw-r--r--Mk/bsd.port.mk20
1 files changed, 14 insertions, 6 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 22d259caeda6..7b15936ceceb 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -1,7 +1,7 @@
# bsd.port.mk - 940820 Jordan K. Hubbard.
# This file is in the public domain.
#
-# $Id: bsd.port.mk,v 1.12 1994/08/22 12:00:34 jkh Exp $
+# $Id: bsd.port.mk,v 1.13 1994/08/22 12:07:19 jkh Exp $
#
# Supported Variables and their behaviors:
@@ -49,6 +49,7 @@ GMAKE?= gmake
# by individual Makefiles.
PORTSDIR?= /usr/ports
DISTDIR?= ${PORTSDIR}/distfiles
+PACKAGES?= ${PORTSDIR}/packages
WRKDIR?= ${.CURDIR}/work
WRKSRC?= ${WRKDIR}/${DISTNAME}
@@ -69,6 +70,10 @@ EXTRACT_ARGS?= -C ${WRKDIR} -xzf
BUNDLE_CMD?= tar
BUNDLE_ARGS?= -C ${WRKDIR} -czf
+PKG_CMD?= pkg_create
+PKG_ARGS?= -c ${PKGDIR}/COMMENT -d ${PKGDIR}/DESCR -f ${PKGDIR}/PLIST
+PKG_SUFX?= .tgz
+
HOME_LOCATION?= <original site unknown>
.MAIN: all
@@ -87,13 +92,16 @@ install:
.if !target(package)
package:
# Makes some gross assumptions about a fairly simple package with no
-# install, require or deinstall scripts. Override this rule if your
-# package is anything but run-of-the-mill (or show me a way to do this
-# more generally).
+# install, require or deinstall scripts. Override the arguments with
+# PKG_ARGS if your package is anything but run-of-the-mill.
@if [ -d ${PKGDIR} ]; then \
echo "===> Building package for ${DISTNAME}"; \
- pkg_create -c ${PKGDIR}/COMMENT -d ${PKGDIR}/DESCR \
- -f ${PKGDIR}/PLIST ${DISTNAME}.tgz; \
+ if [ -d ${PACKAGES} ]; then \
+ _TARGET=${PACKAGES}/${DISTNAME}${PKG_SUFX}; \
+ else \
+ _TARGET=${DISTNAME}${PKG_SUFX}; \
+ fi \
+ ${PKG_CMD} ${PKG_ARGS} ${_TARGET}; \
fi
.endif