p11-kit/p11-kit.spec

156 lines
4.7 KiB
RPMSpec
Raw Normal View History

# This spec file has been automatically updated
Version: 0.25.0
Release: %{?autorelease}%{!?autorelease:1%{?dist}}
2011-08-17 15:48:31 +00:00
Name: p11-kit
Summary: Library for loading and sharing PKCS#11 modules
License: BSD
URL: http://p11-glue.freedesktop.org/p11-kit.html
2020-01-22 08:57:49 +00:00
Source0: https://github.com/p11-glue/p11-kit/releases/download/%{version}/p11-kit-%{version}.tar.xz
2020-01-22 09:02:44 +00:00
Source1: https://github.com/p11-glue/p11-kit/releases/download/%{version}/p11-kit-%{version}.tar.xz.sig
Source2: https://p11-glue.github.io/p11-glue/p11-kit/p11-kit-release-keyring.gpg
2020-01-22 09:02:44 +00:00
Source3: trust-extract-compat
Source4: p11-kit-client.service
BuildRequires: gcc
BuildRequires: libtasn1-devel >= 2.3
BuildRequires: libffi-devel
BuildRequires: gettext
2013-06-11 09:48:34 +00:00
BuildRequires: gtk-doc
BuildRequires: meson
BuildRequires: systemd-devel
2020-01-22 08:57:49 +00:00
BuildRequires: bash-completion
# Work around for https://bugzilla.redhat.com/show_bug.cgi?id=1497147
# Remove this once it is fixed
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(systemd)
2020-01-22 09:02:44 +00:00
BuildRequires: gnupg2
BuildRequires: /usr/bin/xsltproc
2011-08-17 15:48:31 +00:00
%description
p11-kit provides a way to load and enumerate PKCS#11 modules, as well
as a standard configuration setup for installing PKCS#11 modules in
such a way that they're discoverable.
2013-06-11 09:48:34 +00:00
%package devel
2011-08-17 15:48:31 +00:00
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
2011-08-17 15:48:31 +00:00
2013-06-11 09:48:34 +00:00
%description devel
2011-08-17 15:48:31 +00:00
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
2013-06-11 09:48:34 +00:00
%package trust
Summary: System trust module from %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires(post): %{_sbindir}/alternatives
Requires(postun): %{_sbindir}/alternatives
Conflicts: nss < 3.14.3-9
2013-06-11 09:48:34 +00:00
%description trust
The %{name}-trust package contains a system trust PKCS#11 module which
contains certificate anchors and black lists.
2017-03-02 15:33:10 +00:00
%package server
Summary: Server and client commands for %{name}
2017-02-24 09:12:16 +00:00
Requires: %{name}%{?_isa} = %{version}-%{release}
2017-03-02 15:33:10 +00:00
%description server
The %{name}-server package contains command line tools that enable to
export PKCS#11 modules through a Unix domain socket. Note that this
feature is still experimental.
2017-02-24 09:12:16 +00:00
# solution taken from icedtea-web.spec
%define multilib_arches ppc64 sparc64 x86_64 ppc64le
%ifarch %{multilib_arches}
%define alt_ckbi libnssckbi.so.%{_arch}
%else
%define alt_ckbi libnssckbi.so
%endif
2011-08-17 15:48:31 +00:00
%prep
2020-01-22 09:02:44 +00:00
gpgv2 --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0}
%autosetup -p1
2011-08-17 15:48:31 +00:00
%build
# These paths are the source paths that come from the plan here:
# https://fedoraproject.org/wiki/Features/SharedSystemCertificates:SubTasks
%meson -Dgtk_doc=true -Dman=true -Dtrust_paths=%{_sysconfdir}/pki/ca-trust/source:%{_datadir}/pki/ca-trust-source
%meson_build
2011-08-17 15:48:31 +00:00
%install
%meson_install
2011-08-17 15:48:31 +00:00
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pkcs11/modules
2020-01-22 09:02:44 +00:00
install -p -m 755 %{SOURCE3} $RPM_BUILD_ROOT%{_libexecdir}/p11-kit/
2011-08-21 06:31:43 +00:00
# Install the example conf with %%doc instead
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
mv $RPM_BUILD_ROOT%{_sysconfdir}/pkcs11/pkcs11.conf.example $RPM_BUILD_ROOT%{_docdir}/%{name}/pkcs11.conf.example
mkdir -p $RPM_BUILD_ROOT%{_userunitdir}
2020-01-22 09:02:44 +00:00
install -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_userunitdir}
%find_lang %{name}
2011-08-17 15:48:31 +00:00
2012-03-26 22:37:12 +00:00
%check
%meson_test
2012-03-26 22:37:12 +00:00
%post trust
%{_sbindir}/alternatives --install %{_libdir}/libnssckbi.so %{alt_ckbi} %{_libdir}/pkcs11/p11-kit-trust.so 30
%postun trust
if [ $1 -eq 0 ] ; then
2013-06-11 09:48:34 +00:00
# package removal
%{_sbindir}/alternatives --remove %{alt_ckbi} %{_libdir}/pkcs11/p11-kit-trust.so
fi
2011-08-17 15:48:31 +00:00
%files -f %{name}.lang
2014-07-30 14:47:27 +00:00
%{!?_licensedir:%global license %%doc}
%license COPYING
%doc AUTHORS NEWS README
%{_docdir}/%{name}/pkcs11.conf.example
2011-08-17 15:48:31 +00:00
%dir %{_sysconfdir}/pkcs11
%dir %{_sysconfdir}/pkcs11/modules
%dir %{_datadir}/p11-kit
%dir %{_datadir}/p11-kit/modules
%dir %{_libexecdir}/p11-kit
%{_bindir}/p11-kit
2011-08-17 15:48:31 +00:00
%{_libdir}/libp11-kit.so.*
%{_libdir}/p11-kit-proxy.so
%{_libexecdir}/p11-kit/p11-kit-remote
%{_mandir}/man1/trust.1.gz
%{_mandir}/man8/p11-kit.8.gz
2013-06-05 12:33:16 +00:00
%{_mandir}/man5/pkcs11.conf.5.gz
2020-01-22 08:57:49 +00:00
%{_datadir}/bash-completion/completions/p11-kit
2011-08-17 15:48:31 +00:00
%files devel
%{_includedir}/p11-kit-1/
%{_libdir}/libp11-kit.so
%{_libdir}/pkgconfig/p11-kit-1.pc
%doc %{_datadir}/gtk-doc/
%files trust
%{_bindir}/trust
%dir %{_libdir}/pkcs11
%ghost %{_libdir}/libnssckbi.so
%{_libdir}/pkcs11/p11-kit-trust.so
%{_datadir}/p11-kit/modules/p11-kit-trust.module
2016-12-20 11:58:27 +00:00
%{_libexecdir}/p11-kit/trust-extract-compat
2020-01-22 08:57:49 +00:00
%{_datadir}/bash-completion/completions/trust
2017-02-24 09:12:16 +00:00
2017-03-02 15:33:10 +00:00
%files server
2017-02-24 09:12:16 +00:00
%{_libdir}/pkcs11/p11-kit-client.so
%{_userunitdir}/p11-kit-client.service
2017-02-24 09:12:16 +00:00
%{_libexecdir}/p11-kit/p11-kit-server
2018-08-10 17:00:16 +00:00
%{_userunitdir}/p11-kit-server.service
%{_userunitdir}/p11-kit-server.socket
2011-08-17 15:48:31 +00:00
%changelog
%autochangelog