Gentoo Archives: gentoo-commits

From: Alon Bar-Lev <alonbl@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/tpm-emulator/
Date: Sat, 26 Jan 2019 21:09:29
Message-Id: 1548536949.16d1495e82d4bb5402116c693a67cade5acb0c40.alonbl@gentoo
1 commit: 16d1495e82d4bb5402116c693a67cade5acb0c40
2 Author: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jan 26 21:05:26 2019 +0000
4 Commit: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 26 21:09:09 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=16d1495e
7
8 app-crypt/tpm-emulator: drop openssl support
9
10 Incompatible with openssl-1.1, too much effort to modify.
11 The gmp support is sufficient.
12
13 Closes: https://bugs.gentoo.org/show_bug.cgi?id=674180
14 Signed-off-by: Alon Bar-Lev <alonbl <AT> gentoo.org>
15 Package-Manager: Portage-2.3.51, Repoman-2.3.11
16
17 .../tpm-emulator/tpm-emulator-0.7.5-r1.ebuild | 77 ++++++++++++++++++++++
18 1 file changed, 77 insertions(+)
19
20 diff --git a/app-crypt/tpm-emulator/tpm-emulator-0.7.5-r1.ebuild b/app-crypt/tpm-emulator/tpm-emulator-0.7.5-r1.ebuild
21 new file mode 100644
22 index 00000000000..c4ca2397fd2
23 --- /dev/null
24 +++ b/app-crypt/tpm-emulator/tpm-emulator-0.7.5-r1.ebuild
25 @@ -0,0 +1,77 @@
26 +# Copyright 1999-2019 Gentoo Authors
27 +# Distributed under the terms of the GNU General Public License v2
28 +
29 +EAPI=6
30 +MODULES_OPTIONAL_USE="modules"
31 +inherit user linux-mod cmake-utils udev
32 +
33 +MY_P=${P/-/_}
34 +DESCRIPTION="Emulator driver for tpm"
35 +HOMEPAGE="https://github.com/PeterHuewe/tpm-emulator"
36 +SRC_URI="https://github.com/PeterHuewe/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
37 +LICENSE="GPL-2"
38 +
39 +SLOT="0"
40 +KEYWORDS="~amd64 ~x86"
41 +
42 +IUSE="mtm-emulator"
43 +RDEPEND="dev-libs/gmp:="
44 +DEPEND="${RDEPEND}"
45 +
46 +PATCHES=(
47 + "${FILESDIR}/${P}-build.patch"
48 +)
49 +
50 +pkg_setup() {
51 + enewgroup tss
52 + enewuser tss -1 -1 /var/lib/tpm tss
53 + if use modules; then
54 + CONFIG_CHECK="MODULES"
55 + MODULE_NAMES="tpmd_dev(extra:tpmd_dev/linux:)"
56 + BUILD_TARGETS="all tpmd_dev.rules"
57 + BUILD_PARAMS="KERNEL_BUILD=${KERNEL_DIR}"
58 + linux-mod_pkg_setup
59 + fi
60 +}
61 +
62 +src_configure() {
63 + local mycmakeargs=(
64 + -DMTM_EMULATOR=$(usex mtm-emulator ON OFF)
65 + -DBUILD_DEV=OFF
66 + )
67 + cmake-utils_src_configure
68 +
69 + use modules && ln -s "${BUILD_DIR}/config.h" tpmd_dev/linux
70 +}
71 +
72 +src_compile() {
73 + cmake-utils_src_compile
74 + use modules && linux-mod_src_compile
75 +}
76 +
77 +src_install() {
78 + cmake-utils_src_install
79 + if use modules; then
80 + linux-mod_src_install
81 + udev_newrules "tpmd_dev/linux/tpmd_dev.rules" 60-tpmd_dev.rules
82 + fi
83 +
84 + newinitd "${FILESDIR}/${PN}.initd" "${PN}"
85 + newconfd "${FILESDIR}/${PN}.confd" "${PN}"
86 +
87 + keepdir /var/log/tpm
88 + fowners tss:tss /var/log/tpm
89 +}
90 +
91 +pkg_postinst() {
92 + if use modules; then
93 + linux-mod_pkg_postinst
94 +
95 + ewarn ""
96 + ewarn "The new init.d script does not load the tpmd_dev any more as it is optional."
97 + ewarn "If you use the tpmd_dev, please load it explicitly in /etc/conf.d/modules"
98 + ewarn ""
99 + fi
100 +
101 + einfo "tpmd socket is located at /var/run/tpm/tpmd_socket:0"
102 +}