summaryrefslogtreecommitdiff
path: root/dev-libs/openct
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-libs/openct
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-libs/openct')
-rw-r--r--dev-libs/openct/Manifest5
-rw-r--r--dev-libs/openct/files/openct.rc29
-rw-r--r--dev-libs/openct/files/openct.rc.231
-rw-r--r--dev-libs/openct/metadata.xml24
-rw-r--r--dev-libs/openct/openct-0.6.20-r4.ebuild78
5 files changed, 167 insertions, 0 deletions
diff --git a/dev-libs/openct/Manifest b/dev-libs/openct/Manifest
new file mode 100644
index 000000000000..f5a08fe118bc
--- /dev/null
+++ b/dev-libs/openct/Manifest
@@ -0,0 +1,5 @@
+AUX openct.rc 484 BLAKE2B 95296abb9d8ec3fd6c3305f880161286177968d12b8af3d7ddc76bce1811b1319a8e07d6936956219de03327f9b9d7deccc7b9affbdd412a61ab74459a4033d4 SHA512 25ea30add05fc5658187e2a3b44fd0f4038873dd9f5d8917c2cbe3ee9ff6514197c8a7eca269634bd2629e8263973cfcbe25ce54f0d5a47a07fc72bd84cbf4da
+AUX openct.rc.2 541 BLAKE2B b9f487432383b07282accc01d9f804bc114503cde32e1e2c5128003c9cddbab4b94e64b677ef3104b5d1791383ea521d0a08381d0f1f9d4389ab28d8469fad95 SHA512 0703dddea09de62a25abbeab1514b265ca2207eef558d42a7cba35e6a1d9d720ab5664f417e16df8e263d3a7742eaa89b34432beac81a2a5851473e645072c5d
+DIST openct-0.6.20.tar.gz 702818 BLAKE2B 13637fa914394e1e553d750062535c879ba11c6587c42570e2bc92c4af9f732a9b0dfc06e2140f4965480363f8d65bc5831f905910d734c36034ccf1916ad302 SHA512 5175b418847200dbd4af0d8ab09546d94568639c67db67bdea93c68cb042c7ef901bb356784d6b1d9f4de914535eee5a450b39a15d1ab9a676ffce790a408a3e
+EBUILD openct-0.6.20-r4.ebuild 2072 BLAKE2B 3fd05b6e1ebfaae38532a617a3ad3e2170ac46fb3ffb43c1e7eff9a238780718528cf2be10cf0a441b5fc1c2bd4095860473b6948e74711c7927c91781e5ad98 SHA512 89b766b866135d070537f20057c45ac5abcf3ccf0023b9d1ceb8f990df00c84566812ec6f1ac2e2316f17a7d1688a8de7e5a5839ff8f3beaf3739a3041d269f3
+MISC metadata.xml 729 BLAKE2B 7dcf616566e472bbd409f7fe0e5ceacba97aa730eda70de860ad284a49e26359e92533d09a5f9d5ee0fc493e79d9b53bee43a15cc15a65a1bbb748baa0d4da0c SHA512 6c5ecfcb09ebfd79ddd7d68243d16fc5bcf556b833d84bf167cfc06715d47cf078005acfa5811a40a8f4f422f7c02d3fbb9d79846c8469843a241e137bd93365
diff --git a/dev-libs/openct/files/openct.rc b/dev-libs/openct/files/openct.rc
new file mode 100644
index 000000000000..b3ff33e974eb
--- /dev/null
+++ b/dev-libs/openct/files/openct.rc
@@ -0,0 +1,29 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need localmount
+}
+
+checkconfig() {
+ if [ ! -e /etc/openct.conf ] ; then
+ eerror "You need an /etc/openct.conf file to run OpenCT"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting OpenCT"
+ /usr/sbin/openct-control init
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping OpenCT"
+ /usr/sbin/openct-control shutdown
+ eend $?
+}
diff --git a/dev-libs/openct/files/openct.rc.2 b/dev-libs/openct/files/openct.rc.2
new file mode 100644
index 000000000000..d07cc6116262
--- /dev/null
+++ b/dev-libs/openct/files/openct.rc.2
@@ -0,0 +1,31 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need localmount
+}
+
+checkconfig() {
+ if [ ! -e /etc/openct.conf ] ; then
+ eerror "You need an /etc/openct.conf file to run OpenCT"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+
+ checkpath -d -m 0750 -o openctd:openct /var/run/openct
+
+ ebegin "Starting OpenCT"
+ /usr/sbin/openct-control init
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping OpenCT"
+ /usr/sbin/openct-control shutdown
+ eend $?
+}
diff --git a/dev-libs/openct/metadata.xml b/dev-libs/openct/metadata.xml
new file mode 100644
index 000000000000..38be29df0b18
--- /dev/null
+++ b/dev-libs/openct/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>crypto@gentoo.org</email>
+ <name>Crypto</name>
+ </maintainer>
+ <use>
+ <flag name="pcsc-lite">
+ Build a driver library for <pkg>sys-apps/pcsc-lite</pkg>,
+ providing PC/SC API access to devices supported by OpenCT.
+ </flag>
+ <flag name="debug">
+ Add debug output to the driver library for pcsc-lite.
+ </flag>
+ <flag name="udev">
+ Install rules for <pkg>sys-fs/udev</pkg> to auto-start openct.
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="github">OpenSC/openct</remote-id>
+ <remote-id type="sourceforge">opensc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-libs/openct/openct-0.6.20-r4.ebuild b/dev-libs/openct/openct-0.6.20-r4.ebuild
new file mode 100644
index 000000000000..b675d41066d2
--- /dev/null
+++ b/dev-libs/openct/openct-0.6.20-r4.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic ltprune multilib udev user
+
+DESCRIPTION="library for accessing smart card terminals"
+HOMEPAGE="https://github.com/OpenSC/openct/wiki"
+
+SRC_URI="mirror://sourceforge/opensc/${PN}/${P}.tar.gz"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="doc pcsc-lite usb debug +udev"
+
+# Drop the libtool dep once libltdl goes stable.
+RDEPEND="pcsc-lite? ( >=sys-apps/pcsc-lite-1.7.2-r1:= )
+ usb? ( virtual/libusb:0 )
+ dev-libs/libltdl:0="
+
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+# udev is not required at all at build-time as it's only a matter of
+# installing the rules; add openrc for the checkpath used in the new
+# init script
+RDEPEND="${RDEPEND}
+ udev? ( virtual/udev )
+ sys-apps/openrc"
+
+pkg_setup() {
+ enewgroup openct
+ enewuser openctd
+}
+
+src_configure() {
+ use debug && append-cppflags -DDEBUG_IFDH
+
+ econf \
+ --docdir="/usr/share/doc/${PF}" \
+ --htmldir="/usr/share/doc/${PF}/html" \
+ --localstatedir=/var \
+ --with-udev="$(get_udevdir)" \
+ --enable-non-privileged \
+ --with-daemon-user=openctd \
+ --with-daemon-groups=usb \
+ --enable-shared --disable-static \
+ $(use_enable doc) \
+ $(use_enable doc api-doc) \
+ $(use_enable pcsc-lite pcsc) \
+ $(use_with pcsc-lite bundle /usr/$(get_libdir)/readers/usb) \
+ $(use_enable usb)
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+ rm "${D}"/usr/$(get_libdir)/openct-ifd.*
+
+ use udev && udev_newrules etc/openct.udev 70-openct.rules
+
+ newinitd "${FILESDIR}"/openct.rc.2 openct
+}
+
+pkg_postinst() {
+ elog
+ elog "You need to edit /etc/openct.conf to enable serial readers."
+ elog
+ elog "You should add \"openct\" to your default runlevel. To do so"
+ elog "type \"rc-update add openct default\"."
+ elog
+ elog "You need to be a member of the (newly created) group openct to"
+ elog "access smart card readers connected to this system. Set users'"
+ elog "groups with usermod -G. root always has access."
+ elog
+}