summaryrefslogtreecommitdiff
path: root/archivers/unzip/Makefile
blob: a95add8d0728a4bb7f95e66dc35647206dd0d7e0 (plain)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# $NetBSD: Makefile,v 1.20 1999/08/18 09:20:00 agc Exp $
# FreeBSD Id: Makefile,v 1.14 1997/06/19 05:30:04 ache Exp 
#

DISTNAME=	unzip-5.40
CATEGORIES=	archivers
MASTER_SITES=	ftp://ftp.cdrom.com/pub/infozip/src/ \
		ftp://ftp.icce.rug.nl/infozip/src/
DISTFILES=	unzip540.tar.gz

MAINTAINER=	packages@netbsd.org
HOMEPAGE=	http://www.cdrom.com/pub/infozip/

MAKEFILE=	unix/Makefile
ALL_TARGET=	unzips
# we do not use USE_ZLIB because of unknown bugs in 5.40's use of libz
MAKE_FLAGS=	CF="${CFLAGS} -I. -DBSD -DUNIX -Dunix -DUSE_UNSHRINK"

BUILD_DEFS+=	ZIP_ENCRYPTION

.include "../../mk/bsd.prefs.mk"

.if defined(ZIP_ENCRYPTION)
DISTFILES+=	zcrypt28.zip
EXTRACT_ONLY=	unzip540.tar.gz
RESTRICTED=	crypto
MIRROR_DISTFILE=no

# This bootstrap is ugly, but zcrypt is only shipped as a zipfile.
pre-build:
	@cd ${WRKSRC}; test -f README.CR || ( \
		${ECHO} '*** Building stage 1 of 2--unzip without encryption.' && \
		${MAKE_PROGRAM} ${MAKE_FLAGS} -f ${MAKEFILE} unzip && \
		./unzip -qo ${DISTDIR}/zcrypt28.zip && \
		${RM} -f *.o unzip )
	@${ECHO} '*** Building stage 2 of 2--unzip with encryption.'
.endif

do-install:
	cd ${WRKSRC} && \
		${INSTALL_PROGRAM} unzip funzip unzipsfx ${PREFIX}/bin
	${LN} -sf unzip ${PREFIX}/bin/zipinfo
	cd ${WRKSRC}/unix && \
		${INSTALL_SCRIPT} zipgrep ${PREFIX}/bin
	cd ${WRKSRC}/unix && \
		${INSTALL_MAN} funzip.1 unzip.1 unzipsfx.1 zipgrep.1 zipinfo.1 ${PREFIX}/man/man1
	${INSTALL_DATA_DIR}  ${PREFIX}/share/doc/unzip
	cd ${WRKSRC} && \
		${INSTALL_DATA} README WHERE COPYING ${PREFIX}/share/doc/unzip

.include "../../mk/bsd.pkg.mk"