summaryrefslogtreecommitdiff
path: root/Mk/Uses/tar.mk
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2014-03-12 09:17:06 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2014-03-12 09:17:06 +0000
commitd17874dc5dcb4c3b59645d6bc71480b475762237 (patch)
treed6e76f5325a21119fdbe2459737f9f41582d71e1 /Mk/Uses/tar.mk
parent- Fix devel/raknet's distname within LEGAL file (diff)
Two new USES added to finish handling distfiles formats a consistent way:
USES=tar[:[xz|bzip2|Z|tgz]] handles distributions files in format: - plain tar - tar.xz - tar.bz2 - tar.Z - tgz USES=lha handles distributions files info LHA format
Notes
Notes: svn path=/head/; revision=347964
Diffstat (limited to 'Mk/Uses/tar.mk')
-rw-r--r--Mk/Uses/tar.mk28
1 files changed, 28 insertions, 0 deletions
diff --git a/Mk/Uses/tar.mk b/Mk/Uses/tar.mk
new file mode 100644
index 000000000000..3b4346b399f4
--- /dev/null
+++ b/Mk/Uses/tar.mk
@@ -0,0 +1,28 @@
+# $FreeBSD$
+#
+# handle tar archives
+#
+# MAINTAINER: portmgr@FreeBSD.org
+#
+# Feature: tar
+# Usage: USES=tar[:[xz|Z|bzip2|tgz]]
+#
+.if !defined(_INCLUDE_USES_TAR_Mk)
+_INCLUDE_USES_TAR_MK= yes
+
+tar_ARGS?= none
+
+.if ${tar_ARGS} == xz
+EXTRACT_SUFX?= .tar.xz
+.elif ${tar_ARGS} == bzip2
+EXTRACT_SUFX?= .tar.bz2
+.elif ${tar_ARGS} == tgz
+EXTRACT_SUFX?= .tgz
+.elif ${tar_ARGS} == Z
+EXTRACT_SUFX?= .tar.Z
+.elif ${tar_ARGS} == none
+EXTRACT_SUFX?= .tar
+.else
+IGNORE= Incorrect 'USES+=tar:${tar_ARGS}'
+.endif
+.endif