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