diff options
Diffstat (limited to 'dev-libs/openct')
-rw-r--r-- | dev-libs/openct/Manifest | 7 | ||||
-rw-r--r-- | dev-libs/openct/files/openct.rc | 29 | ||||
-rw-r--r-- | dev-libs/openct/files/openct.rc.2 | 31 | ||||
-rw-r--r-- | dev-libs/openct/metadata.xml | 24 | ||||
-rw-r--r-- | dev-libs/openct/openct-0.6.20-r4.ebuild | 78 |
5 files changed, 169 insertions, 0 deletions
diff --git a/dev-libs/openct/Manifest b/dev-libs/openct/Manifest new file mode 100644 index 000000000000..3c538cc88355 --- /dev/null +++ b/dev-libs/openct/Manifest @@ -0,0 +1,7 @@ +AUX openct.rc 484 SHA256 f95ad5779bc3f8cef4effbe9023c0e0f7d603a13977565ca51525f8080e59131 SHA512 25ea30add05fc5658187e2a3b44fd0f4038873dd9f5d8917c2cbe3ee9ff6514197c8a7eca269634bd2629e8263973cfcbe25ce54f0d5a47a07fc72bd84cbf4da WHIRLPOOL 0e14023959d6884cc84d688f28eb2eadec3179e1d78a77c0ab302c45f48a54fef589e81266bfbe22a41aaeb4052365ad80827a99d5681c0a62a28e4eb254b567 +AUX openct.rc.2 541 SHA256 932638ce569f9dfff89c8537e8319244a14b2cef70de1ead15dda1aaf85d4dc9 SHA512 0703dddea09de62a25abbeab1514b265ca2207eef558d42a7cba35e6a1d9d720ab5664f417e16df8e263d3a7742eaa89b34432beac81a2a5851473e645072c5d WHIRLPOOL a63e565d8e27fb4860e35f8a145dca881a48becaf88ad9895ab8c508644beead093e273206f35573f89bf4e5c82f45154ca3f0d333eba1381d90caa1716a893a +DIST openct-0.6.20.tar.gz 702818 SHA256 6cd3e2933d29eb1f875c838ee58b8071fd61f0ec8ed5922a86c01c805d181a68 SHA512 5175b418847200dbd4af0d8ab09546d94568639c67db67bdea93c68cb042c7ef901bb356784d6b1d9f4de914535eee5a450b39a15d1ab9a676ffce790a408a3e WHIRLPOOL 29348e495be182f4e4deb146dc292ef2fb8923b1212206c33486b38eaf65be1ac62105b6342a7970dce0346be5c863a518e1d148ed8e8f20e1d8af8dbce07ab5 +EBUILD openct-0.6.20-r4.ebuild 2072 SHA256 de1d0951a51820b7d3819b77de37dcd8d0b8aae6b5cb75dd5a2ffed70386d55e SHA512 89b766b866135d070537f20057c45ac5abcf3ccf0023b9d1ceb8f990df00c84566812ec6f1ac2e2316f17a7d1688a8de7e5a5839ff8f3beaf3739a3041d269f3 WHIRLPOOL 9594248ee8a6d78afb464467378d2d819d8ce3755e29a8bed6d4e8ebbf0e5a79cd0e1933d5b7188f3d28dc4544cdb8fe85d36e6a9d029226705cf1cb682d60f2 +MISC ChangeLog 2797 SHA256 80fbe83b29a3a3a2dcb246b71bbe2bb75d06bd344d9fbd35770aac6ba711824c SHA512 4a7727647e2379b29b8c496b0b0739224ca85815c7ee334c072d74397bbe7caf7959d1ca213a9f904a72f8e3a86fdf9389c60d4c8a628dc1e07650996b22ea8d WHIRLPOOL 79b375f50d1dc2c6574b4d1500137ff6e71a215c0791a9c120a34a7b8f45d7c822e6cc41ce7af63aa2c7c6bbd89dce6ea3067db7d7644f03295d05af7cab4a65 +MISC ChangeLog-2015 14986 SHA256 b64587a2c848bb3be4c789814dd678d49dc71e58e834b7ab510b23dc1eb05327 SHA512 abce16991fad5e319d94906c322ea56e8733200e24c565863b60bd56667d938f164918391944de84a39c1d43a2c8776083427195eaff3ab966f69d8193180332 WHIRLPOOL 50627511f86a2cf7abf2f49e852fdc86b29d0e30f9c123b17331b721f64adae4468a41d83d16b8dc249ffec13d0011c371012404f8340b693f8602dc6f10d769 +MISC metadata.xml 747 SHA256 072be637e047020e942522ff754dcc5e86aac16cf067909be8f615fb74098202 SHA512 aa25ed7868eeddad3b1a3f2c4e73e6c457f36f640f7cd669dd5f1da2197b9605a19d2bcb3cb6161a474229e9289e33bc10b2d900d190dc05128c585237be834c WHIRLPOOL a1f847ea4820d3c387b12cc58711faa510e767ad3db3cf856f2d78bbf8991edbd3a11e77a52db7d4af2c72daacbddb725d96291b34c52e4b36a7e3bf53af15b2 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..6c9816fbd65e --- /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 +} |