]>
Commit | Line | Data |
---|---|---|
4a4d6a23 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # static library | |
4 | %bcond_without tests # unit tests | |
5 | ||
665c618d | 6 | Summary: Yubikey personalization program |
4a4d6a23 | 7 | Summary(pl.UTF-8): Program do personalizacji urządzeń Yubikey |
665c618d | 8 | Name: ykpers |
1f3f787e | 9 | Version: 1.20.0 |
f3fb7e74 | 10 | Release: 2 |
665c618d AM |
11 | License: BSD |
12 | Group: Applications/System | |
4a4d6a23 | 13 | Source0: https://developers.yubico.com/yubikey-personalization/Releases/%{name}-%{version}.tar.gz |
1f3f787e | 14 | # Source0-md5: 8749113ce5a0164fe2b429b61242ba0f |
f3fb7e74 | 15 | Patch0: %{name}-json-c.patch |
4a4d6a23 JB |
16 | URL: https://developers.yubico.com/yubikey-personalization/ |
17 | BuildRequires: asciidoc | |
665c618d | 18 | BuildRequires: json-c-devel |
4a4d6a23 JB |
19 | BuildRequires: libusb-devel >=1.0 |
20 | BuildRequires: libyubikey-devel >= 1.5 | |
21 | BuildRequires: pkgconfig | |
22 | BuildRequires: udev-devel >= 1:1.188 | |
23 | Requires: libyubikey >= 1.5 | |
24 | Conflicts: udev-core < 1:1.188 | |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
665c618d AM |
26 | |
27 | %description | |
28 | Yubico's YubiKey can be re-programmed with a new AES key. This is a | |
29 | library that makes this an easy task. | |
30 | ||
6dda319f | 31 | %description -l pl.UTF-8 |
4a4d6a23 JB |
32 | Urządzenia Yubico YubiKey można ponownie zaprogramować nowym kluczem |
33 | AES. Ta biblioteka pozwala zrobić to łatwo. | |
34 | ||
665c618d | 35 | %package devel |
4a4d6a23 JB |
36 | Summary: Development files for ykpers library |
37 | Summary(pl.UTF-8): Pliki programistyczne biblioteki ykpers | |
665c618d AM |
38 | Group: Development/Libraries |
39 | Requires: %{name} = %{version}-%{release} | |
40 | ||
41 | %description devel | |
4a4d6a23 JB |
42 | This package contains the header files needed to develop applications |
43 | that use ykpers library. | |
44 | ||
45 | %description devel -l pl.UTF-8 | |
46 | Ten pakiet zawiera pliki nagłówkowe niezbędne do tworzenia aplikacji | |
47 | wykorzystujących bibliotekę ykpers. | |
48 | ||
49 | %package static | |
50 | Summary: Static ykpers library | |
51 | Summary(pl.UTF-8): Statyczna biblioteka ykpers | |
52 | Group: Development/Libraries | |
53 | Requires: %{name}-devel = %{version}-%{release} | |
54 | ||
55 | %description static | |
56 | Static ykpers library. | |
57 | ||
58 | %description static -l pl.UTF-8 | |
59 | Statyczna biblioteka ykpers. | |
665c618d AM |
60 | |
61 | %prep | |
62 | %setup -q | |
f3fb7e74 | 63 | %patch0 -p1 |
665c618d AM |
64 | |
65 | %build | |
66 | %configure \ | |
67 | --disable-silent-rules \ | |
4a4d6a23 JB |
68 | %{!?with_static_libs:--disable-static} \ |
69 | --with-backend=libusb-1.0 \ | |
70 | --with-udevrulesdir=/lib/udev/rules.d | |
665c618d AM |
71 | %{__make} |
72 | ||
73 | %if %{with tests} | |
4a4d6a23 JB |
74 | export LD_LIBRARY_PATH=$(pwd)/.libs |
75 | # disable valgrind, it reports false positives from libc sscanf() and strdup() | |
76 | %{__make} check \ | |
77 | LOG_COMPILER= | |
665c618d AM |
78 | %endif |
79 | ||
80 | %install | |
81 | rm -rf $RPM_BUILD_ROOT | |
4a4d6a23 JB |
82 | |
83 | %{__make} install \ | |
665c618d AM |
84 | DESTDIR=$RPM_BUILD_ROOT |
85 | ||
4a4d6a23 JB |
86 | # obsoleted by pkg-config |
87 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libykpers-1.la | |
88 | ||
665c618d | 89 | %clean |
4a4d6a23 | 90 | rm -rf $RPM_BUILD_ROOT |
665c618d | 91 | |
4a4d6a23 JB |
92 | %post -p /sbin/ldconfig |
93 | %postun -p /sbin/ldconfig | |
665c618d AM |
94 | |
95 | %files | |
96 | %defattr(644,root,root,755) | |
4a4d6a23 | 97 | %doc AUTHORS COPYING ChangeLog NEWS README doc/Compatibility.asciidoc |
665c618d AM |
98 | %attr(755,root,root) %{_bindir}/ykinfo |
99 | %attr(755,root,root) %{_bindir}/ykpersonalize | |
100 | %attr(755,root,root) %{_bindir}/ykchalresp | |
665c618d | 101 | %attr(755,root,root) %{_libdir}/libykpers-1.so.*.* |
4a4d6a23 | 102 | %attr(755,root,root) %ghost %{_libdir}/libykpers-1.so.1 |
665c618d AM |
103 | %{_mandir}/man1/ykpersonalize.1* |
104 | %{_mandir}/man1/ykchalresp.1* | |
105 | %{_mandir}/man1/ykinfo.1* | |
106 | /lib/udev/rules.d/69-yubikey.rules | |
107 | ||
108 | %files devel | |
109 | %defattr(644,root,root,755) | |
110 | %doc doc/USB-Hid-Issue.asciidoc | |
665c618d AM |
111 | %attr(755,root,root) %{_libdir}/libykpers-1.so |
112 | %{_includedir}/ykpers-1 | |
4a4d6a23 JB |
113 | %{_pkgconfigdir}/ykpers-1.pc |
114 | ||
115 | %if %{with static_libs} | |
116 | %files static | |
117 | %defattr(644,root,root,755) | |
118 | %{_libdir}/libykpers-1.a | |
119 | %endif |