summaryrefslogtreecommitdiff
path: root/Mk/Uses/zip.mk
blob: 37f2cbe25fe55226dde1232c6b978cb7dce26c83 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# handle zip archives
#
# Feature:	zip
# Usage:	USES=zip[:infozip]
#
# MAINTAINER: portmgr@FreeBSD.org

.if !defined(_INCLUDE_USES_ZIP_MK)
_INCLUDE_USES_ZIP_MK=	yes

EXTRACT_SUFX?=	.zip

EXTRACT_BEFORE_ARGS?=	-qo
EXTRACT_AFTER_ARGS?=	-d ${EXTRACT_WRKDIR}

.if empty(zip_ARGS)
EXTRACT_CMD?=		${UNZIP_NATIVE_CMD}
.elif ${zip_ARGS} == "infozip"
EXTRACT_DEPENDS+=	${UNZIP_CMD}:archivers/unzip
EXTRACT_CMD?=		${UNZIP_CMD}
.else
IGNORE=	Incorrect 'USES+=zip:${zip_ARGS}' expecting 'USES+=zip[:infozip]'
.endif

.endif