head	1.16;
access;
symbols
	RELEASE_8_3_0:1.10
	RELEASE_9_0_0:1.10
	RELEASE_7_4_0:1.10
	RELEASE_8_2_0:1.10
	RELEASE_6_EOL:1.6;
locks; strict;
comment	@# @;


1.16
date	2013.03.02.13.44.46;	author svnexp;	state Exp;
branches;
next	1.15;

1.15
date	2012.11.17.06.01.21;	author svnexp;	state Exp;
branches;
next	1.14;

1.14
date	2012.10.09.22.12.13;	author linimon;	state Exp;
branches;
next	1.13;

1.13
date	2012.10.04.10.48.50;	author bapt;	state Exp;
branches;
next	1.12;

1.12
date	2012.08.15.19.26.13;	author tabthorpe;	state Exp;
branches;
next	1.11;

1.11
date	2012.07.26.05.40.22;	author bapt;	state Exp;
branches;
next	1.10;

1.10
date	2010.12.14.22.49.47;	author nork;	state Exp;
branches;
next	1.9;

1.9
date	2010.12.13.18.33.55;	author nork;	state Exp;
branches;
next	1.8;

1.8
date	2010.12.12.16.20.52;	author nork;	state Exp;
branches;
next	1.7;

1.7
date	2010.12.04.07.33.32;	author ade;	state Exp;
branches;
next	1.6;

1.6
date	2010.11.23.11.56.40;	author nork;	state Exp;
branches;
next	1.5;

1.5
date	2010.11.21.16.52.45;	author nork;	state Exp;
branches;
next	1.4;

1.4
date	2010.11.17.21.03.01;	author pav;	state Exp;
branches;
next	1.3;

1.3
date	2010.11.07.12.39.09;	author nork;	state Exp;
branches;
next	1.2;

1.2
date	2010.11.07.12.17.28;	author nork;	state Exp;
branches;
next	1.1;

1.1
date	2010.11.07.12.05.27;	author nork;	state Exp;
branches;
next	;


desc
@@


1.16
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/313182
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@# Created by: Sebastian Schuetz <sschuetz@@fhm.edu>
# $FreeBSD: head/security/trousers/Makefile 313182 2013-03-02 03:55:25Z eadler $

PORTNAME=	trousers
PORTVERSION=	0.3.6
PORTREVISION=	3
CATEGORIES=	security
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTVERSION}

MAINTAINER=	ports@@FreeBSD.org
COMMENT=	The open-source TCG Software Stack

USE_GCC=	any
USE_GMAKE=	YES
USE_ICONV=	YES
USE_OPENSSL=	YES
USE_LDCONFIG=	YES
USE_PKGCONFIG=	YES
USE_AUTOTOOLS=	autoconf automake libtool
GNU_CONFIGURE=	YES
MAKE_JOBS_SAFE=	YES

USE_RC_SUBR=	tcsd
SUB_FILES=	pkg-message
SUB_LIST=	USERS=${USERS} GROUPS=${GROUPS}

USERS=		_tss
GROUPS=		_tss

LICENSE=	CPL
LICENSE_NAME=	Common Public License
LICENSE_FILE=	${WRKSRC}/LICENSE
LICENSE_PERMS=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept

.include "Makefile.man"

CONFIGURE_ARGS=	--with-gui=none --enable-static \
		--localstatedir=${PREFIX}/var \
		--with-tssuser=${USERS} --with-tssgroup=${GROUPS}

OPTIONS_DEFINE=	EMULATOR DEBUG
EMULATOR_DESC=	Build for use with the tpm-emulator

WRKSRC=		${WRKDIR}/${DISTNAME}

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MEMULATOR}
PKGNAMESUFFIX+=	-no_tddl
LIB_DEPENDS+=	tddl.1:${PORTSDIR}/emulators/tpm-emulator

post-patch:
	@@${REINPLACE_CMD} -e \
		's|$${top_builddir}/src/tddl/libtddl.a|${LOCALBASE}/lib/libtddl.a|' \
			${WRKSRC}/src/tcs/Makefile.am \
			${WRKSRC}/src/tcsd/Makefile.am
	@@${REINPLACE_CMD} -e \
		's|libtddl\.a||g' \
			${WRKSRC}/src/tddl/Makefile.am

# The emulator has already a libttddl.so, so comment out trousers' libtddl in the pkg-plist
PLIST_SUB+=	TDDL="@@comment "
.else
PKGNAMESUFFIX+=	-tddl
CONFLICTS+=	tpm-emulator-0*
PLIST_SUB+=	TDDL=""
.endif

