/[gentoo-x86]/app-crypt/tpm-emulator/tpm-emulator-0.5.ebuild
Gentoo

Contents of /app-crypt/tpm-emulator/tpm-emulator-0.5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Thu May 31 03:31:59 2012 UTC (2 years, 5 months ago) by zmedico
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +3 -3 lines
inherit user for enewuser, and multilib for get_libdir

(Portage version: 2.2.0_alpha108_p8/cvs/Linux i686)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-crypt/tpm-emulator/tpm-emulator-0.5.ebuild,v 1.4 2009/05/10 23:07:30 robbat2 Exp $
4
5 inherit toolchain-funcs linux-mod eutils user
6
7 MY_P=${P/-/_}
8 DESCRIPTION="Emulator driver for tpm"
9 HOMEPAGE="https://developer.berlios.de/projects/tpm-emulator"
10
11 SRC_URI="mirror://berlios/tpm-emulator/${MY_P}.tar.gz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~x86 ~amd64"
16 IUSE=""
17 DEPEND="dev-libs/gmp"
18 RDEPEND=""
19 S=${WORKDIR}/${P/-/_}
20
21 #fixups at:
22 #https://developer.berlios.de/feature/index.php?func=detailfeature&feature_id=3304&group_id=2491
23
24 pkg_setup() {
25 linux-mod_pkg_setup
26 MODULE_NAMES="tpmd_dev(crypt::${S}/tpmd_dev)"
27 BUILD_TARGETS="all"
28 BUILD_PARAMS="CC=$(tc-getCC)"
29 enewuser tss
30 }
31
32 src_unpack() {
33 unpack ${A}
34 cd "${S}"
35 sed -i 's/LDFLAGS :=/override LDFLAGS +=/g' tpmd/Makefile
36 sed -i 's#/var/tpm#/var/run/tpm#g' tpmd/tpmd.c tddl/tddl.c tpm_dev/linux_module.c
37 }
38
39 src_install() {
40 if [ -x /usr/bin/scanelf ]; then
41 [ -z "$(/usr/bin/scanelf -qs __guard tpm_emulator.ko)" ] || \
42 die 'cannot have gmp compiled with hardened flags'
43 [ -z "$(/usr/bin/scanelf -qs __stack_smash_handler tpm_emulator.ko)" ] || \
44 die 'cannot have gmp compiled with hardened flags'
45 fi
46
47 linux-mod_src_install
48 dodoc README
49 dosbin tpmd/tpmd
50 dolib.so tddl/libtddl.so
51 insinto /usr/include
52 doins tddl/tddl.h
53 newinitd "${FILESDIR}/${PN}.initd" "${PN}"
54 insinto /etc/udev/rules.d
55 newins "${FILESDIR}/${PN}.udev" "60-${PN}.rules"
56 keepdir /var/run/tpm
57 fowners tss /var/run/tpm
58 }

  ViewVC Help
Powered by ViewVC 1.1.20