From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 2422413888F for ; Mon, 5 Oct 2015 09:20:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 80669E0855; Mon, 5 Oct 2015 09:20:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 123AAE0855 for ; Mon, 5 Oct 2015 09:20:05 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 93B783406DD for ; Mon, 5 Oct 2015 09:20:04 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DB0C8600 for ; Mon, 5 Oct 2015 09:20:00 +0000 (UTC) From: "Julian Ospald" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Julian Ospald" Message-ID: <1444036790.f542bf4cc7a867cfecc0905425879d6fbded45a1.hasufell@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/trousers/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-crypt/trousers/trousers-0.3.13-r1.ebuild X-VCS-Directories: app-crypt/trousers/ X-VCS-Committer: hasufell X-VCS-Committer-Name: Julian Ospald X-VCS-Revision: f542bf4cc7a867cfecc0905425879d6fbded45a1 X-VCS-Branch: master Date: Mon, 5 Oct 2015 09:20:00 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 34cc1444-b425-4ebc-b0d0-011e47ab3b38 X-Archives-Hash: 8eadf6138dbae3be199f24f19aaea492 commit: f542bf4cc7a867cfecc0905425879d6fbded45a1 Author: Julian Ospald gentoo org> AuthorDate: Mon Oct 5 09:19:50 2015 +0000 Commit: Julian Ospald gentoo org> CommitDate: Mon Oct 5 09:19:50 2015 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f542bf4c app-crypt/trousers: add libressl support app-crypt/trousers/trousers-0.3.13-r1.ebuild | 104 +++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) diff --git a/app-crypt/trousers/trousers-0.3.13-r1.ebuild b/app-crypt/trousers/trousers-0.3.13-r1.ebuild new file mode 100644 index 0000000..e1055d2 --- /dev/null +++ b/app-crypt/trousers/trousers-0.3.13-r1.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools eutils linux-info readme.gentoo systemd user udev + +#MY_P="${PN}-${PV%.*}-${PV##*.}" + +DESCRIPTION="An open-source TCG Software Stack (TSS) v1.1 implementation" +HOMEPAGE="http://trousers.sf.net" +SRC_URI="mirror://sourceforge/trousers/${P}.tar.gz" + +LICENSE="CPL-1.0 GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~x86" +IUSE="doc libressl selinux" # gtk + +# gtk support presently does NOT compile. +# gtk? ( >=x11-libs/gtk+-2 ) + +CDEPEND=">=dev-libs/glib-2 + !libressl? ( >=dev-libs/openssl-0.9.7:0 ) + libressl? ( dev-libs/libressl ) +" +DEPEND="${CDEPEND} + virtual/pkgconfig" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-tcsd )" +# S="${WORKDIR}/${P}git" + +DOCS="AUTHORS ChangeLog NICETOHAVES README TODO" + +DOC_CONTENTS=" + If you have problems starting tcsd, please check permissions and + ownership on /dev/tpm* and ~tss/system.data +" + +pkg_setup() { + # Check for driver (not sure it can be an rdep, because ot depends on the + # version of virtual/linux-sources... Is that supported by portage?) + linux-info_pkg_setup + local tpm_kernel_version tpm_kernel_present tpm_module + kernel_is ge 2 6 12 && tpm_kernel_version="yes" + if linux_config_exists; then + linux_chkconfig_present TCG_TPM && tpm_kernel_present="yes" + else + ewarn "No kernel configuration could be found." + fi + has_version app-crypt/tpm-emulator && tpm_module="yes" + if [[ -n "${tpm_kernel_present}" ]]; then + einfo "Good, you seem to have in-kernel TPM support." + elif [[ -n "${tpm_module}" ]]; then + einfo "Good, you seem to have TPM support with the external module." + if [[ -n "${tpm_kernel_version}" ]]; then + elog + elog "Note that since you have a >=2.6.12 kernel, you could use" + elog "the in-kernel driver instead of (CONFIG_TCG_TPM)." + fi + elif [[ -n "${tpm_kernel_version}" ]]; then + eerror + eerror "To use this package, you will have to activate TPM support" + eerror "in your kernel configuration. That's at least CONFIG_TCG_TPM," + eerror "plus probably a chip specific driver (like CONFIG_TCG_ATMEL)." + eerror + else + eerror + eerror "To use this package, you should install a TPM driver." + eerror "You can have the following options:" + eerror " - install app-crypt/tpm-emulator" + eerror " - switch to a >=2.6.12 kernel and compile the kernel module" + eerror + fi + + # New user/group for the daemon + enewgroup tss + enewuser tss -1 -1 /var/lib/tpm tss +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-nouseradd.patch + epatch "${FILESDIR}"/${P}-build.patch + mv configure.in configure.ac || die + eautoreconf +} + +src_configure() { + # econf --with-gui=$(usex gtk gtk openssl) + econf --with-gui=openssl +} + +src_install() { + keepdir /var/lib/tpm + default + use doc && dodoc doc/* + newinitd "${FILESDIR}"/tcsd.initd tcsd + newconfd "${FILESDIR}"/tcsd.confd tcsd + systemd_dounit "${FILESDIR}"/tcsd.service + udev_dorules "${FILESDIR}"/61-trousers.rules + fowners tss:tss /var/lib/tpm + prune_libtool_files + readme.gentoo_create_doc +}