.if ${PORT_OPTIONS:MDEBUG}
CONFIGURE_ARGS+=--enable-debug
.endif

run-autotools:	run-autotools-autoreconf

run-autotools-autoreconf:
	@@cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${AUTORECONF} -i

post-install:
	@@${MKDIR} ${EXAMPLESDIR}
	@@${INSTALL_DATA} -o ${USERS} -g ${GROUPS} -m 0600 \
		${WRKSRC}/dist/tcsd.conf ${EXAMPLESDIR}/tcsd.conf
	@@[ -f ${PREFIX}/etc/tcsd.conf ] || \
		${CP} -p ${EXAMPLESDIR}/tcsd.conf ${PREFIX}/etc/tcsd.conf
	@@${INSTALL} -d -o ${USERS} -g ${GROUPS} -m 0700 /var/run/tpm
	@@${INSTALL} -d -o ${USERS} -g ${GROUPS} -m 0700 /var/run/ima
	@@${INSTALL} -d -o ${USERS} -g ${GROUPS} -m 0700 ${PREFIX}/var/lib/tpm
	@@${CAT} ${PKGMESSAGE}

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

.include <bsd.port.mk>
@


1.15
log
@Switch exporter over
@
text
@d2 1
a2 1
# $FreeBSD: head/security/trousers/Makefile 305610 2012-10-09 22:12:13Z linimon $
d33 1
a33 1
LICENSE_PERMS=	${_LICENSE_PERMS_DEFAULT}
@


1.14
log
@SVN rev 305610 on 2012-10-09 22:12:13Z by linimon

Force numerous ports that fail to build with clang over to instead always
rely on gcc.  The patch uses the new USE_GCC=any code in Mk/bsd.gcc.mk to
accomplish this.

The ports chosen were ports that blocked 2 or more ports from building with
clang.  (There are several hundred other ports that still fail to build with
clang, even with this patch.  This is merely one step along the way.)

Those interested in fixing these ports with clang, and have clang as their
default compiler, can simply set FORCE_BASE_CC_FOR_TESTING=yes.

For those who have gcc as their default compiler, this change is believed
to cause no change.

Hat:		portmgr
Tested with:	multiple runs on amd64-8-exp-bcm and 9-exp-clang, with various
		combinations of patch/no-patch and flag settings.
@
text
@d2 1
a2 1
# $FreeBSD$
@


1.13
log
@SVN rev 305249 on 2012-10-04 10:48:50Z by bapt

Convert to new options framework
@
text
@d13 1
@


1.12
log
@SVN rev 302594 on 2012-08-15 19:26:13Z by tabthorpe

- Reassign nork@@ ports to the heap
- Thank you for your years of service, we hope to see you back

Approved by:	portmgr
@
text
@d1 1
a1 4
# New ports collection makefile for:	trousers
# Date created:				18 Sep 2007
# Whom:					Sebastian Schuetz <sschuetz@@fhm.edu>
#
a2 1
#
d40 2
a41 2
OPTIONS=	EMULATOR	"Build for use with the tpm-emulator" off \
		DEBUG		"Build with debugging flags" off
d45 1
a45 1
.include <bsd.port.pre.mk>
d47 1
a47 1
.if defined(WITH_EMULATOR)
d68 1
a68 2
.if defined(WITH_DEBUG)
PKGNAMESUFFIX+=	-debug
d95 1
a95 1
.include <bsd.port.post.mk>
@


1.11
log
@SVN rev 301539 on 2012-07-26 05:40:22Z by bapt

new devel/pkgconf added to replace devel/pkg-config. new version of pkg-config
are no more self hosting so we are stuck with 0.25 version while pkgconf provide
the same set of features as 0.27 and a compatible frontend. A symlink to
pkg-config has been added for convenience and compatibility

This also introduces a new macro to use pkgconf in your ports:
USE_PKGCONFIG

it can take the following arguments:
 - yes (meaning build only dep)
 - build (meaning build only dep)
 - run (meaning run only dep)
 - both (meaning run and build dep)

From now USE_GNOME= pkgconfig is deprecated in favour of USE_PKGCONFIG
The old gnome macro has been modified to use pkgconf but still the sameway: run
and build dep to avoid large breakage.

While here fix some ports relying on pkg-config but not specifying it, fix some
ports broken because testing wrong .pc files, and fix ports using pkg-config
--version to determine pkg-config version instead of
pkg-config --modversion pkg-config like recommanded by pkg-config

