Make the REQ and MESSAGE files specifiable from package Makefiles,

as REQ_FILE and MESSAGE_FILE respectively.
Modify xpkgwedge to create its MESSAGE_FILE in the WRKDIR.
This commit is contained in:
agc 1998-09-17 15:47:08 +00:00
parent 9a4d510aae
commit 9db74e9f8a
2 changed files with 19 additions and 10 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: bsd.pkg.mk,v 1.164 1998/09/17 14:03:48 agc Exp $ # $NetBSD: bsd.pkg.mk,v 1.165 1998/09/17 15:47:08 agc Exp $
# #
# This file is in the public domain. # This file is in the public domain.
# #
@ -365,6 +365,16 @@ INSTALL_FILE= ${PKGDIR}/INSTALL
DEINSTALL_FILE= ${PKGDIR}/DEINSTALL DEINSTALL_FILE= ${PKGDIR}/DEINSTALL
.endif .endif
# Set REQ_FILE to be the name of any REQ file
.if !defined(REQ_FILE) && exists(${PKGDIR}/REQ)
REQ_FILE= ${PKGDIR}/REQ
.endif
# Set MESSAGE_FILE to be the name of any MESSAGE file
.if !defined(MESSAGE_FILE) && exists(${PKGDIR}/MESSAGE)
MESSAGE_FILE= ${PKGDIR}/MESSAGE
.endif
PKG_CMD?= /usr/sbin/pkg_create PKG_CMD?= /usr/sbin/pkg_create
.if !defined(PKG_ARGS) .if !defined(PKG_ARGS)
PKG_ARGS= -v -c ${COMMENT} -d ${DESCR} -f ${PLIST} -p ${PREFIX} -P "`${MAKE} package-depends|sort -u`" PKG_ARGS= -v -c ${COMMENT} -d ${DESCR} -f ${PLIST} -p ${PREFIX} -P "`${MAKE} package-depends|sort -u`"
@ -381,11 +391,11 @@ PKG_ARGS+= -i ${INSTALL_FILE}
.ifdef DEINSTALL_FILE .ifdef DEINSTALL_FILE
PKG_ARGS+= -k ${DEINSTALL_FILE} PKG_ARGS+= -k ${DEINSTALL_FILE}
.endif .endif
.if exists(${PKGDIR}/REQ) .ifdef REQ_FILE
PKG_ARGS+= -r ${PKGDIR}/REQ PKG_ARGS+= -r ${REQ_FILE}
.endif .endif
.if exists(${PKGDIR}/MESSAGE) .ifdef MESSAGE_FILE
PKG_ARGS+= -D ${PKGDIR}/MESSAGE PKG_ARGS+= -D ${MESSAGE_FILE}
.endif .endif
.if !defined(NO_MTREE) .if !defined(NO_MTREE)
PKG_ARGS+= -m ${MTREE_FILE} PKG_ARGS+= -m ${MTREE_FILE}

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.10 1998/08/23 21:25:19 frueauf Exp $ # $NetBSD: Makefile,v 1.11 1998/09/17 15:47:09 agc Exp $
# #
DISTNAME= xpkgwedge-0.4 DISTNAME= xpkgwedge-0.4
@ -12,6 +12,8 @@ NO_BUILD= yes
NO_WRKSUBDIR= yes NO_WRKSUBDIR= yes
USE_IMAKE= yes USE_IMAKE= yes
MESSAGE_FILE= ${WRKDIR}/MESSAGE
pre-extract: pre-extract:
@if [ ! -f ${X11BASE}/include/X11/X.h ]; then \ @if [ ! -f ${X11BASE}/include/X11/X.h ]; then \
${ECHO} 'xpkgwedge requires $$X11BASE to point to the real X distribution.'; \ ${ECHO} 'xpkgwedge requires $$X11BASE to point to the real X distribution.'; \
@ -25,10 +27,7 @@ pre-configure:
pre-install: pre-install:
@${SED} -e 's|@@PREFIX@@|${LOCALBASE}|g' < ${PKGDIR}/MESSAGE.pre \ @${SED} -e 's|@@PREFIX@@|${LOCALBASE}|g' < ${PKGDIR}/MESSAGE.pre \
> ${PKGDIR}/MESSAGE > ${MESSAGE_FILE}
pre-clean:
@${RM} -f ${PKGDIR}/MESSAGE
.include "../../mk/bsd.pkg.mk" .include "../../mk/bsd.pkg.mk"