| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/sys-apps/pcsc-tools/pcsc-tools-1.4.20.ebuild,v 1.1 2012/06/16 16:07:15 flameeyes Exp $
|
| 4 |
|
| 5 |
EAPI="4"
|
| 6 |
|
| 7 |
inherit eutils fdo-mime multilib toolchain-funcs
|
| 8 |
|
| 9 |
DESCRIPTION="PC/SC Architecture smartcard tools"
|
| 10 |
HOMEPAGE="http://ludovic.rousseau.free.fr/softwares/pcsc-tools/"
|
| 11 |
SRC_URI="http://ludovic.rousseau.free.fr/softwares/${PN}/${P}.tar.gz
|
| 12 |
${SC_REV:+http://anonscm.debian.org/viewvc/pcsclite/trunk/pcsc-tools/smartcard_list.txt?revision=${SC_REV}&view=co -> ${PN}-smartcard_list-${SC_REV}.txt}"
|
| 13 |
|
| 14 |
LICENSE="GPL-2"
|
| 15 |
SLOT="0"
|
| 16 |
KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86"
|
| 17 |
IUSE="gtk network-cron"
|
| 18 |
|
| 19 |
RDEPEND=">=sys-apps/pcsc-lite-1.4.14"
|
| 20 |
|
| 21 |
DEPEND="${RDEPEND}
|
| 22 |
virtual/pkgconfig"
|
| 23 |
RDEPEND="${RDEPEND}
|
| 24 |
dev-perl/pcsc-perl
|
| 25 |
gtk? ( dev-perl/gtk2-perl )"
|
| 26 |
|
| 27 |
src_prepare() {
|
| 28 |
sed -i -e 's:-Wall -O2:${CFLAGS}:g' Makefile
|
| 29 |
}
|
| 30 |
|
| 31 |
src_compile() {
|
| 32 |
tc-export CC
|
| 33 |
# explicitly only build the pcsc_scan application, or the man
|
| 34 |
# pages will be gzipped first, and then unpacked.
|
| 35 |
emake pcsc_scan
|
| 36 |
}
|
| 37 |
|
| 38 |
src_install() {
|
| 39 |
# install manually, makes it much easier since the Makefile
|
| 40 |
# requires fiddling with
|
| 41 |
dobin ATR_analysis scriptor pcsc_scan
|
| 42 |
doman pcsc_scan.1 scriptor.1p ATR_analysis.1p
|
| 43 |
|
| 44 |
dodoc README Changelog
|
| 45 |
|
| 46 |
if use gtk; then
|
| 47 |
domenu gscriptor.desktop
|
| 48 |
dobin gscriptor
|
| 49 |
doman gscriptor.1p
|
| 50 |
fi
|
| 51 |
|
| 52 |
if use network-cron ; then
|
| 53 |
exeinto /etc/cron.monthly
|
| 54 |
newexe "${FILESDIR}"/smartcard.cron update-smartcard_list
|
| 55 |
fi
|
| 56 |
|
| 57 |
insinto /usr/share/pcsc
|
| 58 |
if [[ -n ${SC_REV} ]]; then
|
| 59 |
newins "${WORKDIR}"/${PN}-smartcard_list-${SC_REV}.txt smartcard_list.txt
|
| 60 |
else
|
| 61 |
doins smartcard_list.txt
|
| 62 |
fi
|
| 63 |
}
|
| 64 |
|
| 65 |
pkg_postinst() {
|
| 66 |
use gtk && fdo-mime_desktop_database_update
|
| 67 |
}
|
| 68 |
|
| 69 |
pkg_postrm() {
|
| 70 |
fdo-mime_desktop_database_update
|
| 71 |
}
|