summaryrefslogtreecommitdiffstats
path: root/meta-tpm/recipes-tpm/trousers/trousers_git.bb
diff options
context:
space:
mode:
authorArmin Kuster <akuster808@gmail.com>2017-05-07 22:39:03 -0700
committerArmin Kuster <akuster808@gmail.com>2017-05-14 07:56:43 -0700
commit4585f1e8c95435d60dd3a5287b25c7076347a3c9 (patch)
tree9be1977ee4fb8e0aff3f901db7da0e95cce3ac63 /meta-tpm/recipes-tpm/trousers/trousers_git.bb
parent6eac21cf4a7653753d87772c497ac14b8b6e3e67 (diff)
downloadmeta-security-4585f1e8c95435d60dd3a5287b25c7076347a3c9.tar.gz
tpm: move to a sub layer
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-tpm/recipes-tpm/trousers/trousers_git.bb')
-rw-r--r--meta-tpm/recipes-tpm/trousers/trousers_git.bb117
1 files changed, 117 insertions, 0 deletions
diff --git a/meta-tpm/recipes-tpm/trousers/trousers_git.bb b/meta-tpm/recipes-tpm/trousers/trousers_git.bb
new file mode 100644
index 0000000..352374c
--- /dev/null
+++ b/meta-tpm/recipes-tpm/trousers/trousers_git.bb
@@ -0,0 +1,117 @@
1SUMMARY = "TrouSerS - An open-source TCG Software Stack implementation."
2LICENSE = "BSD"
3HOMEPAGE = "http://sourceforge.net/projects/trousers/"
4LIC_FILES_CHKSUM = "file://README;startline=3;endline=4;md5=2af28fbed0832e4d83a9e6dd68bb4413"
5SECTION = "security/tpm"
6
7DEPENDS = "openssl"
8
9SRCREV = "4b9a70d5789b0b74f43957a6c19ab2156a72d3e0"
10PV = "0.3.14+git${SRCPV}"
11
12SRC_URI = " \
13 git://git.code.sf.net/p/trousers/trousers \
14 file://trousers.init.sh \
15 file://trousers-udev.rules \
16 file://tcsd.service \
17 file://get-user-ps-path-use-POSIX-getpwent-instead-of-getpwe.patch \
18 "
19
20S = "${WORKDIR}/git"
21
22inherit autotools pkgconfig useradd update-rc.d ${@bb.utils.contains('VIRTUAL-RUNTIME_init_manager','systemd','systemd','', d)}
23
24PACKAGECONFIG ?= "gmp "
25PACKAGECONFIG[gmp] = "--with-gmp, --with-gmp=no, gmp"
26PACKAGECONFIG[gtk] = "--with-gui=gtk, --with-gui=none, gtk+"
27
28do_install () {
29 oe_runmake DESTDIR=${D} install
30}
31
32do_install_append() {
33 install -d ${D}${sysconfdir}/init.d
34 install -m 0755 ${WORKDIR}/trousers.init.sh ${D}${sysconfdir}/init.d/trousers
35 install -d ${D}${sysconfdir}/udev/rules.d
36 install -m 0644 ${WORKDIR}/trousers-udev.rules ${D}${sysconfdir}/udev/rules.d/45-trousers.rules
37
38 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
39 install -d ${D}${systemd_unitdir}/system
40 install -m 0644 ${WORKDIR}/tcsd.service ${D}${systemd_unitdir}/system/
41 sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/tcsd.service
42 fi
43}
44
45CONFFILES_${PN} += "${sysconfig}/tcsd.conf"
46
47PROVIDES = "${PACKAGES}"
48PACKAGES = " \
49 libtspi \
50 libtspi-dbg \
51 libtspi-dev \
52 libtspi-doc \
53 libtspi-staticdev \
54 trousers \
55 trousers-dbg \
56 trousers-doc \
57 "
58
59# libtspi needs tcsd for most (all?) operations, so suggest to
60# install that.
61RRECOMMENDS_libtspi = "${PN}"
62
63FILES_libtspi = " \
64 ${libdir}/*.so.1 \
65 ${libdir}/*.so.1.2.0 \
66 "
67FILES_libtspi-dbg = " \
68 ${libdir}/.debug \
69 ${prefix}/src/debug/${BPN}/${PV}-${PR}/git/src/tspi \
70 ${prefix}/src/debug/${BPN}/${PV}-${PR}/git/src/trspi \
71 ${prefix}/src/debug/${BPN}/${PV}-${PR}/git/src/include/*.h \
72 ${prefix}/src/debug/${BPN}/${PV}-${PR}/git/src/include/tss \
73 "
74FILES_libtspi-dev = " \
75 ${includedir} \
76 ${libdir}/*.so \
77 "
78FILES_libtspi-doc = " \
79 ${mandir}/man3 \
80 "
81FILES_libtspi-staticdev = " \
82 ${libdir}/*.la \
83 ${libdir}/*.a \
84 "
85FILES_${PN} = " \
86 ${sbindir}/tcsd \
87 ${sysconfdir} \
88 ${localstatedir} \
89 "
90
91FILES_${PN}-dev += "${libdir}/trousers"
92
93FILES_${PN}-dbg = " \
94 ${sbindir}/.debug \
95 ${prefix}/src/debug/${BPN}/${PV}-${PR}/git/src/tcs \
96 ${prefix}/src/debug/${BPN}/${PV}-${PR}/git/src/tcsd \
97 ${prefix}/src/debug/${BPN}/${PV}-${PR}/git/src/tddl \
98 ${prefix}/src/debug/${BPN}/${PV}-${PR}/git/src/trousers \
99 ${prefix}/src/debug/${BPN}/${PV}-${PR}/git/src/include/trousers \
100 "
101FILES_${PN}-doc = " \
102 ${mandir}/man5 \
103 ${mandir}/man8 \
104 "
105
106INITSCRIPT_NAME = "trousers"
107INITSCRIPT_PARAMS = "start 99 2 3 4 5 . stop 19 0 1 6 ."
108
109USERADD_PACKAGES = "${PN}"
110GROUPADD_PARAM_${PN} = "--system tss"
111USERADD_PARAM_${PN} = "--system -M -d /var/lib/tpm -s /bin/false -g tss tss"
112
113SYSTEMD_PACKAGES = "${PN}"
114SYSTEMD_SERVICE_${PN} = "tcsd.service"
115SYSTEMD_AUTO_ENABLE = "disable"
116
117BBCLASSEXTEND = "native"