From 0005c45200252aecdfc7cefbb3b2806ef72e4df0 Mon Sep 17 00:00:00 2001 From: tnn Date: Fri, 11 May 2007 16:48:55 +0000 Subject: Prepend ${PREFIX} to default location of mk.conf if we're using bmake. --- pkgtools/pkg_rolling-replace/Makefile | 10 ++++++++-- pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.8 | 9 +++++---- pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh | 9 ++++----- 3 files changed, 17 insertions(+), 11 deletions(-) (limited to 'pkgtools/pkg_rolling-replace') diff --git a/pkgtools/pkg_rolling-replace/Makefile b/pkgtools/pkg_rolling-replace/Makefile index a5e4a128b16..9f2e1ceb8c1 100644 --- a/pkgtools/pkg_rolling-replace/Makefile +++ b/pkgtools/pkg_rolling-replace/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.5 2007/05/10 02:55:31 tnn Exp $ +# $NetBSD: Makefile,v 1.6 2007/05/11 16:48:55 tnn Exp $ DISTNAME= pkg_rolling-replace-0.04 -PKGREVISION= 4 +PKGREVISION= 5 CATEGORIES= pkgtools MASTER_SITES= # empty DISTFILES= # empty @@ -29,6 +29,12 @@ SUBST_MESSAGE.makepath= Fixing path to ${MAKE}. SUBST_FILES.makepath= pkg_rolling-replace.sh SUBST_SED.makepath= -e 's,@MAKE@,${MAKE},g' +SUBST_CLASSES+= makeconf +SUBST_STAGE.makeconf= pre-configure +SUBST_MESSAGE.makeconf= Recording default path of mk.conf. +SUBST_FILES.makeconf= pkg_rolling-replace.sh +SUBST_SED.makeconf= -e 's,@MAKECONF@,${MAKE:T:Mbmake:S/bmake/${PREFIX}/g}/etc/mk.conf,g' + .include "../../mk/bsd.prefs.mk" # target exists only to force check-pkgsrc-patch prior to install diff --git a/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.8 b/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.8 index 437c1791542..34e93b9564d 100644 --- a/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.8 +++ b/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.8 @@ -1,5 +1,5 @@ -.\" $NetBSD: pkg_rolling-replace.8,v 1.4 2007/05/10 03:02:20 tnn Exp $ -.Dd May 10, 2007 +.\" $NetBSD: pkg_rolling-replace.8,v 1.5 2007/05/11 16:48:55 tnn Exp $ +.Dd May 11, 2007 .Dt PKG_ROLLING-REPLACE 8 .Os .Sh NAME @@ -91,8 +91,9 @@ Path to .Pa mk.conf . Defaults to .Pa /etc/mk.conf -with a fallback to -.Pa /usr/pkgsrc/etc/mk.conf . +or +.Pa ${PREFIX}/etc/mk.conf +(if using bmake). .It Ev PKGSRCDIR Base of pkgsrc tree. Defaults to value configured in MAKECONF or diff --git a/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh b/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh index 11189ee9931..1e36247152a 100755 --- a/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh +++ b/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh @@ -1,6 +1,6 @@ #!/bin/sh -# $NetBSD: pkg_rolling-replace.sh,v 1.3 2007/05/10 02:55:31 tnn Exp $ +# $NetBSD: pkg_rolling-replace.sh,v 1.4 2007/05/11 16:48:55 tnn Exp $ # # Copyright (c) 2006 BBN Technologies Corp. All rights reserved. # @@ -62,12 +62,11 @@ # # Substituted by pkgsrc at pre-configure time. -MAKE=@MAKE@ +MAKE="@MAKE@" test -z "$PKG_DBDIR" && PKG_DBDIR=/var/db/pkg -test -z "$MAKECONF" && M=/etc/mk.conf && test -f $M && MAKECONF=$M -test -z "$MAKECONF" && M=/usr/pkg/etc/mk.conf && test -f $M && MAKECONF=$M -test -z "$PKGSRCDIR" && test -f "$MAKECONF" && \ +test -z "$MAKECONF" && MAKECONF="@MAKECONF@" +test -f "$MAKECONF" && test -z "$PKGSRCDIR" && \ PKGSRCDIR="`$MAKE -f \"$MAKECONF\" BSD_PKG_MK=1 -V PKGSRCDIR`" test -z "$PKGSRCDIR" && PKGSRCDIR=/usr/pkgsrc -- cgit v1.2.3