Makefile 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #
  2. # Copyright (C) 2011-2014 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:=libp11
  9. PKG_VERSION:=0.4.10
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_URL:=https://github.com/OpenSC/libp11/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_HASH:=639ea43c3341e267214b712e1e5e12397fd2d350899e673dd1220f3c6b8e3db4
  14. PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
  15. PKG_LICENSE:=LGPL-2.1+
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_FIXUP:=libtool
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/libp11
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. TITLE:=PKCS#11 wrapper library
  25. URL:=https://www.opensc-project.org/opensc/wiki/libp11
  26. DEPENDS:=+libopenssl +@OPENSSL_ENGINE
  27. CONFLICTS:=engine_pkcs11
  28. endef
  29. define Package/libp11/description
  30. Libp11 is a library implementing a small layer on top of PKCS#11 API
  31. to make using PKCS#11 implementations easier.
  32. endef
  33. CONFIGURE_ARGS += --with-enginesdir=/usr/lib/engines
  34. define Build/InstallDev
  35. $(INSTALL_DIR) $(1)/usr/include/
  36. $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
  37. $(INSTALL_DIR) $(1)/usr/lib
  38. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libp11.{a,so} $(1)/usr/lib/
  39. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libp11.so* $(1)/usr/lib/
  40. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
  41. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libp11.pc $(1)/usr/lib/pkgconfig/libp11.pc
  42. endef
  43. define Package/libp11/install
  44. $(INSTALL_DIR) $(1)/usr/lib/
  45. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libp11.so.* $(1)/usr/lib/
  46. $(INSTALL_DIR) $(1)/usr/lib/engines
  47. $(CP) $(PKG_INSTALL_DIR)/usr/lib/engines/*.so* $(1)/usr/lib/engines
  48. $(LN) pkcs11.so $(1)/usr/lib/engines/libpkcs11.so
  49. endef
  50. $(eval $(call BuildPackage,libp11))