瀏覽代碼

add OpenSC's libp11 library

libp11 is a PKCS#11 wrapper library

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Daniel Golle 10 年之前
父節點
當前提交
34f6c215ed
共有 1 個文件被更改,包括 56 次插入0 次删除
  1. 56
    0
      libs/libp11/Makefile

+ 56
- 0
libs/libp11/Makefile 查看文件

@@ -0,0 +1,56 @@
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
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=libp11
11
+PKG_VERSION:=20131021
12
+PKG_RELEASE:=1
13
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
14
+
15
+PKG_RELEASE=$(PKG_SOURCE_VERSION)
16
+
17
+PKG_SOURCE_PROTO:=git
18
+PKG_SOURCE_URL:=https://github.com/OpenSC/libp11.git
19
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
20
+PKG_SOURCE_VERSION:=ab6306ee7ede9b2fb9c1fa2c3694c6e7ff044a9e
21
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
22
+PKG_FIXUP:=libtool
23
+
24
+PKG_INSTALL:=1
25
+
26
+include $(INCLUDE_DIR)/package.mk
27
+
28
+define Package/libp11
29
+  SECTION:=libs
30
+  CATEGORY:=Libraries
31
+  TITLE:=PKCS#11 wrapper library
32
+  URL:=https://www.opensc-project.org/opensc/wiki/libp11
33
+  DEPENDS:=+libopenssl
34
+endef
35
+
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.
39
+endef
40
+
41
+define Build/InstallDev
42
+	$(INSTALL_DIR) $(1)/usr/include/
43
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/libp11.h $(1)/usr/include/
44
+	$(INSTALL_DIR) $(1)/usr/lib
45
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libp11.{a,so} $(1)/usr/lib/
46
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libp11.so* $(1)/usr/lib/
47
+	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
48
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libp11.pc $(1)/usr/lib/pkgconfig/libp11.pc
49
+endef
50
+
51
+define Package/libp11/install
52
+	$(INSTALL_DIR) $(1)/usr/lib
53
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libp11.so.* $(1)/usr/lib/
54
+endef
55
+
56
+$(eval $(call BuildPackage,libp11))