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.

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