aboutsummaryrefslogtreecommitdiff
path: root/security/softhsm2/Makefile
blob: 67576fc43fd034c877d1c4ac9a52aa4f36403259 (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
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
63
64
65
66
67
68
69
70
71
72
# Created by: Jaap Akkerhuis <jaap@NLnetLabs.nl>
# $FreeBSD$

PORTNAME=	softhsm
PORTVERSION=	2.6.1
PORTREVISION=	2
CATEGORIES=	security
MASTER_SITES=	http://dist.opendnssec.org/source/ \
		http://dist.opendnssec.org/source/testing/
PKGNAMESUFFIX=	2

MAINTAINER=	jaap@NLnetLabs.nl
COMMENT=	Software implementation of a Hardware Security Module (HSM)

LICENSE=	BSD2CLAUSE
LICENSE_FILE=	${WRKSRC}/LICENSE

GNU_CONFIGURE=	yes
INSTALL_TARGET=	install-strip
USES=		compiler:c++11-lang libtool ssl pkgconfig

SUB_FILES=	pkg-message

CONFLICTS=	softhsm-1.*

USE_LDCONFIG=	yes

LIB_DEPENDS+=		libcppunit.so:devel/cppunit
MY_DEPENDS+=		p11-kit:security/p11-kit
BUILD_DEPENDS+=		${MY_DEPENDS}
RUN_DEPENDS+=		${MY_DEPENDS}

OPTIONS_DEFINE=		SQLITE MIGRATE
MIGRATE_IMPLIES=	SQLITE
OPTIONS_SUB=		yes
SQLITE_DESC=		Build with object store backend DB support (SQLITE3)
MIGRATE_DESC=		Build the migration tool

OPTIONS_SINGLE=		CRYP
OPTIONS_SINGLE_CRYP=	CRYP_OPEN CRYP_BOTAN

CRYP_OPEN_DESC=		Build with OpenSSL crypto library
CRYP_BOTAN_DESC=	Build with Botan crypto library

OPTIONS_DEFAULT=	CRYP_OPEN SQLITE MIGRATE

SQLITE_CONFIGURE_WITH=	sqlite3=${LOCALBASE} objectstore-backend-db
SQLITE_USES=		sqlite
MIGRATE_CONFIGURE_WITH=	migrate

CRYP_BOTAN_CONFIGURE_ON=	--with-crypto-backend=botan
CRYP_BOTAN_LIB_DEPENDS=	libbotan-2.so:security/botan2

CRYP_OPEN_CONFIGURE_ON=	--with-crypto-backend=openssl --with-openssl=${OPENSSLBASE}

.include <bsd.port.options.mk>

.if ${SSL_DEFAULT:Mlibressl*} || ${SSL_DEFAULT:Mopenssl}
CONFIGURE_ARGS+=	--disable-gost
.endif

# openssl-1.1.1 (default after 1200080) doesn't  support GHOST (yet), punt for now.
.if ${OSVERSION}>=1200080
CONFIGURE_ARGS+=	--disable-gost
.endif

post-install:
	${MKDIR} ${STAGEDIR}${PREFIX}/share/p11-kit/modules
	${INSTALL_DATA} ${WRKSRC}/softhsm2.module \
		${STAGEDIR}${PREFIX}/share/p11-kit/modules

.include <bsd.port.mk>