summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-libs/opencryptoki/opencryptoki-2.4.2.ebuild
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-libs/opencryptoki/opencryptoki-2.4.2.ebuild')
-rw-r--r--dev-libs/opencryptoki/opencryptoki-2.4.2.ebuild100
1 files changed, 100 insertions, 0 deletions
diff --git a/dev-libs/opencryptoki/opencryptoki-2.4.2.ebuild b/dev-libs/opencryptoki/opencryptoki-2.4.2.ebuild
new file mode 100644
index 000000000000..fb736c031f18
--- /dev/null
+++ b/dev-libs/opencryptoki/opencryptoki-2.4.2.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit autotools eutils multilib flag-o-matic user
+
+DESCRIPTION="PKCS#11 provider cryptographic hardware"
+HOMEPAGE="http://sourceforge.net/projects/opencryptoki"
+SRC_URI="mirror://sourceforge/opencryptoki/${P}.tar.gz"
+
+# Upstream is looking into relicensing it into CPL-1.0 entirely; the CCA
+# token sources are under CPL-1.0 already.
+LICENSE="CPL-0.5"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+
+RDEPEND="tpm? ( app-crypt/trousers )
+ dev-libs/openssl"
+DEPEND="${RDEPEND}"
+
+IUSE="+tpm debug"
+
+# tests right now basically don't exist; the only available thing would
+# test against an installed copy and would kill a running pcscd, all
+# things that we're not interested to.
+RESTRICT=test
+
+pkg_setup() {
+ enewgroup pkcs11
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-destdir.patch"
+ eautoreconf
+}
+
+src_configure() {
+ # package uses ${localstatedir}/lib as the default path, so if we
+ # leave it to econf, it'll create /var/lib/lib.
+
+ # Since upstream by default seem to enable any possible token, even
+ # when they don't seem to be used, we limit ourselves to the
+ # software emulation token (swtok) and if the user enabled the tpm
+ # USE flag, tpmtok. The rest of the tokens seem to be hardware- or
+ # software-dependent even when they build fine without their
+ # requirements, but until somebody asks for those, I'd rather not
+ # enable them.
+
+ # We don't use --enable-debug because that tinkers with the CFLAGS
+ # and we don't want that. Instead we append -DDEBUG which enables
+ # debug information.
+ use debug && append-flags -DDEBUG
+
+ econf \
+ --localstatedir=/var \
+ --enable-fast-install \
+ --disable-dependency-tracking \
+ --disable-debug \
+ --enable-daemon \
+ --enable-library \
+ --disable-icatok \
+ --enable-swtok \
+ $(use_enable tpm tpmtok) \
+ --disable-aeptok \
+ --disable-bcomtok \
+ --disable-ccatok \
+ --disable-crtok \
+ --disable-icctok \
+ --disable-pkcscca_migrate
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die "emake install failed"
+
+ # Install libopencryptoki in the standard directory for libraries.
+ mv "${D}"/usr/$(get_libdir)/opencryptoki/libopencryptoki.so* "${D}"/usr/$(get_libdir) || die
+ rm "${D}"/usr/$(get_libdir)/pkcs11/libopencryptoki.so
+ dosym ../libopencryptoki.so /usr/$(get_libdir)/pkcs11/libopencryptoki.so
+
+ # Remove compatibility symlinks as we _never_ required those and
+ # they seem unused even upstream.
+ find "${D}" -name 'PKCS11_*' -delete
+
+ # doesn't use libltdl; only dlopen()-based interfaces
+ find "${D}" -name '*.la' -delete
+
+ # We replace their ld.so and init files (mostly designed for RedHat
+ # as far as I can tell) with our own replacements.
+ rm -rf "${D}"/etc/ld.so.conf.d "${D}"/etc/rc.d
+
+ # make sure that we don't modify the init script if the USE flags
+ # are enabled for the needed services.
+ cp "${FILESDIR}"/pkcsslotd.init.2 "${T}"/pkcsslotd.init
+ use tpm || sed -i -e '/use tcsd/d' "${T}"/pkcsslotd.init
+ newinitd "${T}/pkcsslotd.init" pkcsslotd
+
+ dodoc README AUTHORS FAQ TODO doc/openCryptoki-HOWTO.pdf || die
+}