diff options
author | abs <abs@pkgsrc.org> | 2002-02-13 20:05:02 +0000 |
---|---|---|
committer | abs <abs@pkgsrc.org> | 2002-02-13 20:05:02 +0000 |
commit | 342971e7f0e3b8b39fd9e0de1d99083fb8139b52 (patch) | |
tree | 45620cf03960795843a8b73d16fa2646e17f801a /mk | |
parent | 7af40bebb32795d483ee259c2bcf3cc3f81bec81 (diff) | |
download | pkgsrc-342971e7f0e3b8b39fd9e0de1d99083fb8139b52.tar.gz |
Implement DYNAMIC_MASTER_SITES
If you need to download from a dynamic URL you can set DYNAMIC_MASTER_SITES
and a 'make fetch' will call files/getsite.sh with the name of each file
to download as an argument, expecting it to output the URL of the directory
from which to download it. graphics/ns-cult3d is an example of this usage.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 91f50b407fc..c6ab1137bb4 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.923 2002/02/07 20:34:21 jlam Exp $ +# $NetBSD: bsd.pkg.mk,v 1.924 2002/02/13 20:05:04 abs Exp $ # # This file is in the public domain. # @@ -1295,6 +1295,14 @@ SITES_${fetchfile:T}?= ${PATCH_SITES} _FETCH_ALLFILES= ${TEST} -d ${_DISTDIR} || ${MKDIR} ${_DISTDIR}; _FETCH_ALLFILES+= cd ${_DISTDIR}; . for fetchfile in ${_ALLFILES} +. if defined(DYNAMIC_MASTER_SITES) +_FETCH_ALLFILES+= \ + file="${fetchfile}"; \ + bfile="${fetchfile:T}"; \ + sites=`sh ${FILESDIR}/getsite.sh $${file}`; \ + ${_CHECK_DIST_PATH}; \ + ${_FETCH_FILE}; +. else _FETCH_ALLFILES+= \ unsorted_sites="${SITES_${fetchfile:T}} ${_MASTER_SITE_BACKUP}"; \ sites="${ORDERED_SITES}"; \ @@ -1302,6 +1310,7 @@ _FETCH_ALLFILES+= \ bfile="${fetchfile:T}"; \ ${_CHECK_DIST_PATH}; \ ${_FETCH_FILE}; +. endif . endfor . endif _FETCH_ALLFILES?= ${DO_NADA} |