summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>1998-01-22 10:20:48 +0000
committeragc <agc@pkgsrc.org>1998-01-22 10:20:48 +0000
commitb18b1d84e7120f763701862be7aa2801832bf8f1 (patch)
treeffe453461f6dd96e805689286df3aff08b02fcf8 /mk
parentbaca453e7677fd87f3e7c88a71e75893949e01ca (diff)
downloadpkgsrc-b18b1d84e7120f763701862be7aa2801832bf8f1.tar.gz
Add a MIRROR_DISTFILE variable; defaults to "yes", and should be set
to "no" in a package's Makefile when the authors have placed restrictions on the redistribution of the distfiles. (Thanks to Jason Thorpe for the idea). Add a `mirror' target, which will do a "make fetch" if the package's distfile is allowed to be redistributed. This is for use on sites which mirror package distfiles. (Thanks to Charles Hannum for the idea).
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk15
-rw-r--r--mk/bsd.port.mk15
2 files changed, 28 insertions, 2 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index ef2048a052c..6b3c5daaed7 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,7 +1,7 @@
#-*- mode: Fundamental; tab-width: 4; -*-
# ex:ts=4
#
-# $NetBSD: bsd.pkg.mk,v 1.31 1998/01/16 09:07:46 hubertf Exp $
+# $NetBSD: bsd.pkg.mk,v 1.32 1998/01/22 10:20:48 agc Exp $
#
# bsd.port.mk - 940820 Jordan K. Hubbard.
# This file is in the public domain.
@@ -98,6 +98,8 @@ NetBSD_MAINTAINER= agc@netbsd.org
# ${DISTDIR}. Also they will be fetched in this subdirectory
# from FreeBSD mirror sites.
# ALLFILES - All of ${DISTFILES} and ${PATCHFILES}.
+# MIRROR_DISTFILE - Whether the distfile is redistributable without restrictions.
+# Defaults to "yes", set this to "no" if restrictions exist.
# IGNOREFILES - If some of the ${ALLFILES} are not checksum-able, set
# this variable to their names.
# PKGNAME - Name of the package file to create if the DISTNAME
@@ -474,6 +476,9 @@ FETCH_CMD?= /usr/bin/fetch
FETCH_CMD?= /usr/bin/ftp
.endif
+# By default, distfiles have no restrictions placed on them
+MIRROR_DISTFILE?= yes
+
TOUCH?= /usr/bin/touch
TOUCH_FLAGS?= -f
@@ -1039,6 +1044,14 @@ do-fetch:
.endif
.endif
+# This is for the use of sites which store distfiles which others may
+# fetch - only fetch the distfile if it is allowed to be
+# re-distributed freely
+mirror:
+.if (${MIRROR_DISTFILE} == "yes")
+ @make fetch
+.endif
+
# Extract
.if !target(do-extract)
diff --git a/mk/bsd.port.mk b/mk/bsd.port.mk
index d22aad66991..c0d0b10440f 100644
--- a/mk/bsd.port.mk
+++ b/mk/bsd.port.mk
@@ -1,7 +1,7 @@
#-*- mode: Fundamental; tab-width: 4; -*-
# ex:ts=4
#
-# $NetBSD: bsd.port.mk,v 1.31 1998/01/16 09:07:46 hubertf Exp $
+# $NetBSD: bsd.port.mk,v 1.32 1998/01/22 10:20:48 agc Exp $
#
# bsd.port.mk - 940820 Jordan K. Hubbard.
# This file is in the public domain.
@@ -98,6 +98,8 @@ NetBSD_MAINTAINER= agc@netbsd.org
# ${DISTDIR}. Also they will be fetched in this subdirectory
# from FreeBSD mirror sites.
# ALLFILES - All of ${DISTFILES} and ${PATCHFILES}.
+# MIRROR_DISTFILE - Whether the distfile is redistributable without restrictions.
+# Defaults to "yes", set this to "no" if restrictions exist.
# IGNOREFILES - If some of the ${ALLFILES} are not checksum-able, set
# this variable to their names.
# PKGNAME - Name of the package file to create if the DISTNAME
@@ -474,6 +476,9 @@ FETCH_CMD?= /usr/bin/fetch
FETCH_CMD?= /usr/bin/ftp
.endif
+# By default, distfiles have no restrictions placed on them
+MIRROR_DISTFILE?= yes
+
TOUCH?= /usr/bin/touch
TOUCH_FLAGS?= -f
@@ -1039,6 +1044,14 @@ do-fetch:
.endif
.endif
+# This is for the use of sites which store distfiles which others may
+# fetch - only fetch the distfile if it is allowed to be
+# re-distributed freely
+mirror:
+.if (${MIRROR_DISTFILE} == "yes")
+ @make fetch
+.endif
+
# Extract
.if !target(do-extract)