summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-apps/pcsc-tools/ChangeLog11
-rw-r--r--sys-apps/pcsc-tools/files/smartcard.cron15
-rw-r--r--sys-apps/pcsc-tools/metadata.xml8
-rw-r--r--sys-apps/pcsc-tools/pcsc-tools-1.4.17-r1.ebuild66
4 files changed, 96 insertions, 4 deletions
diff --git a/sys-apps/pcsc-tools/ChangeLog b/sys-apps/pcsc-tools/ChangeLog
index ed4fe02b9ceb..4582b5eb0fcf 100644
--- a/sys-apps/pcsc-tools/ChangeLog
+++ b/sys-apps/pcsc-tools/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-apps/pcsc-tools
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/pcsc-tools/ChangeLog,v 1.9 2010/12/26 16:04:33 flameeyes Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/pcsc-tools/ChangeLog,v 1.10 2011/03/09 16:29:32 flameeyes Exp $
+
+*pcsc-tools-1.4.17-r1 (09 Mar 2011)
+
+ 09 Mar 2011; Diego E. Pettenò <flameeyes@gentoo.org>
+ +pcsc-tools-1.4.17-r1.ebuild, +files/smartcard.cron, metadata.xml:
+ Add a new version that (optionally) installs an updater script rather than
+ installing a more recent smartcard_list.txt file.
26 Dec 2010; Diego E. Pettenò <flameeyes@gentoo.org>
-pcsc-tools-1.4.16.ebuild, -files/smartcard.svg, metadata.xml:
diff --git a/sys-apps/pcsc-tools/files/smartcard.cron b/sys-apps/pcsc-tools/files/smartcard.cron
new file mode 100644
index 000000000000..314f46f107ef
--- /dev/null
+++ b/sys-apps/pcsc-tools/files/smartcard.cron
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -e
+
+SRC=http://ludovic.rousseau.free.fr/softwares/pcsc-tools/smartcard_list.txt
+DEST=/usr/share/pcsc/smartcard_list.txt
+
+touch ${DEST} >/dev/null 2>&1 || exit 1
+
+if ! wget --quiet --no-timestamping -O "${DEST}".new "$SRC"; then
+ rm -f "${DEST}".new
+fi
+
+chmod a+r "${DEST}".new
+mv "${DEST}".new "${DEST}"
diff --git a/sys-apps/pcsc-tools/metadata.xml b/sys-apps/pcsc-tools/metadata.xml
index 5495605aff22..c6a053218727 100644
--- a/sys-apps/pcsc-tools/metadata.xml
+++ b/sys-apps/pcsc-tools/metadata.xml
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <herd>crypto</herd>
- <longdescription>User tools for PC/SC SmartCard access (including pcsc_scan and the gscriptor GUI).</longdescription>
+ <herd>crypto</herd>
+ <longdescription>User tools for PC/SC SmartCard access (including pcsc_scan and the gscriptor GUI).</longdescription>
+
+ <use>
+ <flag name='network-cron'>Monthly cronjob the update-smartcard_list script</flag>
+ </use>
</pkgmetadata>
diff --git a/sys-apps/pcsc-tools/pcsc-tools-1.4.17-r1.ebuild b/sys-apps/pcsc-tools/pcsc-tools-1.4.17-r1.ebuild
new file mode 100644
index 000000000000..18cf1d69fe6b
--- /dev/null
+++ b/sys-apps/pcsc-tools/pcsc-tools-1.4.17-r1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/pcsc-tools/pcsc-tools-1.4.17-r1.ebuild,v 1.1 2011/03/09 16:29:32 flameeyes Exp $
+
+EAPI="3"
+
+SMARTCARD_DATE=20101010
+
+inherit eutils fdo-mime multilib toolchain-funcs
+
+DESCRIPTION="PC/SC Architecture smartcard tools"
+HOMEPAGE="http://ludovic.rousseau.free.fr/softwares/pcsc-tools/"
+SRC_URI="http://ludovic.rousseau.free.fr/softwares/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86"
+IUSE="gtk network-cron"
+
+RDEPEND=">=sys-apps/pcsc-lite-1.4.14"
+
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig"
+RDEPEND="${RDEPEND}
+ dev-perl/pcsc-perl
+ gtk? ( dev-perl/gtk2-perl )"
+
+src_prepare() {
+ sed -i -e 's:-Wall -O2:${CFLAGS}:g' Makefile
+}
+
+src_compile() {
+ tc-export CC
+ # explicitly only build the pcsc_scan application, or the man
+ # pages will be gzipped first, and then unpacked.
+ emake pcsc_scan || die
+}
+
+src_install() {
+ # install manually, makes it much easier since the Makefile
+ # requires fiddling with
+ dobin ATR_analysis scriptor pcsc_scan || die
+ doman pcsc_scan.1 scriptor.1p ATR_analysis.1p || die
+
+ dodoc README Changelog || die
+
+ if use gtk; then
+ domenu gscriptor.desktop || die
+ dobin gscriptor || die
+ doman gscriptor.1p || die
+ fi
+
+ if use network-cron ; then
+ exeinto /etc/cron.monthly
+ newexe "${FILESDIR}"/smartcard.cron update-smartcard_list \
+ || die "Failed to install update cronjob"
+ fi
+}
+
+pkg_postinst() {
+ use gtk && fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+}