diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /app-crypt/tpm-emulator/tpm-emulator-0.7.4-r1.ebuild |
reinit the tree, so we can have metadata
Diffstat (limited to 'app-crypt/tpm-emulator/tpm-emulator-0.7.4-r1.ebuild')
-rw-r--r-- | app-crypt/tpm-emulator/tpm-emulator-0.7.4-r1.ebuild | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/app-crypt/tpm-emulator/tpm-emulator-0.7.4-r1.ebuild b/app-crypt/tpm-emulator/tpm-emulator-0.7.4-r1.ebuild new file mode 100644 index 000000000000..8b41e36c664b --- /dev/null +++ b/app-crypt/tpm-emulator/tpm-emulator-0.7.4-r1.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit user linux-mod cmake-utils udev + +MY_P=${P/-/_} +DESCRIPTION="Emulator driver for tpm" +HOMEPAGE="https://sourceforge.net/projects/tpm-emulator.berlios/" +SRC_URI="mirror://sourceforge/tpm-emulator/${MY_P}.tar.gz" +LICENSE="GPL-2" + +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="libressl ssl modules" +RDEPEND="ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + )" +DEPEND="${RDEPEND} + !ssl? ( dev-libs/gmp )" + +S=${WORKDIR}/${P/-/_} + +pkg_setup() { + enewuser tss -1 -1 /var/lib/tpm tss + if use modules; then + CONFIG_CHECK="MODULES" + linux-mod_pkg_setup + BUILD_TARGETS="all" + BUILD_PARAMS="KERNEL_BUILD=${KERNEL_DIR}" + fi +} + +src_prepare() { + default + # do not build and install the kernel module + sed -i 's/COMMAND ${tpmd_dev_BUILD_CMD}//' tpmd_dev/CMakeLists.txt || die + sed -i 's/install(CODE.*//' tpmd_dev/CMakeLists.txt || die +} + +src_configure() { + mycmakeargs=( + -DUSE_OPENSSL=$(usex ssl) + ) + cmake-utils_src_configure + + # only here we have BUILD_DIR + MODULE_NAMES="tpmd_dev(misc:${BUILD_DIR}/tpmd_dev/linux)" +} + +src_compile() { + cmake-utils_src_compile + use modules && linux-mod_src_compile + emake -C "${BUILD_DIR}/tpmd_dev/linux" tpmd_dev.rules +} + +src_install() { + cmake-utils_src_install + use modules && linux-mod_src_install + + dodoc README + + udev_newrules "${BUILD_DIR}/tpmd_dev/linux/tpmd_dev.rules" 60-tpmd_dev.rules + + newinitd "${FILESDIR}"/${PN}.initd-0.7.4 ${PN} + newconfd "${FILESDIR}"/${PN}.confd-0.7.4 ${PN} + + keepdir /var/log/tpm + fowners tss:tss /var/log/tpm +} |