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.

104 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.9.0
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=https://pcsclite.apdu.fr/files/
  13. PKG_HASH:=0148d403137124552c5d0f10f8cdab2cbb8dfc7c6ce75e018faf667be34f2ef9
  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-ipcdir=/var/run/pcscd \
  62. --enable-usbdropdir=/usr/lib/pcsc/drivers
  63. define Build/InstallDev
  64. $(INSTALL_DIR) $(1)/usr/include/PCSC
  65. $(CP) $(PKG_INSTALL_DIR)/usr/include/PCSC/* $(1)/usr/include/PCSC/
  66. $(INSTALL_DIR) $(1)/usr/lib
  67. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcsclite.{a,so*} $(1)/usr/lib/
  68. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  69. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpcsclite.pc $(1)/usr/lib/pkgconfig/
  70. endef
  71. define Package/libpcsclite/install
  72. $(INSTALL_DIR) $(1)/usr/lib
  73. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcsclite.so.* $(1)/usr/lib/
  74. endef
  75. define Package/pcscd/conffiles
  76. /etc/reader.conf.d/reader.conf
  77. endef
  78. define Package/pcscd/install
  79. $(INSTALL_DIR) $(1)/usr/sbin
  80. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pcscd $(1)/usr/sbin/
  81. $(INSTALL_DIR) $(1)/etc/init.d
  82. $(INSTALL_BIN) ./files/pcscd.init $(1)/etc/init.d/pcscd
  83. $(INSTALL_DIR) $(1)/etc/reader.conf.d
  84. endef
  85. $(eval $(call BuildPackage,libpcsclite))
  86. $(eval $(call BuildPackage,pcscd))