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).
This commit is contained in:
parent
201cba44d4
commit
4872d27a15
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue