From 4873e6faa98cb507f86814b5fc15b161917a6550 Mon Sep 17 00:00:00 2001 From: jmcneill Date: Wed, 19 Nov 2014 15:10:32 +0000 Subject: allow overriding the default repository URL with PKGIN_REPOSITORY_URL --- pkgtools/pkgin/Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'pkgtools') diff --git a/pkgtools/pkgin/Makefile b/pkgtools/pkgin/Makefile index e78ef218118..3cbe09c1ff2 100644 --- a/pkgtools/pkgin/Makefile +++ b/pkgtools/pkgin/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.48 2014/10/07 16:47:34 adam Exp $ +# $NetBSD: Makefile,v 1.49 2014/11/19 15:10:32 jmcneill Exp $ GHCOMMIT= 3859170568fbe4fe21b5660dbaeca8d65ac10f1b DISTNAME= ${GHCOMMIT} @@ -21,6 +21,8 @@ INSTALLATION_DIRS+= bin ${PKGMANDIR}/cat1 ${PKGMANDIR}/man1 ${EGDIR} WRKSRC= ${WRKDIR}/pkgin-${GHCOMMIT} +BUILD_DEFS+= PKGIN_REPOSITORY_URL + SUBST_CLASSES+= path SUBST_STAGE.path= pre-configure SUBST_MESSAGE.path= Adjusting path. @@ -52,7 +54,10 @@ MAKE_ENV+= MACHINE_ARCH=${MACHINE_ARCH} DEPENDS+= pkg_install>=20130901:../../pkgtools/pkg_install # those have official repositories -.if ${OPSYS} == "NetBSD" || ${OPSYS} == "DragonFly" || ${OPSYS} == "Minix" +.if !empty(PKGIN_REPOSITORY_URL) +pre-install: + echo ${PKGIN_REPOSITORY_URL} >> ${WRKSRC}/repositories.conf +.elif ${OPSYS} == "NetBSD" || ${OPSYS} == "DragonFly" || ${OPSYS} == "Minix" pre-install: ${GREP} -i ${OPSYS} ${WRKSRC}/REPOSITORIES >> \ ${WRKSRC}/repositories.conf -- cgit v1.2.3