2 # Copyright (C) 2011-2014 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
13 PKG_MD5SUM:=70489f6dbe0b7fd72aab010c25016fa047723f67ea50ce9ae73bc8d38181b673
15 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
16 PKG_LICENSE:=LGPL-2.1+
17 PKG_LICENSE_FILES:=COPYING
19 PKG_SOURCE_URL:=https://github.com/OpenSC/libp11/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
20 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
25 include $(INCLUDE_DIR)/package.mk
30 TITLE:=PKCS#11 wrapper library
31 URL:=https://www.opensc-project.org/opensc/wiki/libp11
33 CONFLICTS:=engine_pkcs11
36 define Package/libp11/description
37 Libp11 is a library implementing a small layer on top of PKCS#11 API
38 to make using PKCS#11 implementations easier.
41 CONFIGURE_ARGS += --with-enginesdir=/usr/lib/engines
43 define Build/InstallDev
44 $(INSTALL_DIR) $(1)/usr/include/
45 $(CP) $(PKG_INSTALL_DIR)/usr/include/libp11.h $(1)/usr/include/
46 $(INSTALL_DIR) $(1)/usr/lib
47 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libp11.{a,so} $(1)/usr/lib/
48 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libp11.so* $(1)/usr/lib/
49 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
50 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libp11.pc $(1)/usr/lib/pkgconfig/libp11.pc
53 define Package/libp11/install
54 $(INSTALL_DIR) $(1)/usr/lib/
55 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libp11.so.* $(1)/usr/lib/
56 $(INSTALL_DIR) $(1)/usr/lib/engines
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/engines/*.so* $(1)/usr/lib/engines
58 $(LN) pkcs11.so $(1)/usr/lib/engines/libpkcs11.so
61 $(eval $(call BuildPackage,libp11))