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.

101 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.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_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:=Middleware to 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. --enable-libusb \
  58. --enable-static \
  59. --enable-usbdropdir=/usr/lib/pcsc/drivers
  60. define Build/InstallDev
  61. $(INSTALL_DIR) $(1)/usr/include/PCSC
  62. $(CP) $(PKG_INSTALL_DIR)/usr/include/PCSC/* $(1)/usr/include/PCSC/
  63. $(INSTALL_DIR) $(1)/usr/lib
  64. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcsclite.{a,so*} $(1)/usr/lib/
  65. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  66. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpcsclite.pc $(1)/usr/lib/pkgconfig/
  67. endef
  68. define Package/libpcsclite/install
  69. $(INSTALL_DIR) $(1)/usr/lib
  70. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcsclite.so.* $(1)/usr/lib/
  71. endef
  72. define Package/pcscd/conffiles
  73. /etc/reader.conf.d/reader.conf
  74. endef
  75. define Package/pcscd/install
  76. $(INSTALL_DIR) $(1)/usr/sbin
  77. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pcscd $(1)/usr/sbin/
  78. $(INSTALL_DIR) $(1)/etc/init.d
  79. $(INSTALL_BIN) ./files/pcscd.init $(1)/etc/init.d/pcscd
  80. $(INSTALL_DIR) $(1)/etc/reader.conf.d
  81. endef
  82. $(eval $(call BuildPackage,libpcsclite))
  83. $(eval $(call BuildPackage,pcscd))