]>
Commit | Line | Data |
---|---|---|
c589223c JP |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # static library | |
4 | ||
7bd421fe JB |
5 | Summary: Library functionality for FIDO 2.0, including communication with a device over USB |
6 | Summary(pl.UTF-8): Biblioteka funkcji dla FIDO 2.0, wraz z komunikacją z urządzeniem po USB | |
7 | Name: libfido2 | |
02a7a05b JP |
8 | Version: 1.14.0 |
9 | Release: 1 | |
7bd421fe JB |
10 | License: BSD |
11 | Group: Libraries | |
f5c15251 | 12 | #Source0Download: https://github.com/Yubico/libfido2/tags |
7bd421fe | 13 | Source0: https://github.com/Yubico/libfido2/archive/%{version}/%{name}-%{version}.tar.gz |
02a7a05b | 14 | # Source0-md5: 6aa04c6e9d029e595397fe026a3a03ce |
7bd421fe | 15 | URL: https://developers.yubico.com/libfido2/ |
02a7a05b | 16 | BuildRequires: cmake >= 3.7 |
fcbcd7d5 | 17 | BuildRequires: hidapi-devel |
7bd421fe JB |
18 | BuildRequires: libcbor-devel |
19 | BuildRequires: openssl-devel >= 1.1.0 | |
81c34a79 | 20 | BuildRequires: pcsc-lite-devel |
7bd421fe | 21 | BuildRequires: pkgconfig |
c589223c | 22 | BuildRequires: rpmbuild(macros) >= 1.742 |
f72e6dcc | 23 | BuildRequires: udev-devel |
afca0c5e | 24 | BuildRequires: zlib-devel |
7bd421fe JB |
25 | Requires: openssl >= 1.1.0 |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | %description | |
29 | This package provides library functionality for communicating with a | |
30 | FIDO device over USB as well as verifying attestation and assertion | |
31 | signatures. | |
32 | ||
33 | %description -l pl.UTF-8 | |
34 | Ten pakiet zawiera bibliotekę funkcji do komunikacji z urządzeniami | |
35 | FIDO po USB, a także weryfikowania podpisów poświadczeń i zapewnień. | |
36 | ||
37 | %package devel | |
38 | Summary: Header files for FIDO2 library | |
39 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki FIDO2 | |
40 | Group: Development/Libraries | |
41 | Requires: %{name} = %{version}-%{release} | |
d74055fe | 42 | Requires: openssl-devel >= 1.1.0 |
7bd421fe JB |
43 | |
44 | %description devel | |
45 | Header files for FIDO2 library. | |
46 | ||
47 | %description devel -l pl.UTF-8 | |
48 | Pliki nagłówkowe biblioteki FIDO2. | |
49 | ||
f72e6dcc JB |
50 | %package static |
51 | Summary: Static FIDO2 library | |
52 | Summary(pl.UTF-8): Biblioteka statyczna FIDO2 | |
53 | Group: Development/Libraries | |
54 | Requires: %{name}-devel = %{version}-%{release} | |
55 | ||
56 | %description static | |
57 | Static FIDO2 library. | |
58 | ||
59 | %description static -l pl.UTF-8 | |
60 | Biblioteka statyczna FIDO2. | |
61 | ||
7bd421fe JB |
62 | %prep |
63 | %setup -q | |
64 | ||
65 | %build | |
66 | install -d build | |
67 | cd build | |
68 | # note: exects CMAKE_INSTALL_LIBDIR relative to prefix | |
69 | %cmake .. \ | |
c589223c | 70 | %{cmake_on_off static_libs BUILD_STATIC_LIBS} \ |
35ac5d2f | 71 | -DBUILD_TESTS:BOOL=OFF \ |
16e6dfe3 | 72 | -DCMAKE_INSTALL_LIBDIR=%{_lib} \ |
fcbcd7d5 | 73 | -DGZIP_PATH=FALSE \ |
5084ac1e | 74 | -DMANDOC_PATH=FALSE \ |
afca0c5e | 75 | -DUSE_HIDAPI=ON \ |
81c34a79 | 76 | -DUSE_PCSC:BOOL=ON \ |
afca0c5e | 77 | -DNFC_LINUX=ON |
7bd421fe JB |
78 | |
79 | %{__make} | |
80 | ||
81 | %install | |
82 | rm -rf $RPM_BUILD_ROOT | |
83 | ||
84 | %{__make} -C build install \ | |
85 | DESTDIR=$RPM_BUILD_ROOT | |
86 | ||
87 | %clean | |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | ||
90 | %post -p /sbin/ldconfig | |
91 | %postun -p /sbin/ldconfig | |
92 | ||
93 | %files | |
94 | %defattr(644,root,root,755) | |
95 | %doc LICENSE README.adoc | |
16e6dfe3 AM |
96 | %attr(755,root,root) %{_bindir}/fido2-assert |
97 | %attr(755,root,root) %{_bindir}/fido2-cred | |
98 | %attr(755,root,root) %{_bindir}/fido2-token | |
7bd421fe | 99 | %attr(755,root,root) %{_libdir}/libfido2.so.*.*.* |
16e6dfe3 | 100 | %attr(755,root,root) %ghost %{_libdir}/libfido2.so.1 |
d74055fe AM |
101 | %{_mandir}/man1/fido2-assert.1* |
102 | %{_mandir}/man1/fido2-cred.1* | |
103 | %{_mandir}/man1/fido2-token.1* | |
7bd421fe JB |
104 | |
105 | %files devel | |
106 | %defattr(644,root,root,755) | |
107 | %attr(755,root,root) %{_libdir}/libfido2.so | |
108 | %{_includedir}/fido | |
109 | %{_includedir}/fido.h | |
110 | %{_pkgconfigdir}/libfido2.pc | |
d74055fe AM |
111 | %{_mandir}/man3/*_pk_*.3* |
112 | %{_mandir}/man3/fido*.3* | |
f72e6dcc | 113 | |
c589223c | 114 | %if %{with static_libs} |
f72e6dcc JB |
115 | %files static |
116 | %defattr(644,root,root,755) | |
117 | %{_libdir}/libfido2.a | |
c589223c | 118 | %endif |