Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 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 | |
Andrew Geissler | 9d3cc05 | 2021-03-31 13:36:22 -0500 | [diff] [blame] | 9 | SRCREV = "94144b0a1dcef6e31845d6c319e9bd7357208eb9" |
| 10 | PV = "0.3.15+git${SRCPV}" |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 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 | file://0001-build-don-t-override-localstatedir-mandir-sysconfdir.patch \ |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 19 | " |
| 20 | |
| 21 | S = "${WORKDIR}/git" |
| 22 | |
| 23 | inherit autotools pkgconfig useradd update-rc.d ${@bb.utils.contains('VIRTUAL-RUNTIME_init_manager','systemd','systemd','', d)} |
| 24 | |
| 25 | PACKAGECONFIG ?= "gmp " |
| 26 | PACKAGECONFIG[gmp] = "--with-gmp, --with-gmp=no, gmp" |
| 27 | PACKAGECONFIG[gtk] = "--with-gui=gtk, --with-gui=none, gtk+" |
| 28 | |
| 29 | do_install () { |
| 30 | oe_runmake DESTDIR=${D} install |
| 31 | } |
| 32 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 33 | do_install:append() { |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 34 | install -d ${D}${sysconfdir}/init.d |
| 35 | install -m 0755 ${WORKDIR}/trousers.init.sh ${D}${sysconfdir}/init.d/trousers |
| 36 | install -d ${D}${sysconfdir}/udev/rules.d |
| 37 | install -m 0644 ${WORKDIR}/trousers-udev.rules ${D}${sysconfdir}/udev/rules.d/45-trousers.rules |
| 38 | |
| 39 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 40 | install -d ${D}${systemd_unitdir}/system |
| 41 | install -m 0644 ${WORKDIR}/tcsd.service ${D}${systemd_unitdir}/system/ |
| 42 | sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/tcsd.service |
| 43 | fi |
| 44 | } |
| 45 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 46 | CONFFILES:${PN} += "${sysconfig}/tcsd.conf" |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 47 | |
| 48 | PROVIDES = "${PACKAGES}" |
| 49 | PACKAGES = " \ |
| 50 | libtspi \ |
| 51 | libtspi-dbg \ |
| 52 | libtspi-dev \ |
| 53 | libtspi-doc \ |
| 54 | libtspi-staticdev \ |
| 55 | trousers \ |
| 56 | trousers-dbg \ |
| 57 | trousers-doc \ |
| 58 | " |
| 59 | |
| 60 | # libtspi needs tcsd for most (all?) operations, so suggest to |
| 61 | # install that. |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 62 | RRECOMMENDS:libtspi = "${PN}" |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 63 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 64 | FILES:libtspi = " \ |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 65 | ${libdir}/*.so.1 \ |
| 66 | ${libdir}/*.so.1.2.0 \ |
| 67 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 68 | FILES:libtspi-dbg = " \ |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 69 | ${libdir}/.debug \ |
| 70 | ${prefix}/src/debug/${PN}/${PV}-${PR}/git/src/tspi \ |
| 71 | ${prefix}/src/debug/${PN}/${PV}-${PR}/git/src/trspi \ |
| 72 | ${prefix}/src/debug/${PN}/${PV}-${PR}/git/src/include/*.h \ |
| 73 | ${prefix}/src/debug/${PN}/${PV}-${PR}/git/src/include/tss \ |
| 74 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 75 | FILES:libtspi-dev = " \ |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 76 | ${includedir} \ |
| 77 | ${libdir}/*.so \ |
| 78 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 79 | FILES:libtspi-doc = " \ |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 80 | ${mandir}/man3 \ |
| 81 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 82 | FILES:libtspi-staticdev = " \ |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 83 | ${libdir}/*.la \ |
| 84 | ${libdir}/*.a \ |
| 85 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 86 | FILES:${PN} = " \ |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 87 | ${sbindir}/tcsd \ |
| 88 | ${sysconfdir} \ |
| 89 | ${localstatedir} \ |
| 90 | " |
| 91 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 92 | FILES:${PN}-dev += "${libdir}/trousers" |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 93 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 94 | FILES:${PN}-dbg = " \ |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 95 | ${sbindir}/.debug \ |
| 96 | ${prefix}/src/debug/${PN}/${PV}-${PR}/git/src/tcs \ |
| 97 | ${prefix}/src/debug/${PN}/${PV}-${PR}/git/src/tcsd \ |
| 98 | ${prefix}/src/debug/${PN}/${PV}-${PR}/git/src/tddl \ |
| 99 | ${prefix}/src/debug/${PN}/${PV}-${PR}/git/src/trousers \ |
| 100 | ${prefix}/src/debug/${PN}/${PV}-${PR}/git/src/include/trousers \ |
| 101 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 102 | FILES:${PN}-doc = " \ |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 103 | ${mandir}/man5 \ |
| 104 | ${mandir}/man8 \ |
| 105 | " |
| 106 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 107 | FILES:${PN} += "${systemd_unitdir}/*" |
Andrew Geissler | cc58928 | 2020-09-18 13:34:40 -0500 | [diff] [blame] | 108 | |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 109 | INITSCRIPT_NAME = "trousers" |
| 110 | INITSCRIPT_PARAMS = "start 99 2 3 4 5 . stop 19 0 1 6 ." |
| 111 | |
| 112 | USERADD_PACKAGES = "${PN}" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 113 | GROUPADD_PARAM:${PN} = "--system tss" |
| 114 | USERADD_PARAM:${PN} = "--system -M -d /var/lib/tpm -s /bin/false -g tss tss" |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 115 | |
| 116 | SYSTEMD_PACKAGES = "${PN}" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 117 | SYSTEMD_SERVICE:${PN} = "tcsd.service" |
Richard Marian Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 118 | SYSTEMD_AUTO_ENABLE = "disable" |
| 119 | |
| 120 | BBCLASSEXTEND = "native" |