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

Contents of /app-crypt/tpm-emulator/tpm-emulator-0.7.4-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Mon Dec 24 17:13:25 2012 UTC (20 months, 3 weeks ago) by alonbl
Branch: MAIN
Fix /var/run handling, per bug#448430, thanks to flameeyes

(Portage version: 2.2.0_alpha149/cvs/Linux x86_64, unsigned Manifest commit)

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.7.4.ebuild,v 1.1 2012/12/23 01:25:26 alonbl Exp $
4
5 EAPI=2
6 inherit user linux-mod cmake-utils udev
7
8 MY_P=${P/-/_}
9 DESCRIPTION="Emulator driver for tpm"
10 HOMEPAGE="https://developer.berlios.de/projects/tpm-emulator"
11 SRC_URI="mirror://berlios/tpm-emulator/${MY_P}.tar.gz"
12 LICENSE="GPL-2"
13
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16
17 IUSE="ssl modules"
18 RDEPEND="ssl? ( dev-libs/openssl )"
19 DEPEND="${RDEPEND}
20 !ssl? ( dev-libs/gmp )"
21
22 S=${WORKDIR}/${P/-/_}
23
24 pkg_setup() {
25 enewuser tss -1 -1 /var/lib/tpm tss
26 if use modules; then
27 CONFIG_CHECK="MODULES"
28 linux-mod_pkg_setup
29 BUILD_TARGETS="all"
30 BUILD_PARAMS="KERNEL_BUILD=${KERNEL_DIR}"
31 fi
32 }
33
34 src_prepare() {
35 # do not build and install the kernel module
36 sed -i 's/COMMAND ${tpmd_dev_BUILD_CMD}//' tpmd_dev/CMakeLists.txt || die
37 sed -i 's/install(CODE.*//' tpmd_dev/CMakeLists.txt || die
38 }
39
40 src_configure() {
41 mycmakeargs=(
42 $(cmake-utils_use_use ssl OPENSSL)
43 )
44 cmake-utils_src_configure
45
46 # only here we have BUILD_DIR
47 MODULE_NAMES="tpmd_dev(misc:${BUILD_DIR}/tpmd_dev/linux)"
48 }
49
50 src_compile() {
51 cmake-utils_src_compile
52 use modules && linux-mod_src_compile
53 emake -C ${BUILD_DIR}/tpmd_dev/linux tpmd_dev.rules
54 }
55
56 src_install() {
57 cmake-utils_src_install
58 use modules && linux-mod_src_install
59
60 dodoc README
61
62 udev_newrules "${BUILD_DIR}/tpmd_dev/linux/tpmd_dev.rules" 60-tpmd_dev.rules
63
64 newinitd "${FILESDIR}"/${PN}.initd-0.7.4 ${PN}
65 newconfd "${FILESDIR}"/${PN}.confd-0.7.4 ${PN}
66
67 keepdir /var/log/tpm
68 fowners tss:tss /var/log/tpm
69 }

  ViewVC Help
Powered by ViewVC 1.1.20