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