summaryrefslogtreecommitdiff
path: root/emulators/tpm-emulator/Makefile
blob: da5f11df916818d5c7e5b11e8b8f0c4c3105692d (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
# Created by: Sebastian Schuetz <sschuetz@fhm.edu>
# $FreeBSD$

PORTNAME=	tpm-emulator
PORTVERSION=	0.7.4
CATEGORIES=	emulators security
#MASTER_SITES=	BERLIOS
MASTER_SITES=	SF/${PORTNAME}.berlios
DISTNAME=	${PORTNAME:S,-,_,}-${PORTVERSION}

MAINTAINER=	hrs@FreeBSD.org
COMMENT=	Trusted Platform Module (TPM) emulator

LICENSE=	GPLv2

LIB_DEPENDS=	gmp:${PORTSDIR}/math/gmp

CONFLICTS=	trousers-tddl-[0-9]*

USES=		cmake:outsource
USE_RC_SUBR=	tpmd
CMAKE_ENV=	PREFIX="${PREFIX}"
CMAKE_ARGS=	-DTPM_INCLUDE_DIRS:STRING="${LOCALBASE}/include" \
		-DTPM_LIBRARY_DIRS:STRING="${LOCALBASE}/lib"
USE_LDCONFIG=	yes
USERS=		_tss
GROUPS=		_tss
SUB_LIST=	USERS="${USERS}" GROUPS="${GROUPS}"

.include <bsd.port.pre.mk>

.if ${ARCH} == "powerpc"
BROKEN=		Does not compile on powerpc
.endif

post-install:
	@${INSTALL} -d -o ${USERS} -g ${GROUPS} -m 0700 ${PREFIX}/var/db/tpm
	@${INSTALL} -d -o ${USERS} -g ${GROUPS} -m 0700          /var/run/tpm

add-plist-post:
	@(${ECHO_CMD} "@cwd /"; \
	  ${ECHO_CMD} "@unexec ${RMDIR} var/run/tpm 2>/dev/null || true"; \
	  ${ECHO_CMD} "@exec ${INSTALL} -d -o ${USERS} -g ${GROUPS} -m 0700 var/run/tpm"; \
	 ) >> ${TMPPLIST}

.include <bsd.port.post.mk>