summaryrefslogtreecommitdiff
path: root/mk/fetch/fetch-list.mk
diff options
context:
space:
mode:
authorjlam <jlam>2006-07-27 15:16:44 +0000
committerjlam <jlam>2006-07-27 15:16:44 +0000
commitb6442e50d672afd4fd4e32f59f474e95b2e7fc93 (patch)
tree3529dbe2fb2a983115d50f591b6a7a2501a1d59c /mk/fetch/fetch-list.mk
parentc089a724b0d436631f2c23cf68c3ce460e27df99 (diff)
downloadpkgsrc-b6442e50d672afd4fd4e32f59f474e95b2e7fc93.tar.gz
Apply the "convention over configuration" principle:
If ${FILESDIR}/getsite.sh exists, then use it to determine the fetch URL for each of the distfiles for the package. Otherwise, use SITE_<file> and MASTER_SITES, in order, to determine the URL for each distfile. If the script path differs from ${FILESDIR}/getsite.sh, then set DYNAMIC_SITE_SCRIPT to the full path to that script. Remove the need to set DYNAMIC_MASTER_SITES explicitly in the package Makefile for: graphics/ns-cult3d wm/sawfish-themes www/apache-tomcat55 www/jakarta-tomcat4 www/jakarta-tomcat5
Diffstat (limited to 'mk/fetch/fetch-list.mk')
-rw-r--r--mk/fetch/fetch-list.mk8
1 files changed, 4 insertions, 4 deletions
diff --git a/mk/fetch/fetch-list.mk b/mk/fetch/fetch-list.mk
index de0136afd97..6a6b5039b5b 100644
--- a/mk/fetch/fetch-list.mk
+++ b/mk/fetch/fetch-list.mk
@@ -1,4 +1,4 @@
-# $NetBSD: fetch-list.mk,v 1.3 2006/07/27 13:51:21 jlam Exp $
+# $NetBSD: fetch-list.mk,v 1.4 2006/07/27 15:16:44 jlam Exp $
# Prints out a script to fetch all needed files (no checksumming).
.PHONY: fetch-list
@@ -44,7 +44,7 @@ fetch-list-one-pkg:
@location=`${PWD_CMD} | ${AWK} -F / '{ print $$(NF-1) "/" $$NF }'`; \
${ECHO} '# Need additional files for ${PKGNAME} ('$$location')...'
. for fetchfile in ${_ALLFILES}
-. if defined(DYNAMIC_MASTER_SITES)
+. if exists(${DYNAMIC_SITE_SCRIPT})
@(if [ ! -f ${_DISTDIR}/${fetchfile:T} ]; then \
${ECHO}; \
filesize=`${AWK} ' \
@@ -53,7 +53,7 @@ fetch-list-one-pkg:
${ECHO} '# Fetch ${fetchfile} ('$${filesize-???}' bytes):'; \
${ECHO} '#'; \
${ECHO} '${SH} -s ${fetchfile:T} <<"EOF" |('; \
- ${CAT} ${FILESDIR}/getsite.sh; \
+ ${CAT} ${DYNAMIC_SITE_SCRIPT}; \
${ECHO} EOF; \
${ECHO} read unsorted_sites; \
${ECHO} 'unsorted_sites="$${unsorted_sites} ${_MASTER_SITE_BACKUP}"'; \
@@ -83,7 +83,7 @@ fetch-list-one-pkg:
${ECHO} ' ${ECHO} ${fetchfile:T} not fetched'; \
${ECHO} done; \
fi)
-. endif # defined(DYNAMIC_MASTER_SITES)
+. endif
. endfor
. endif # !empty(_ALLFILES)
.endif # !target(fetch-list-one-pkg)