You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

102 lines
2.6 KiB

  1. #
  2. # Copyright (C) 2009-2012 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=pcsc-lite
  9. PKG_VERSION:=1.8.23
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=https://alioth.debian.org/frs/download.php/file/4235
  13. PKG_HASH:=5a27262586eff39cfd5c19aadc8891dd71c0818d3d629539bd631b958be689c9
  14. PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
  15. PKG_LICENSE:=BSD-3-Clause
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_FIXUP:=autoreconf
  18. PKG_INSTALL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/pcsc-lite/Default
  21. TITLE:=Access a smart card using SCard API (PC/SC)
  22. URL:=http://pcsclite.alioth.debian.org/
  23. endef
  24. define Package/pcsc-lite/Default/description
  25. The purpose of PC/SC Lite is to provide a Windows(R) SCard
  26. interface in a very small form factor for communicating to
  27. smart cards and smart cards readers.
  28. endef
  29. define Package/libpcsclite
  30. $(call Package/pcsc-lite/Default)
  31. SECTION:=libs
  32. CATEGORY:=Libraries
  33. TITLE+= (library)
  34. DEPENDS:=+libusb-1.0 +libpthread +librt
  35. endef
  36. define Package/libpcsclite/description
  37. $(call Package/pcsc-lite/Default/description)
  38. .
  39. This package contains the PC/SC shared library.
  40. endef
  41. define Package/pcscd
  42. $(call Package/pcsc-lite/Default)
  43. SECTION:=utils
  44. CATEGORY:=Utilities
  45. TITLE+= (daemon)
  46. DEPENDS:=+libpcsclite
  47. endef
  48. define Package/pcscd/description
  49. $(call Package/pcsc-lite/Default/description)
  50. .
  51. This package contains the PC/SC daemon.
  52. endef
  53. TARGET_CFLAGS += $(FPIC)
  54. TARGET_LDFLAGS += -lpthread
  55. CONFIGURE_ARGS += \
  56. --disable-libudev \
  57. --disable-libsystemd \
  58. --enable-libusb \
  59. --enable-static \
  60. --enable-usbdropdir=/usr/lib/pcsc/drivers
  61. define Build/InstallDev
  62. $(INSTALL_DIR) $(1)/usr/include/PCSC
  63. $(CP) $(PKG_INSTALL_DIR)/usr/include/PCSC/* $(1)/usr/include/PCSC/
  64. $(INSTALL_DIR) $(1)/usr/lib
  65. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcsclite.{a,so*} $(1)/usr/lib/
  66. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  67. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpcsclite.pc $(1)/usr/lib/pkgconfig/
  68. endef
  69. define Package/libpcsclite/install
  70. $(INSTALL_DIR) $(1)/usr/lib
  71. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcsclite.so.* $(1)/usr/lib/
  72. endef
  73. define Package/pcscd/conffiles
  74. /etc/reader.conf.d/reader.conf
  75. endef
  76. define Package/pcscd/install
  77. $(INSTALL_DIR) $(1)/usr/sbin
  78. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pcscd $(1)/usr/sbin/
  79. $(INSTALL_DIR) $(1)/etc/init.d
  80. $(INSTALL_BIN) ./files/pcscd.init $(1)/etc/init.d/pcscd
  81. $(INSTALL_DIR) $(1)/etc/reader.conf.d
  82. endef
  83. $(eval $(call BuildPackage,libpcsclite))
  84. $(eval $(call BuildPackage,pcscd))