Ei kuvausta

Makefile 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #
  2. # Copyright (C) 2005-2008 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:=OpenSC
  9. PKG_VERSION:=0.13.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://github.com/OpenSC/OpenSC/archive/
  13. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  14. PKG_MD5SUM:=92ed0041be8e5c53aa48c371b090b6cd
  15. PKG_FIXUP:=autoreconf
  16. PKG_INSTALL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/OpenSC
  19. SECTION:=libs
  20. CATEGORY:=Libraries
  21. TITLE:=tools and libraries for smart cards
  22. URL:=https://github.com/OpenSC/OpenSC/wiki
  23. DEPENDS+= +libpcsclite +libopenssl +pcscd
  24. endef
  25. define Package/OpenSC/description
  26. OpenSC provides a set of libraries and utilities to work with smart cards.
  27. Its main focus is on cards that support cryptographic operations, and facilitate
  28. their use in security applications such as authentication, mail encryption and
  29. digital signatures. OpenSC implements the PKCS11 API so applications supporting
  30. this API (such as Mozilla Firefox and Thunderbird) can use it. On the card OpenSC
  31. implements the PKCS15 standard and aims to be compatible with every software/card
  32. that does so, too.
  33. endef
  34. CONFIGURE_ARGS += \
  35. --disable-assert \
  36. --enable-pcsc \
  37. --enable-sm \
  38. --disable-zlib \
  39. --with-pcsc-provider=libpcsclite.so.1
  40. define Build/InstallDev
  41. $(INSTALL_DIR) $(1)/usr/lib
  42. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopensc.{a,so*} $(1)/usr/lib/
  43. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsmm-local.{a,so*} $(1)/usr/lib/
  44. endef
  45. define Package/OpenSC/install
  46. $(INSTALL_DIR) $(1)/usr/bin
  47. $(CP) $(PKG_INSTALL_DIR)/usr/bin/opensc-tool $(1)/usr/bin
  48. $(CP) $(PKG_INSTALL_DIR)/usr/bin/pkcs15-tool $(1)/usr/bin
  49. $(CP) $(PKG_INSTALL_DIR)/usr/bin/pkcs15-init $(1)/usr/bin
  50. $(INSTALL_DIR) $(1)/usr/lib
  51. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopensc.so.* $(1)/usr/lib/
  52. $(CP) $(PKG_INSTALL_DIR)/usr/lib/opensc-pkcs11.so $(1)/usr/lib/
  53. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsmm-local.so.* $(1)/usr/lib/
  54. ifeq ($(CONFIG_PACKAGE_p11-kit),)
  55. $(INSTALL_DIR) $(1)/etc/p11-kit/modules/
  56. $(CP) \
  57. ./files/opensc.module \
  58. $(1)/etc/p11-kit/modules/
  59. endif
  60. endef
  61. $(eval $(call BuildPackage,OpenSC))