]>
Commit | Line | Data |
---|---|---|
6845eb63 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # static library | |
4 | # | |
5 | Summary: Yubico Universal 2nd Factor (U2F) Server C Library | |
6 | Summary(pl.UTF-8): Biblioteka C serwera Universal 2nd Factor (U2F) Yubico | |
7 | Name: libu2f-server | |
8 | Version: 1.1.0 | |
5804818c | 9 | Release: 3 |
6845eb63 JB |
10 | License: BSD |
11 | Group: Libraries | |
12 | Source0: https://developers.yubico.com/libu2f-server/Releases/%{name}-%{version}.tar.xz | |
13 | # Source0-md5: 7350f22ff60f21133a2f78d050448dae | |
5804818c | 14 | Patch0: %{name}-json-c.patch |
6845eb63 JB |
15 | URL: https://developers.yubico.com/libu2f-server/ |
16 | BuildRequires: gengetopt | |
17 | BuildRequires: help2man | |
18 | BuildRequires: json-c-devel | |
19 | BuildRequires: openssl-devel | |
20 | BuildRequires: pkgconfig | |
21 | BuildRequires: tar >= 1:1.22 | |
22 | BuildRequires: xz | |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
25 | %description | |
26 | libu2f-server is a C library that implements the server-side of the | |
27 | U2F protocol. More precisely, it provides an API for generating the | |
28 | JSON blobs required by U2F devices to perform the U2F Registration and | |
29 | U2F Authentication operations, and functionality for verifying the | |
30 | cryptographic operations. | |
31 | ||
32 | %description -l pl.UTF-8 | |
33 | libu2f-server to biblioteka C implementująca stronę serwera protokołu | |
34 | U2F. Ściślej mówiąc, udostępnia API do generowania blobów JSON | |
35 | wymaganych przez urządzenia U2F do wykonywania operacji U2F | |
36 | Registration i U2F Authentication oraz funkcjonalność weryfikowania | |
37 | operacji kryptograficznych. | |
38 | ||
39 | %package devel | |
40 | Summary: Header files for libu2f-server library | |
41 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libu2f-server | |
42 | Group: Development/Libraries | |
43 | Requires: %{name} = %{version}-%{release} | |
44 | ||
45 | %description devel | |
46 | Header files for libu2f-server library. | |
47 | ||
48 | %description devel -l pl.UTF-8 | |
49 | Pliki nagłówkowe biblioteki libu2f-server. | |
50 | ||
51 | %package static | |
52 | Summary: Static libu2f-server library | |
53 | Summary(pl.UTF-8): Statyczna biblioteka libu2f-server | |
54 | Group: Development/Libraries | |
55 | Requires: %{name}-devel = %{version}-%{release} | |
56 | ||
57 | %description static | |
58 | Static libu2f-server library. | |
59 | ||
60 | %description static -l pl.UTF-8 | |
61 | Statyczna biblioteka libu2f-server. | |
62 | ||
63 | %prep | |
64 | %setup -q | |
5804818c | 65 | %patch0 -p1 |
6845eb63 JB |
66 | |
67 | %build | |
68 | %configure \ | |
69 | --disable-silent-rules \ | |
70 | %{!?with_static_libs:--disable-static} | |
71 | %{__make} | |
72 | ||
73 | %install | |
74 | rm -rf $RPM_BUILD_ROOT | |
75 | ||
76 | %{__make} install \ | |
77 | DESTDIR=$RPM_BUILD_ROOT | |
78 | ||
79 | # obsoleted by pkg-config | |
80 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libu2f-server.la | |
81 | ||
82 | %clean | |
83 | rm -rf $RPM_BUILD_ROOT | |
84 | ||
85 | %post -p /sbin/ldconfig | |
86 | %postun -p /sbin/ldconfig | |
87 | ||
88 | %files | |
89 | %defattr(644,root,root,755) | |
90 | %doc AUTHORS COPYING ChangeLog NEWS README THANKS | |
91 | %attr(755,root,root) %{_bindir}/u2f-server | |
92 | %attr(755,root,root) %{_libdir}/libu2f-server.so.*.*.* | |
93 | %attr(755,root,root) %ghost %{_libdir}/libu2f-server.so.0 | |
94 | %{_mandir}/man1/u2f-server.1* | |
95 | ||
96 | %files devel | |
97 | %defattr(644,root,root,755) | |
98 | %attr(755,root,root) %{_libdir}/libu2f-server.so | |
99 | %{_includedir}/u2f-server | |
100 | %{_pkgconfigdir}/u2f-server.pc | |
101 | ||
102 | %if %{with static_libs} | |
103 | %files static | |
104 | %defattr(644,root,root,755) | |
105 | %{_libdir}/libu2f-server.a | |
106 | %endif |