From b16bb637a511f3e811e9735caa2da83d8c3b78a5 Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Mon, 7 Oct 2019 16:26:09 +0200 Subject: [PATCH] Install pkcs11 module for opencryptoki to be usable from p11-kit --- opencryptoki.module | 8 ++++++++ opencryptoki.spec | 6 ++++++ 2 files changed, 14 insertions(+) create mode 100644 opencryptoki.module diff --git a/opencryptoki.module b/opencryptoki.module new file mode 100644 index 0000000..4720c04 --- /dev/null +++ b/opencryptoki.module @@ -0,0 +1,8 @@ +# This file describes how to load the opensc module +# See: http://p11-glue.freedesktop.org/doc/p11-kit/config.html + +# This is a relative path, which means it will be loaded from +# the p11-kit default path which is usually $(libdir)/pkcs11. +# Doing it this way allows for packagers to package opensc for +# 32-bit and 64-bit and make them parallel installable +module: libopencryptoki.so diff --git a/opencryptoki.spec b/opencryptoki.spec index e7f89e4..7fb7939 100644 --- a/opencryptoki.spec +++ b/opencryptoki.spec @@ -5,6 +5,7 @@ Release: 1%{?dist} License: CPL URL: https://github.com/opencryptoki/opencryptoki Source0: https://github.com/opencryptoki/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz +Source1: opencryptoki.module # https://bugzilla.redhat.com/show_bug.cgi?id=732756 Patch0: opencryptoki-3.11.0-group.patch @@ -192,6 +193,7 @@ make %{?_smp_mflags} CHGRP=/bin/true %install make install DESTDIR=$RPM_BUILD_ROOT CHGRP=/bin/true +install -Dpm 644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/p11-kit/modules/opencryptoki.module # Remove unwanted cruft rm -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/*.la @@ -250,6 +252,10 @@ fi %{_libdir}/pkcs11/libopencryptoki.so %{_libdir}/pkcs11/PKCS11_API.so %{_libdir}/pkcs11/stdll +# Co-owned with p11-kit +%dir %{_datadir}/p11-kit/ +%dir %{_datadir}/p11-kit/modules/ +%{_datadir}/p11-kit/modules/opencryptoki.module %files devel %{_includedir}/%{name}/