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.

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