Browse Source

libp11: package PKCS#11 OpenSSL engine

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
lilik-openwrt-22.03
Daniel Golle 8 years ago
parent
commit
6871e6b379
2 changed files with 77 additions and 2 deletions
  1. +8
    -2
      libs/libp11/Makefile
  2. +69
    -0
      libs/libp11/patches/001-fix-install.patch

+ 8
- 2
libs/libp11/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=libp11
PKG_VERSION:=0.4.1
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_MD5SUM:=70489f6dbe0b7fd72aab010c25016fa047723f67ea50ce9ae73bc8d38181b673
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
@ -30,6 +30,7 @@ define Package/libp11
TITLE:=PKCS#11 wrapper library
URL:=https://www.opensc-project.org/opensc/wiki/libp11
DEPENDS:=+libopenssl
CONFLICTS:=engine_pkcs11
endef
define Package/libp11/description
@ -37,6 +38,8 @@ define Package/libp11/description
to make using PKCS#11 implementations easier.
endef
CONFIGURE_ARGS += --with-enginesdir=/usr/lib/engines
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/include/libp11.h $(1)/usr/include/
@ -48,8 +51,11 @@ define Build/InstallDev
endef
define Package/libp11/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libp11.so.* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/engines
$(CP) $(PKG_INSTALL_DIR)/usr/lib/engines/*.so* $(1)/usr/lib/engines
$(LN) pkcs11.so $(1)/usr/lib/engines/libpkcs11.so
endef
$(eval $(call BuildPackage,libp11))

+ 69
- 0
libs/libp11/patches/001-fix-install.patch View File

@ -0,0 +1,69 @@
Index: libp11-0.4.1/src/Makefile.am
===================================================================
--- libp11-0.4.1.orig/src/Makefile.am
+++ libp11-0.4.1/src/Makefile.am
@@ -36,12 +36,6 @@ pkcs11_la_LIBADD = $(libp11_la_OBJECTS)
pkcs11_la_LDFLAGS = $(AM_LDFLAGS) -module -shared -shrext $(SHARED_EXT) \
-avoid-version -export-symbols "$(srcdir)/pkcs11.exports"
-# OpenSSL older than 1.1.0 expected libpkcs11.so instead of pkcs11.so
-check-local: $(LTLIBRARIES)
- cd .libs && $(LN_S) -f pkcs11$(SHARED_EXT) libpkcs11$(SHARED_EXT)
-install-exec-hook:
- cd '$(DESTDIR)$(enginesdir)' && $(LN_S) -f pkcs11$(SHARED_EXT) libpkcs11$(SHARED_EXT)
-
if WIN32
# def file required for MS users to build library
mylibdir=$(libdir)
Index: libp11-0.4.1/src/Makefile.in
===================================================================
--- libp11-0.4.1.orig/src/Makefile.in
+++ libp11-0.4.1/src/Makefile.in
@@ -839,7 +839,7 @@ distdir: $(DISTFILES)
fi; \
done
check-am: all-am
- $(MAKE) $(AM_MAKEFLAGS) check-local
+ $(MAKE) $(AM_MAKEFLAGS)
check: check-am
all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) config.h
installdirs:
@@ -910,7 +910,7 @@ install-dvi-am:
install-exec-am: install-libLTLIBRARIES
@$(NORMAL_INSTALL)
- $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+ $(MAKE) $(AM_MAKEFLAGS)
install-html: install-html-am
install-html-am:
@@ -955,7 +955,7 @@ uninstall-am: uninstall-enginesLTLIBRARI
.MAKE: all check-am install-am install-exec-am install-strip
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am check-local clean \
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
clean-enginesLTLIBRARIES clean-generic clean-libLTLIBRARIES \
clean-libtool cscopelist-am ctags ctags-am distclean \
distclean-compile distclean-generic distclean-hdr \
@@ -963,7 +963,7 @@ uninstall-am: uninstall-enginesLTLIBRARI
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am \
install-enginesLTLIBRARIES install-exec install-exec-am \
- install-exec-hook install-html install-html-am \
+ install-html install-html-am \
install-includeHEADERS install-info install-info-am \
install-libLTLIBRARIES install-man install-mylibDATA \
install-pdf install-pdf-am install-pkgconfigDATA install-ps \
@@ -979,11 +979,6 @@ uninstall-am: uninstall-enginesLTLIBRARI
$(srcdir)/config.h.in $(srcdir)/config.h.in~
-# OpenSSL older than 1.1.0 expected libpkcs11.so instead of pkcs11.so
-check-local: $(LTLIBRARIES)
- cd .libs && $(LN_S) -f pkcs11$(SHARED_EXT) libpkcs11$(SHARED_EXT)
-install-exec-hook:
- cd '$(DESTDIR)$(enginesdir)' && $(LN_S) -f pkcs11$(SHARED_EXT) libpkcs11$(SHARED_EXT)
@WIN32_TRUE@.libs/@WIN_LIBPREFIX@p11-@LIBP11_LT_OLDEST@.dll.def: libp11.la
.rc.lo:

Loading…
Cancel
Save