aboutsummaryrefslogtreecommitdiff
path: root/Mk/bsd.port.mk
diff options
context:
space:
mode:
authorSatoshi Asami <asami@FreeBSD.org>1995-04-09 09:59:42 +0000
committerSatoshi Asami <asami@FreeBSD.org>1995-04-09 09:59:42 +0000
commit75fbcbe580c5ec7898ececc17fb60e5829b5e926 (patch)
tree57e59eb31f9f66647ea80b59d15975b359b49202 /Mk/bsd.port.mk
parent02fa28d0318f53fd94d7db59cea41ebc14e429a2 (diff)
downloadports-75fbcbe580c5ec7898ececc17fb60e5829b5e926.tar.gz
ports-75fbcbe580c5ec7898ececc17fb60e5829b5e926.zip
Notes
Diffstat (limited to 'Mk/bsd.port.mk')
-rw-r--r--Mk/bsd.port.mk31
1 files changed, 25 insertions, 6 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 2bbb24be028e..46776aad1206 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -3,7 +3,7 @@
# bsd.port.mk - 940820 Jordan K. Hubbard.
# This file is in the public domain.
#
-# $Id: bsd.port.mk,v 1.131 1995/04/04 04:23:37 gpalmer Exp $
+# $Id: bsd.port.mk,v 1.132 1995/04/04 05:57:19 jkh Exp $
#
# Please view me with 4 column tabs!
@@ -267,8 +267,10 @@ MAINTAINER?= ports@FreeBSD.ORG
CATEGORIES?= orphans
KEYWORDS?= ${CATEGORIES}
+PKGREPOSITORYSUBDIR?= .package
+PKGREPOSITORY?= ${PACKAGES}/${PKGREPOSITORYSUBDIR}
.if exists(${PACKAGES})
-PKGFILE?= ${PACKAGES}/${PKGNAME}${PKG_SUFX}
+PKGFILE?= ${PKGREPOSITORY}/${PKGNAME}${PKG_SUFX}
.else
PKGFILE?= ${PKGNAME}${PKG_SUFX}
.endif
@@ -420,12 +422,29 @@ pre-package:
.if !target(package)
package: pre-package
-# Makes some gross assumptions about a fairly simple package with no
-# 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 \
+ @if [ -e ${PKGDIR}/PLIST ]; then \
${ECHO_MSG} "===> Building package for ${DISTNAME}"; \
+ if [ -d ${PACKAGES} ]; then \
+ if [ ! -d ${PKGREPOSITORY} ]; then \
+ if ! mkdir -p ${PKGREPOSITORY}; then \
+ ${ECHO_MSG} ">> Can't create directory ${PKGREPOSITORY}."; \
+ exit 1; \
+ fi; \
+ fi; \
+ fi; \
${PKG_CMD} ${PKG_ARGS} ${PKGFILE}; \
+ if [ -d ${PACKAGES} ]; then \
+ rm -f ${PACKAGES}/*/${PKGNAME}${PKG_SUFX}; \
+ for cat in ${CATEGORIES}; do \
+ if [ ! -d ${PACKAGES}/$$cat ]; then \
+ if ! mkdir -p ${PACKAGES}/$$cat; then \
+ ${ECHO_MSG} ">> Can't create directory ${PACKAGES}/$$cat."; \
+ exit 1; \
+ fi; \
+ fi; \
+ ln -s ../${PKGREPOSITORYSUBDIR}/${PKGNAME}${PKG_SUFX} ${PACKAGES}/$$cat; \
+ done; \
+ fi; \
fi
.endif