]>
Commit | Line | Data |
---|---|---|
c157090e JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # do not build and package API docs | |
c157090e JB |
4 | # |
5 | Summary: Library and proxy module for properly loading and sharing PKCS#11 modules | |
6 | Summary(pl.UTF-8): Biblioteka i moduł proxy do właściwego wczytywania i współdzielenia modułów PKCS#11 | |
7 | Name: p11-kit | |
ece50acb JB |
8 | Version: 0.24.1 |
9 | Release: 1 | |
c157090e JB |
10 | License: BSD |
11 | Group: Libraries | |
179fa236 | 12 | #Source0Download: https://github.com/p11-glue/p11-kit/releases |
b10d986d | 13 | Source0: https://github.com/p11-glue/p11-kit/releases/download/%{version}/%{name}-%{version}.tar.xz |
ece50acb | 14 | # Source0-md5: 67b2539bdca6b4bedaeecc12864d2796 |
428f7f55 | 15 | URL: https://p11-glue.github.io/p11-glue/p11-kit.html |
b10d986d | 16 | BuildRequires: gettext-tools >= 0.19.8 |
d3b17959 | 17 | %{?with_apidocs:BuildRequires: gtk-doc >= 1.15} |
f9bbd6bb | 18 | BuildRequires: libffi-devel >= 3.0.0 |
f1dada4a | 19 | BuildRequires: libtasn1-devel >= 2.14 |
ece50acb | 20 | BuildRequires: libxslt-progs |
1558d491 | 21 | BuildRequires: pkgconfig >= 1:0.29 |
f9bbd6bb | 22 | BuildRequires: pkgconfig(libffi) >= 3.0.0 |
b297801f | 23 | BuildRequires: rpm-build >= 4.6 |
119a3699 | 24 | BuildRequires: rpmbuild(macros) >= 2.011 |
63053cc8 | 25 | BuildRequires: systemd-devel >= 1:209 |
b10d986d JB |
26 | BuildRequires: tar >= 1:1.22 |
27 | BuildRequires: xz | |
119a3699 | 28 | Requires(post,preun): systemd-units >= 1:250.1 |
dc5619c4 | 29 | Requires: filesystem >= 4.0-28 |
f1dada4a | 30 | Requires: libtasn1 >= 2.14 |
119a3699 | 31 | Requires: systemd-units >= 1:250.1 |
b2ed7d33 | 32 | Suggests: ca-certificates |
c157090e JB |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
34 | ||
35 | %description | |
36 | P11-KIT provides a way to load and enumerate PKCS#11 modules. It also | |
37 | provides a standard configuration setup for installing PKCS#11 modules | |
38 | in such a way that they-re discoverable. | |
39 | ||
40 | %description -l pl.UTF-8 | |
41 | P11-KIT zapewnia możliwość ładowania i numeracji modułów PKCS#11. | |
42 | Zapewnia też ustandaryzowaną konfigurację do instalowania modułów | |
43 | PKCS#11 w taki sposób, żeby były możliwe do wykrycia. | |
44 | ||
45 | %package devel | |
46 | Summary: Header files for P11-KIT library | |
47 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki P11-KIT | |
48 | Group: Development/Libraries | |
49 | Requires: %{name} = %{version}-%{release} | |
4fea1c3e | 50 | Obsoletes: p11-kit-static |
c157090e JB |
51 | |
52 | %description devel | |
53 | Header files for P11-KIT library. | |
54 | ||
55 | %description devel -l pl.UTF-8 | |
56 | Pliki nagłówkowe biblioteki P11-KIT. | |
57 | ||
c157090e JB |
58 | %package apidocs |
59 | Summary: P11-KIT API documentation | |
60 | Summary(pl.UTF-8): Dokumentacja API biblioteki P11-KIT | |
61 | Group: Documentation | |
62 | Requires: gtk-doc-common | |
25cbe104 | 63 | BuildArch: noarch |
c157090e JB |
64 | |
65 | %description apidocs | |
66 | API and internal documentation for P11-KIT library. | |
67 | ||
68 | %description apidocs -l pl.UTF-8 | |
69 | Dokumentacja API biblioteki P11-KIT. | |
70 | ||
b297801f JB |
71 | %package -n bash-completion-p11-kit |
72 | Summary: Bash completion for p11-kit commands | |
73 | Summary(pl.UTF-8): Bashowe uzupełnianie parametrów poleceń p11-kit | |
74 | Group: Applications/Shells | |
75 | Requires: %{name} = %{version}-%{release} | |
76 | Requires: bash-completion >= 2.0 | |
77 | BuildArch: noarch | |
78 | ||
79 | %description -n bash-completion-p11-kit | |
80 | Bash completion for p11-kit commands (p11-kit and trust). | |
81 | ||
82 | %description -n bash-completion-p11-kit -l pl.UTF-8 | |
83 | Bashowe uzupełnianie parametrów poleceń p11-kit (p11-kit i trust). | |
84 | ||
c157090e JB |
85 | %prep |
86 | %setup -q | |
87 | ||
88 | %build | |
89 | %configure \ | |
b297801f | 90 | bashcompdir=%{bash_compdir} \ |
c157090e JB |
91 | %{!?with_apidocs:--disable-gtk-doc} \ |
92 | --disable-silent-rules \ | |
f1dada4a | 93 | --with-html-dir=%{_gtkdocdir} \ |
b95fe767 | 94 | --with-trust-paths=/etc/certs/ca-certificates.crt |
c157090e JB |
95 | %{__make} |
96 | ||
97 | %install | |
98 | rm -rf $RPM_BUILD_ROOT | |
99 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/pkcs11/modules | |
100 | ||
101 | %{__make} install \ | |
102 | DESTDIR=$RPM_BUILD_ROOT | |
103 | ||
104 | # obsoleted by pkg-config | |
105 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libp11-kit.la | |
f1dada4a JB |
106 | # dlopened module |
107 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/pkcs11/*.la | |
108 | ||
109 | %{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/pkcs11/pkcs11.conf{.example,} | |
c157090e JB |
110 | |
111 | %clean | |
112 | rm -rf $RPM_BUILD_ROOT | |
113 | ||
119a3699 JR |
114 | %post |
115 | /sbin/ldconfig | |
116 | %systemd_user_post p11-kit-server.service p11-kit-server.socket | |
117 | ||
118 | %preun | |
119 | %systemd_user_preun p11-kit-server.service p11-kit-server.socket | |
120 | ||
c157090e JB |
121 | %postun -p /sbin/ldconfig |
122 | ||
123 | %files | |
124 | %defattr(644,root,root,755) | |
125 | %doc AUTHORS COPYING ChangeLog NEWS README | |
126 | %attr(755,root,root) %{_bindir}/p11-kit | |
f9bbd6bb | 127 | %attr(755,root,root) %{_bindir}/trust |
c157090e JB |
128 | %attr(755,root,root) %{_libdir}/libp11-kit.so.*.*.* |
129 | %attr(755,root,root) %ghost %{_libdir}/libp11-kit.so.0 | |
130 | %attr(755,root,root) %{_libdir}/p11-kit-proxy.so | |
131 | %dir %{_sysconfdir}/pkcs11 | |
132 | %dir %{_sysconfdir}/pkcs11/modules | |
f1dada4a | 133 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pkcs11/pkcs11.conf |
179fa236 | 134 | %attr(755,root,root) %{_libdir}/pkcs11/p11-kit-client.so |
f1dada4a | 135 | %attr(755,root,root) %{_libdir}/pkcs11/p11-kit-trust.so |
fcee0593 JB |
136 | %dir %{_libexecdir}/p11-kit |
137 | %attr(755,root,root) %{_libexecdir}/p11-kit/p11-kit-remote | |
138 | %attr(755,root,root) %{_libexecdir}/p11-kit/p11-kit-server | |
139 | %attr(755,root,root) %{_libexecdir}/p11-kit/trust-extract-compat | |
f1dada4a | 140 | %dir %{_datadir}/p11-kit |
f1dada4a JB |
141 | %dir %{_datadir}/p11-kit/modules |
142 | %{_datadir}/p11-kit/modules/p11-kit-trust.module | |
63053cc8 JB |
143 | %{systemduserunitdir}/p11-kit-server.service |
144 | %{systemduserunitdir}/p11-kit-server.socket | |
c157090e JB |
145 | |
146 | %files devel | |
147 | %defattr(644,root,root,755) | |
148 | %attr(755,root,root) %{_libdir}/libp11-kit.so | |
149 | %{_includedir}/p11-kit-1 | |
150 | %{_pkgconfigdir}/p11-kit-1.pc | |
151 | ||
c157090e JB |
152 | %if %{with apidocs} |
153 | %files apidocs | |
154 | %defattr(644,root,root,755) | |
155 | %{_gtkdocdir}/p11-kit | |
156 | %endif | |
b297801f JB |
157 | |
158 | %files -n bash-completion-p11-kit | |
159 | %defattr(644,root,root,755) | |
160 | %{bash_compdir}/p11-kit | |
161 | %{bash_compdir}/trust |