Add BuildRequires to libffi required by v0.19.1
[platform/upstream/p11-kit.git] / packaging / p11-kit.spec
1 Name:           p11-kit
2 Version:        0.19.1
3 Release:        0
4 License:        BSD-3-Clause
5 Summary:        Library to work with PKCS#11 modules
6 Url:            http://p11-glue.freedesktop.org/p11-kit.html
7 Group:          Security/Crypto Libraries
8 Source0:        http://p11-glue.freedesktop.org/releases/%{name}-%{version}.tar.gz
9 Source99:       baselibs.conf
10 Source1001:     p11-kit.manifest
11 BuildRequires:  pkg-config
12 BuildRequires:  pkgconfig(libtasn1)
13 BuildRequires:  pkgconfig(libffi)
14
15 %description
16 p11-kit provides a way to load and enumerate PKCS#11 modules, as well
17 as a standard configuration setup for installing PKCS#11 modules in
18 such a way that they're discoverable.
19
20 %package -n libp11-kit
21 Summary:        Library to work with PKCS#11 modules
22
23 %description -n libp11-kit
24 p11-kit provides a way to load and enumerate PKCS#11 modules, as well
25 as a standard configuration setup for installing PKCS#11 modules in
26 such a way that they're discoverable.
27
28 %package tools
29 Summary:        Library to work with PKCS#11 modules -- Tools
30
31 %description tools
32 p11-kit provides a way to load and enumerate PKCS#11 modules, as well
33 as a standard configuration setup for installing PKCS#11 modules in
34 such a way that they're discoverable.
35
36 %package devel
37 Summary:        Library to work with PKCS#11 modules -- Development Files
38 Requires:       libp11-kit = %{version}
39
40 %description devel
41 p11-kit provides a way to load and enumerate PKCS#11 modules, as well
42 as a standard configuration setup for installing PKCS#11 modules in
43 such a way that they're discoverable.
44
45 %prep
46 %setup -q
47 cp %{SOURCE1001} .
48
49 %build
50 %configure --with-trust-paths=/etc/ssl/
51 make %{?_smp_mflags}
52
53 %install
54 %make_install
55 # Create pkcs11 config directory
56 test ! -e %{buildroot}%{_sysconfdir}/pkcs11/modules
57 install -d %{buildroot}%{_sysconfdir}/pkcs11/modules
58 # Remove sample config away to doc folder. Having the sample there would conflict
59 # with future versions of the library on file level. As replacement, we package
60 # the file as documentation file.
61 rm %{buildroot}%{_sysconfdir}/pkcs11/pkcs11.conf.example
62
63 %post -n libp11-kit -p /sbin/ldconfig
64
65 %postun -n libp11-kit -p /sbin/ldconfig
66
67 %files -n libp11-kit
68 %manifest %{name}.manifest
69 %defattr(-,root,root)
70 # Package the example conf file as documentation. Like this we're sure that we will
71 # not introduce conflicts with this version of the library and future ones.
72 %doc p11-kit/pkcs11.conf.example
73 %license COPYING
74 %dir %{_sysconfdir}/pkcs11
75 %dir %{_sysconfdir}/pkcs11/modules/
76 %{_libdir}/libp11-kit.so.*
77 %{_libdir}/p11-kit-proxy.so
78 %dir %{_libdir}/pkcs11
79 %dir %{_libdir}/p11-kit
80 %{_libdir}/pkcs11/p11-kit-trust.so
81 %{_libdir}/p11-kit/p11-kit-extract-trust
82 %dir %_datadir/p11-kit
83 %dir %_datadir/p11-kit/modules
84 %_datadir/p11-kit/modules/p11-kit-trust.module
85
86 %files tools
87 %manifest %{name}.manifest
88 %defattr(-,root,root)
89 %{_bindir}/p11-kit
90
91 %files devel
92 %manifest %{name}.manifest
93 %defattr(-,root,root)
94 %{_includedir}/p11-kit-1/
95 %{_libdir}/libp11-kit.so
96 %{_libdir}/pkgconfig/p11-kit-1.pc
97 %doc %dir %{_datadir}/gtk-doc
98 %doc %dir %{_datadir}/gtk-doc/html
99 %doc %{_datadir}/gtk-doc/html/p11-kit/
100
101 %changelog