summaryrefslogtreecommitdiff
path: root/devel/zlib/Makefile
blob: 933e19860a02e8284994a14cfd3fc51cdb7764a1 (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
# $NetBSD: Makefile,v 1.52 2014/10/09 14:06:32 wiz Exp $

DISTNAME=	zlib-1.2.8
PKGREVISION=	2
CATEGORIES=	devel
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=libpng/} \
		http://zlib.net/
DISTFILES=	# empty

MAINTAINER=	joerg@NetBSD.org
HOMEPAGE=	http://www.zlib.net/
COMMENT=	General purpose data compression library
LICENSE=	zlib

USE_LIBTOOL=		yes

PKGCONFIG_OVERRIDE+=	zlib.pc.in

CFLAGS+=		${CPPFLAGS}
LDFLAGS.Cygwin=		-no-undefined

CPPFLAGS.SunOS+=	-DNO_DIVIDE
LDFLAGS.SunOS+=	-Wl,-zignore	# avoid unused reference to libgcc_s.so

SUBST_CLASSES+= pc
SUBST_MESSAGE.pc= pkg-config file substitutions
SUBST_STAGE.pc= pre-configure
SUBST_FILES.pc= zlib.pc.in
SUBST_SED.pc=	-e "s,@prefix@,${PREFIX},g"
SUBST_SED.pc+=	-e "s,@exec_prefix@,${PREFIX},g"
SUBST_SED.pc+=	-e "s,@VERSION@,${PKGVERSION_NOREV},g"
SUBST_SED.pc+=	-e "s,@includedir@,${PREFIX}/include,g"
SUBST_SED.pc+=	-e "s,@libdir@,${PREFIX}/lib,g"
SUBST_SED.pc+=	-e "s,@sharedlibdir@,${PREFIX}/lib,g"

INSTALLATION_DIRS=	include lib/pkgconfig ${PKGMANDIR}/man3

do-extract:
	${CP} -r ${FILESDIR} ${WRKSRC}

do-install:
	${LIBTOOL} --mode=install ${INSTALL_LIB} ${WRKSRC}/libz.la ${DESTDIR}${PREFIX}/lib
	${INSTALL_MAN} ${WRKSRC}/zlib.3 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man3
	${INSTALL_DATA} ${WRKSRC}/zconf.h ${DESTDIR}${PREFIX}/include
	${INSTALL_DATA} ${WRKSRC}/zlib.h ${DESTDIR}${PREFIX}/include
	${INSTALL_DATA} ${WRKSRC}/zlib.pc.in ${DESTDIR}${PREFIX}/lib/pkgconfig/zlib.pc

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