summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkn <kn@cvs.openbsd.org>2020-05-18 18:19:12 +0000
committerkn <kn@cvs.openbsd.org>2020-05-18 18:19:12 +0000
commit37de2352d9631833c37fa4d9d53723a966da06e5 (patch)
treed982de620946a36ad9295e9816980d95538285f3
parent882688f7856767e81889b1afd40bb64dc4cf5951 (diff)
Document EXTRACT_FILES
OK sthen espie
-rw-r--r--share/man/man5/bsd.port.mk.530
1 files changed, 22 insertions, 8 deletions
diff --git a/share/man/man5/bsd.port.mk.5 b/share/man/man5/bsd.port.mk.5
index bef6c9f87b3..3b11fc644cd 100644
--- a/share/man/man5/bsd.port.mk.5
+++ b/share/man/man5/bsd.port.mk.5
@@ -1,4 +1,4 @@
-.\" $OpenBSD: bsd.port.mk.5,v 1.530 2020/04/20 16:07:43 espie Exp $
+.\" $OpenBSD: bsd.port.mk.5,v 1.531 2020/05/18 18:19:11 kn Exp $
.\"
.\" Copyright (c) 2000-2008 Marc Espie
.\"
@@ -24,7 +24,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: April 20 2020 $
+.Dd $Mdocdate: May 18 2020 $
.Dt BSD.PORT.MK 5
.Os
.Sh NAME
@@ -1697,21 +1697,21 @@ for archive in ${EXTRACT_ONLY}
do
case $$archive in
*.tar.xz|*.tar.lzma)
- xzcat ${FULLDISTDIR}/$$archive| tar xf -;;
+ xzcat ${FULLDISTDIR}/$$archive| tar -xf - -- ${EXTRACT_FILES};;
*.tar.lz)
- lunzip -c ${FULLDISTDIR}/$$archive| tar xf -;;
+ lunzip -c ${FULLDISTDIR}/$$archive| tar -xf - -- ${EXTRACT_FILES};;
*.zip)
- unzip -q ${FULLDISTDIR}/$$archive -d ${WRKDIR};;
+ unzip -q ${FULLDISTDIR}/$$archive -d ${WRKDIR} ${EXTRACT_FILES};;
*.tar.bz2|*.tbz2|*.tbz)
- bzip2 -dc ${FULLDISTDIR}/$$archive| tar xf -;;
+ bzip2 -dc ${FULLDISTDIR}/$$archive| tar -xf - -- ${EXTRACT_FILES};;
*.shar.gz|*.shar.Z|*.sh.Z|*.sh.gz)
gzcat ${FULLDISTDIR}/$$archive | /bin/sh;;
*.shar|*.sh)
/bin/sh ${FULLDISTDIR}/$$archive;;
*.tar)
- tar xf ${FULLDISTDIR}/$$archive;;
+ tar -xf ${FULLDISTDIR}/$$archive -- ${EXTRACT_FILES};;
*)
- gzip -dc ${FULLDISTDIR}/$$archive | tar xf -;;
+ gzip -dc ${FULLDISTDIR}/$$archive | tar -xf - -- ${EXTRACT_FILES};;
esac
done
.Ed
@@ -1726,6 +1726,20 @@ Used to set DISTFILES default value to ${DISTNAME}${EXTRACT_SUFX}.
The decompression tool needed will be automatically added as
.Ev BUILD_DEPENDS .
Default value is .tar.gz.
+.It Ev EXTRACT_FILES
+Set to the list of files to actually extract from distfiles.
+Its content is subject to shell evaluation as part of
+.Ev EXTRACT_CASES
+and passed as
+.Ar file ...
+argument to
+.Xr tar 1
+or
+.Xr unzip 1 ,
+e.g.,
+.Xr glob 7
+patterns and shell brace expansion may be used.
+Empty by default to extract all files.
.It Ev FAKE_FLAGS
Extra flags passed to ${MAKE_PROGRAM} during the
fake invocation.