From 4872d27a15851fa3e4414c30f0e145c1c6edced1 Mon Sep 17 00:00:00 2001 From: agc Date: Thu, 22 Jan 1998 10:20:48 +0000 Subject: [PATCH] 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). --- share/mk/bsd.port.mk | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/share/mk/bsd.port.mk b/share/mk/bsd.port.mk index d22aad66991c..c0d0b10440ff 100644 --- a/share/mk/bsd.port.mk +++ b/share/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)