summaryrefslogtreecommitdiff
path: root/security/opensc/Makefile
blob: a8d6350121c3c9c643d051402bfd7e9fbf959d49 (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
52
53
54
55
56
57
58
59
60
61
62
# $NetBSD: Makefile,v 1.25 2016/08/04 13:08:25 mef Exp $

OPENSC_PKG_VERSION=	0.16.0
DISTNAME=		opensc-${OPENSC_PKG_VERSION}
CATEGORIES=		security
MASTER_SITES=		${MASTER_SITE_SOURCEFORGE:=opensc/OpenSC/opensc-0.13.0/}

MAINTAINER=		pkgsrc-users@NetBSD.org
HOMEPAGE=		https://github.com/OpenSC/OpenSC/wiki
COMMENT=		Smart Card drivers and middleware
LICENSE=		gnu-lgpl-v2.1

BUILD_DEPENDS+=		docbook-xsl-[0-9]*:../../textproc/docbook-xsl

GNU_CONFIGURE=		YES
USE_LIBTOOL=		YES
USE_OLD_DES_API=	YES
USE_TOOLS+=		gmake pkg-config

USE_TOOLS+=		autoreconf autoconf automake
AUTOCONF_REQD=		2.60
AUTOMAKE_REQD=		1.10
pre-configure:
	cd ${WRKSRC:Q} && \
	./bootstrap \
		-s ${OPENSC_VERSION_SUFFIX:Q} \
		-r ${OPENSC_VERSION_REVISION:Q}

.include "options.mk"

# Previous versions needed these, but 0.12.2 configure does not
# recognize them.
#CONFIGURE_ARGS+=	--with-openssl=${SSLBASE:Q}
#CONFIGURE_ARGS+=	--disable-sensitive-logging

# Is this necessary (and non-default)?
CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR:Q}

# This is perhaps an upstream bug.
CONFIGURE_ENV+=		PCSC_CFLAGS=-I${PREFIX}/include/PCSC

# The stylesheets are not found without this.
CONFIGURE_ARGS+=	--with-xsl-stylesheetsdir=${PREFIX}/share/xsl/docbook

EGDIR=			${PREFIX}/share/examples/opensc
CONF_FILES+=		${EGDIR}/opensc.conf ${PKG_SYSCONFDIR}/opensc.conf

INSTALLATION_DIRS=	${EGDIR}
post-install:
	${INSTALL_DATA} ${WRKSRC}/etc/opensc.conf ${DESTDIR}${EGDIR}

# build tools for doc; should be TOOLS
.include "../../textproc/libxslt/buildlink3.mk"

# We avoid pthreads intentionally; tell dlopen not drag it in.
DLOPEN_REQUIRE_PTHREADS=	no
.include "../../mk/dlopen.buildlink3.mk"
.include "../../mk/readline.buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
BUILDLINK_API_DEPENDS.openssl+=	openssl>=0.9.7
.include "../../security/openssl/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"