With Hat:	portmgr
Exp-runs by:	bapt (pointhat-west), beat (pointyhat)
@
text
@d14 1
a14 1
MAINTAINER=	nork@@FreeBSD.org
@


1.10
log
@All cleanup done (PREFIX clean, permission clean), and bump PORTREVISION.
@
text
@a16 2
BUILD_DEPENDS=	${LOCALBASE}/share/aclocal/pkg.m4:${PORTSDIR}/devel/pkg-config

d21 1
@


1.9
log
@o Fix start-up point before openssl clients like named, hastd, kerberos...
o Add required tpmd (ports/emulators/tpm-emulator).
o Bump PORTREVISION, accordingly.
@
text
@d10 1
a10 1
PORTREVISION=	2
d89 3
a91 3
	@@${INSTALL} -d -o root -g ${GROUPS} -m 0700 /var/run/tpm
	@@${INSTALL} -d -o root -g ${GROUPS} -m 0700 /var/run/ima
	@@${INSTALL} -d -o root -g ${GROUPS} -m 0700 ${PREFIX}/var/lib/tpm
d95 5
a99 4
	@@${ECHO_CMD} "@@unexec ${RMDIR} /var/run/tpm 2>/dev/null || true"		>> ${TMPPLIST}
	@@${ECHO_CMD} "@@exec ${INSTALL} -d -o root -g ${GROUPS} -m 0700 /var/run/tpm"	>> ${TMPPLIST}
	@@${ECHO_CMD} "@@unexec ${RMDIR} /var/run/ima 2>/dev/null || true"		>> ${TMPPLIST}
	@@${ECHO_CMD} "@@exec ${INSTALL} -d -o root -g ${GROUPS} -m 0700 /var/run/ima"	>> ${TMPPLIST}
@


1.8
log
@Fix build error WITH_EMULATOR.
@
text
@d10 1
a10 1
PORTREVISION=	1
@


1.7
log
@Sync to new bsd.autotools.mk
@
text
@d54 1
a54 1
LIB_DEPENDS+=	tddl:${PORTSDIR}/emulators/tpm-emulator
d57 7
a63 6
	@@${REINPLACE_CMD} -e 's|\.\./tddl/libtddl\.a|${LOCALBASE}/lib/libtddl\.a|g' ${WRKSRC}/src/tcs/Makefile.am
	@@${REINPLACE_CMD} -e 's|\.\./tddl/libtddl\.a|${LOCALBASE}/lib/libtddl\.a|g' ${WRKSRC}/src/tcs/Makefile.in
	@@${REINPLACE_CMD} -e 's|\.\./tddl/libtddl\.a|${LOCALBASE}/lib/libtddl\.a|g' ${WRKSRC}/src/tcsd/Makefile.am
	@@${REINPLACE_CMD} -e 's|\.\./tddl/libtddl\.a|${LOCALBASE}/lib/libtddl\.a|g' ${WRKSRC}/src/tcsd/Makefile.in
	@@${REINPLACE_CMD} -e 's|libtddl\.a||g' ${WRKSRC}/src/tddl/Makefile.in
	@@${REINPLACE_CMD} -e 's|libtddl\.a||g' ${WRKSRC}/src/tddl/Makefile.am
@


1.6
log
@Build static library.

Pointed out by:		QAT and pointyhat via pav/edwin
@
text
@d23 1
a23 1
USE_AUTOTOOLS=	autoconf:268 automake:111 libtool:22
@


1.5
log
@UnBROKEN.
o Add implicit dependency on pkg-config.
o Don't run-autotools-*, twice.
@
text
@d10 1
d41 1
a41 1
CONFIGURE_ARGS=	--with-gui=none \
@


1.4
log
@- Mark BROKEN: does not configure

Reported by:	pointyhat
@
text
@d16 2
a25 2
BROKEN=		does not configure

d76 4
a79 2
pre-configure:
	@@cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${AUTORECONF} -i
@


1.3
log
@Fix build dependency on automake.

Reported by:	QAT
@
text
@d24 2
@


1.2
log
@Fix dependency on tpm-emulator.

Pointy hat to:	myself
@
text
@d20 1
a20 1
USE_AUTOTOOLS=	autoconf:268 libtool:22
@


1.1
log
@Add trousers 0.3.6, is a CPL (Common Public License) licensed Trusted
Computing Software Stack.  It is mostly compliant with the TSS 1.2
specification.

Obtained from:	http://bsssd.sourceforge.net/
@
text
@d51 1
a51 1
LIB_DEPENDS+=	tddl:${PORTSDIR}/security/tpm-emulator
@

