diff options
author | Armin Kuster <akuster808@gmail.com> | 2017-05-07 22:39:03 -0700 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2017-05-14 07:56:43 -0700 |
commit | 4585f1e8c95435d60dd3a5287b25c7076347a3c9 (patch) | |
tree | 9be1977ee4fb8e0aff3f901db7da0e95cce3ac63 /meta-tpm/recipes-tpm/trousers/trousers_git.bb | |
parent | 6eac21cf4a7653753d87772c497ac14b8b6e3e67 (diff) | |
download | meta-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.bb | 117 |
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 @@ | |||
1 | SUMMARY = "TrouSerS - An open-source TCG Software Stack implementation." | ||
2 | LICENSE = "BSD" | ||
3 | HOMEPAGE = "http://sourceforge.net/projects/trousers/" | ||
4 | LIC_FILES_CHKSUM = "file://README;startline=3;endline=4;md5=2af28fbed0832e4d83a9e6dd68bb4413" | ||
5 | SECTION = "security/tpm" | ||
6 | |||
7 | DEPENDS = "openssl" | ||
8 | |||
9 | SRCREV = "4b9a70d5789b0b74f43957a6c19ab2156a72d3e0" | ||
10 | PV = "0.3.14+git${SRCPV}" | ||
11 | |||
12 | SRC_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 | |||
20 | S = "${WORKDIR}/git" | ||
21 | |||
22 | inherit autotools pkgconfig useradd update-rc.d ${@bb.utils.contains('VIRTUAL-RUNTIME_init_manager','systemd','systemd','', d)} | ||
23 | |||
24 | PACKAGECONFIG ?= "gmp " | ||
25 | PACKAGECONFIG[gmp] = "--with-gmp, --with-gmp=no, gmp" | ||
26 | PACKAGECONFIG[gtk] = "--with-gui=gtk, --with-gui=none, gtk+" | ||
27 | |||
28 | do_install () { | ||
29 | oe_runmake DESTDIR=${D} install | ||
30 | } | ||
31 | |||
32 | do_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 | |||
45 | CONFFILES_${PN} += "${sysconfig}/tcsd.conf" | ||
46 | |||
47 | PROVIDES = "${PACKAGES}" | ||
48 | PACKAGES = " \ | ||
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. | ||
61 | RRECOMMENDS_libtspi = "${PN}" | ||
62 | |||
63 | FILES_libtspi = " \ | ||
64 | ${libdir}/*.so.1 \ | ||
65 | ${libdir}/*.so.1.2.0 \ | ||
66 | " | ||
67 | FILES_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 | " | ||
74 | FILES_libtspi-dev = " \ | ||
75 | ${includedir} \ | ||
76 | ${libdir}/*.so \ | ||
77 | " | ||
78 | FILES_libtspi-doc = " \ | ||
79 | ${mandir}/man3 \ | ||
80 | " | ||
81 | FILES_libtspi-staticdev = " \ | ||
82 | ${libdir}/*.la \ | ||
83 | ${libdir}/*.a \ | ||
84 | " | ||
85 | FILES_${PN} = " \ | ||
86 | ${sbindir}/tcsd \ | ||
87 | ${sysconfdir} \ | ||
88 | ${localstatedir} \ | ||
89 | " | ||
90 | |||
91 | FILES_${PN}-dev += "${libdir}/trousers" | ||
92 | |||
93 | FILES_${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 | " | ||
101 | FILES_${PN}-doc = " \ | ||
102 | ${mandir}/man5 \ | ||
103 | ${mandir}/man8 \ | ||
104 | " | ||
105 | |||
106 | INITSCRIPT_NAME = "trousers" | ||
107 | INITSCRIPT_PARAMS = "start 99 2 3 4 5 . stop 19 0 1 6 ." | ||
108 | |||
109 | USERADD_PACKAGES = "${PN}" | ||
110 | GROUPADD_PARAM_${PN} = "--system tss" | ||
111 | USERADD_PARAM_${PN} = "--system -M -d /var/lib/tpm -s /bin/false -g tss tss" | ||
112 | |||
113 | SYSTEMD_PACKAGES = "${PN}" | ||
114 | SYSTEMD_SERVICE_${PN} = "tcsd.service" | ||
115 | SYSTEMD_AUTO_ENABLE = "disable" | ||
116 | |||
117 | BBCLASSEXTEND = "native" | ||