]>
Commit | Line | Data |
---|---|---|
e1b64efc ER |
1 | # |
2 | # Conditional build: | |
c1d612a8 JB |
3 | %bcond_without static_libs # static library |
4 | %bcond_without tests # unit tests | |
e1b64efc | 5 | |
cc549f10 | 6 | Summary: Tool for interacting with the PIV applet on a YubiKey NEO |
c1d612a8 | 7 | Summary(pl.UTF-8): Narzędzie do komunikacji z apletem PIV na YubiKey NEO |
cc549f10 | 8 | Name: yubico-piv-tool |
ca44401a JR |
9 | Version: 2.2.1 |
10 | Release: 1 | |
c1d612a8 | 11 | License: BSD |
cc549f10 | 12 | Group: Applications |
cc549f10 | 13 | Source0: https://developers.yubico.com/yubico-piv-tool/Releases/%{name}-%{version}.tar.gz |
ca44401a JR |
14 | # Source0-md5: fdd64e16da13c464cfb0c7999b407cec |
15 | Patch0: openssl3.patch | |
16 | Patch1: install.patch | |
e1b64efc | 17 | URL: https://developers.yubico.com/yubico-piv-tool/ |
c1d612a8 | 18 | %{?with_tests:BuildRequires: check-devel >= 0.9.6} |
ca44401a | 19 | BuildRequires: gengetopt |
c1d612a8 | 20 | BuildRequires: help2man |
cc549f10 AM |
21 | BuildRequires: openssl-devel |
22 | BuildRequires: pcsc-lite-devel | |
c1d612a8 JB |
23 | BuildRequires: pkgconfig |
24 | Requires: %{name}-libs = %{version}-%{release} | |
cc549f10 | 25 | Requires: pcsc-driver-ccid |
e1b64efc | 26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
cc549f10 AM |
27 | |
28 | %description | |
29 | The Yubico PIV tool is used for interacting with the Privilege and | |
30 | Identification Card (PIV) applet on a YubiKey NEO. | |
31 | ||
32 | With it you may generate keys on the device, importing keys and | |
c1d612a8 JB |
33 | certificates, and create certificate requests, and other operations. |
34 | ||
35 | %description -l pl.UTF-8 | |
36 | Narzędzie Yubico PIV Tool służy do komunikacji z apletem PIV | |
37 | (Privilege and Identification card) na urządzeniach YubiKey NEO. | |
38 | ||
39 | Przy jego pomocy można generować klucze na urządzeniu, importować | |
40 | klucze i certyfikaty, tworzyć żądania certyfikatów oraz wykonywać inne | |
41 | operacje. | |
42 | ||
43 | %package libs | |
44 | Summary: Yubico PIV shared libraries | |
45 | Summary(pl.UTF-8): Biblioteki współdzielone Yubico PIV | |
46 | Group: Libraries | |
47 | ||
48 | %description libs | |
49 | The Yubico PIV tool is used for interacting with the Privilege and | |
50 | Identification Card (PIV) applet on a YubiKey NEO. This package | |
51 | contains shared libraries for the tool. | |
52 | ||
53 | %description libs -l pl.UTF-8 | |
54 | Narzędzie Yubico PIV Tool służy do komunikacji z apletem PIV | |
55 | (Privilege and Identification card) na urządzeniach YubiKey NEO. Ten | |
56 | pakiet zawiera biblioteki współdzielone wykorzystywane przez | |
57 | narzędzie. | |
cc549f10 AM |
58 | |
59 | %package devel | |
c1d612a8 JB |
60 | Summary: Header files for Yubico PIV libraries |
61 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek Yubico PIV | |
62 | Group: Development/Libraries | |
63 | Requires: %{name}-libs = %{version}-%{release} | |
64 | Requires: openssl-devel | |
cc549f10 AM |
65 | |
66 | %description devel | |
67 | The Yubico PIV tool is used for interacting with the Privilege and | |
68 | Identification Card (PIV) applet on a YubiKey NEO. This package | |
69 | includes development files. | |
70 | ||
c1d612a8 JB |
71 | %description devel -l pl.UTF-8 |
72 | Narzędzie Yubico PIV Tool służy do komunikacji z apletem PIV | |
73 | (Privilege and Identification card) na urządzeniach YubiKey NEO. Ten | |
74 | pakiet zawiera pliki programistyczne. | |
75 | ||
76 | %package static | |
77 | Summary: Yubico PIV static libraries | |
78 | Summary(pl.UTF-8): Biblioteki statyczne Yubico PIV | |
79 | Group: Development/Libraries | |
80 | Requires: %{name}-devel = %{version}-%{release} | |
81 | ||
82 | %description static | |
83 | The Yubico PIV tool is used for interacting with the Privilege and | |
84 | Identification Card (PIV) applet on a YubiKey NEO. This package | |
85 | includes static libraries. | |
86 | ||
87 | %description static -l pl.UTF-8 | |
88 | Narzędzie Yubico PIV Tool służy do komunikacji z apletem PIV | |
89 | (Privilege and Identification card) na urządzeniach YubiKey NEO. Ten | |
90 | pakiet zawiera biblioteki statyczne. | |
91 | ||
cc549f10 AM |
92 | %prep |
93 | %setup -q | |
ca44401a JR |
94 | %patch0 -p1 |
95 | %patch1 -p1 | |
cc549f10 AM |
96 | |
97 | %build | |
ca44401a JR |
98 | mkdir -p build |
99 | cd build | |
100 | %{cmake} ../ \ | |
101 | -DBACKEND="pcsc" | |
cc549f10 AM |
102 | %{__make} |
103 | ||
245af37c | 104 | %if %{with tests} |
ca44401a | 105 | %{__make} test |
245af37c | 106 | %endif |
cc549f10 AM |
107 | |
108 | %install | |
109 | rm -rf $RPM_BUILD_ROOT | |
ca44401a | 110 | %{__make} -C build install \ |
cc549f10 AM |
111 | DESTDIR=$RPM_BUILD_ROOT |
112 | ||
cc549f10 AM |
113 | %clean |
114 | rm -rf $RPM_BUILD_ROOT | |
115 | ||
c1d612a8 JB |
116 | %post libs -p /sbin/ldconfig |
117 | %postun libs -p /sbin/ldconfig | |
cc549f10 AM |
118 | |
119 | %files | |
120 | %defattr(644,root,root,755) | |
ca44401a | 121 | %doc COPYING NEWS README doc/*.adoc |
cc549f10 | 122 | %attr(755,root,root) %{_bindir}/yubico-piv-tool |
c1d612a8 JB |
123 | %{_mandir}/man1/yubico-piv-tool.1* |
124 | ||
125 | %files libs | |
126 | %defattr(644,root,root,755) | |
127 | %attr(755,root,root) %{_libdir}/libykpiv.so.*.*.* | |
ca44401a | 128 | %attr(755,root,root) %ghost %{_libdir}/libykpiv.so.2 |
c1d612a8 | 129 | %attr(755,root,root) %{_libdir}/libykcs11.so.*.*.* |
ca44401a | 130 | %attr(755,root,root) %ghost %{_libdir}/libykcs11.so.2 |
cc549f10 AM |
131 | |
132 | %files devel | |
133 | %defattr(644,root,root,755) | |
134 | %attr(755,root,root) %{_libdir}/libykpiv.so | |
135 | %attr(755,root,root) %{_libdir}/libykcs11.so | |
136 | %{_pkgconfigdir}/ykpiv.pc | |
137 | %{_pkgconfigdir}/ykcs11.pc | |
138 | %{_includedir}/ykpiv | |
c1d612a8 JB |
139 | |
140 | %if %{with static_libs} | |
141 | %files static | |
142 | %defattr(644,root,root,755) | |
143 | %{_libdir}/libykpiv.a | |
144 | %{_libdir}/libykcs11.a | |
145 | %endif |