pcsc-tools-1.4.27.ebuild 1.4 KB

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