]> git.pld-linux.org Git - packages/canokey-core.git/blob - canokey-core.spec
- initial
[packages/canokey-core.git] / canokey-core.spec
1 %define         crypto_gitref   02fe68051a7aafe7a26c2d94916cd17975eede5f
2 %define         mbedtls_gitref  f71e2878084126737cc39083e1e15afc459bd93d
3 Summary:        Core implementation of an open-source secure key
4 Summary(pl.UTF-8):      Podstawowa implementacja bezpiecznego klucza o otwartych źródłach
5 Name:           canokey-core
6 Version:        2.0.1
7 Release:        0.1
8 License:        Apache v2.0
9 Group:          Libraries
10 #Source0Download: https://github.com/canokeys/canokey-core/tags
11 Source0:        https://github.com/canokeys/canokey-core/archive/%{version}/%{name}-%{version}.tar.gz
12 # Source0-md5:  3796481418c30996b6abf8df2e594f53
13 Source1:        https://github.com/canokeys/canokey-crypto/archive/%{crypto_gitref}/canokey-crypto-%{crypto_gitref}.tar.gz
14 # Source1-md5:  50fedd10a71a8618c8434ee50de2b40d
15 # private mbedtls is patched for MBEDTLS_ECP_DP_ED25519 support
16 Source2:        https://github.com/ARMmbed/mbedtls/archive/%{mbedtls_gitref}/mbedtls-%{mbedtls_gitref}.tar.gz
17 # Source2-md5:  80fe94ab2e3eb4213d00ba0473dbe71c
18 Patch0:         %{name}-system-libs.patch
19 URL:            https://github.com/canokeys/canokey-core/
20 BuildRequires:  cmake >= 3.7
21 BuildRequires:  gcc >= 6:4.7
22 BuildRequires:  littlefs-devel
23 BuildRequires:  pkgconfig
24 BuildRequires:  rpmbuild(macros) >= 1.605
25 BuildRequires:  tinycbor-devel
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 Core implementations of an open-source secure key, with supports of:
30 * U2F / FIDO2 with ed25519 and HMAC-secret
31 * OpenPGP Card V3.4
32 * PIV (NIST SP 800-73-4)
33 * HOTP / TOTP
34 * NDEF
35
36 %description -l pl.UTF-8
37 Podstawowa implementacja bezpiecznego klucza o otwartych źródłach, z
38 obsługą:
39 * U2F / FIDO2 z ed25519 i HMAC-secret
40 * OpenPGP Card V3.4
41 * PIV (NIST SP 800-73-4)
42 * HOTP / TOTP
43 * NDEF
44
45 %package devel
46 Summary:        Header files for canokey-core library
47 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki canokey-core
48 Group:          Development/Libraries
49 Requires:       %{name} = %{version}-%{release}
50
51 %description devel
52 Header files for canokey-core library.
53
54 %description devel -l pl.UTF-8
55 Pliki nagłówkowe biblioteki canokey-core.
56
57 %prep
58 %setup -q
59 %patch0 -p1
60
61 %{__tar} xf %{SOURCE1} -C canokey-crypto --strip-components=1
62 %{__tar} xf %{SOURCE2} -C canokey-crypto/mbedtls --strip-components=1
63
64 %build
65 install -d build
66 cd build
67 %cmake ..
68
69 %{__make}
70
71 %install
72 rm -rf $RPM_BUILD_ROOT
73 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/canokey-{core,crypto}}
74
75 install build/libcanokey-core.so build/canokey-crypto/libcanokey-crypto.so $RPM_BUILD_ROOT%{_libdir}
76
77 cp -p include/*.h $RPM_BUILD_ROOT%{_includedir}/canokey-core
78 cp -p canokey-crypto/include/*.h $RPM_BUILD_ROOT%{_includedir}/canokey-crypto
79
80 %clean
81 rm -rf $RPM_BUILD_ROOT
82
83 %post   -p /sbin/ldconfig
84 %postun -p /sbin/ldconfig
85
86 %files
87 %defattr(644,root,root,755)
88 %doc README.md
89 %attr(755,root,root) %{_libdir}/libcanokey-core.so
90 %attr(755,root,root) %{_libdir}/libcanokey-crypto.so
91
92 %files devel
93 %defattr(644,root,root,755)
94 %{_includedir}/canokey-core
95 %{_includedir}/canokey-crypto
This page took 0.106771 seconds and 3 git commands to generate.