aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/Uses/zip.mk
blob: c81687a2cd9a1ba0c40a1178c34098f901ea43fc (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
26
27
28
# $FreeBSD$
#
# handle zip archives
#
# Feature:  zip
# Usage:    USES=zip[:infozip]
#
# MAINTAINER: portmgr@FreeBSD.org

.if !defined(_INCLUDE_USES_ZIP_Mk)
_INCLUDE_USES_ZIP_MK=   yes

zip_ARGS?=  none

EXTRACT_SUFX?=  .zip

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

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