dev-libs/opencryptoki: version bump
authorAlon Bar-Lev <alonbl@gentoo.org>
Fri, 3 Feb 2017 19:12:14 +0000 (21:12 +0200)
committerAlon Bar-Lev <alonbl@gentoo.org>
Sat, 4 Feb 2017 01:30:39 +0000 (03:30 +0200)
Package-Manager: portage-2.3.3

dev-libs/opencryptoki/Manifest
dev-libs/opencryptoki/files/pkcsslotd.init.2
dev-libs/opencryptoki/opencryptoki-3.4.1.ebuild
dev-libs/opencryptoki/opencryptoki-3.6.1.ebuild [new file with mode: 0644]

index 3cbb424bfea375564445a857116a4c96a7419e22..544841eb5b1bd358417cc60f32887d98e3877985 100644 (file)
@@ -1 +1,2 @@
+DIST opencryptoki-3.6.1.tgz 1068197 SHA256 163dd6419963c834e57423168aa92a9f68f867baf523212f66eff428853ef9df SHA512 1874fabba6d3da49596622c7f8142a37329df95f129cb08319bb3900a944dde1ae5ce9d845d400726f4bda4579c730012b9bfd6c69c6d5a16b1f75b28a0ba4af WHIRLPOOL 2a42d34717c5a66794406ce0b41aa47285b682da30e66396be1a3db9bc36bc17c45e28775e2f3da74f91342054683991c3eaa1a1d05c541b052309dcfc39a385
 DIST opencryptoki-v3.4.1.tgz 1014416 SHA256 018ea402f3a1b38b203282fb047dfac209d94bf2988f2c29793eca65455452c4 SHA512 98643463102f70226255f17a7c49cc454cce377404155b9624e77e36c9f03fb30c216d1769177666489a539e0886b071103a089c565f8fbf120c2a53239a2dd6 WHIRLPOOL c05b61c220e87af361cf67c5223f5745e305c5039a610bb740d2e729299517363d5d7d03175869ab517519857a526ac0272f1556bd9e1cd9dea84bd500595f7e
index f00fdc9fe92bd8f64c81f01a154473555a5b68de..44056b0e50b786ff77d30d8bbfe4ae2bc345256a 100644 (file)
@@ -1,5 +1,5 @@
 #!/sbin/openrc-run
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 depend() {
index ede006950652e6aee5255d5e6a42ac8061be3478..c9ccc19c5fdcbc7b4608e550b77d80092f4b01b4 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
diff --git a/dev-libs/opencryptoki/opencryptoki-3.6.1.ebuild b/dev-libs/opencryptoki/opencryptoki-3.6.1.ebuild
new file mode 100644 (file)
index 0000000..b9504a7
--- /dev/null
@@ -0,0 +1,102 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="6"
+
+inherit autotools multilib flag-o-matic user
+
+DESCRIPTION="PKCS#11 provider cryptographic hardware"
+HOMEPAGE="https://sourceforge.net/projects/opencryptoki"
+SRC_URI="mirror://sourceforge/opencryptoki/${PV}/${P}.tgz"
+
+# 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"
+IUSE="debug libressl +tpm"
+
+RDEPEND="tpm? ( app-crypt/trousers )
+       >=dev-libs/openssl-1.1.0:0="
+DEPEND="${RDEPEND}"
+
+DOCS=(
+       README AUTHORS FAQ TODO
+       doc/openCryptoki-HOWTO.pdf
+)
+
+# 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
+
+S="${WORKDIR}/${PN}"
+
+pkg_setup() {
+       enewgroup pkcs11
+}
+
+src_prepare() {
+       default
+       mv configure.in configure.ac || die
+       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-ccatok
+}
+
+src_install() {
+       default
+       prune_libtool_files --all
+
+       # Install libopencryptoki in the standard directory for libraries.
+       mv "${ED}"/usr/$(get_libdir)/opencryptoki/libopencryptoki.so* "${ED}"/usr/$(get_libdir) || die
+       rm "${ED}"/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 "${ED}" -name 'PKCS11_*' -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 "${ED}"/etc/ld.so.conf.d "${ED}"/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
+
+       # We create /var dirs at runtime as needed, so don't bother installing
+       # our own.
+       rm -r "${ED}"/var/{lib,lock} || die
+}