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
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)
29 Core implementations of an open-source secure key, with supports of:
30 * U2F / FIDO2 with ed25519 and HMAC-secret
32 * PIV (NIST SP 800-73-4)
36 %description -l pl.UTF-8
37 Podstawowa implementacja bezpiecznego klucza o otwartych źródłach, z
39 * U2F / FIDO2 z ed25519 i HMAC-secret
41 * PIV (NIST SP 800-73-4)
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}
52 Header files for canokey-core library.
54 %description devel -l pl.UTF-8
55 Pliki nagłówkowe biblioteki canokey-core.
61 %{__tar} xf %{SOURCE1} -C canokey-crypto --strip-components=1
62 %{__tar} xf %{SOURCE2} -C canokey-crypto/mbedtls --strip-components=1
72 rm -rf $RPM_BUILD_ROOT
73 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/canokey-{core,crypto}}
75 install build/libcanokey-core.so build/canokey-crypto/libcanokey-crypto.so $RPM_BUILD_ROOT%{_libdir}
77 cp -p include/*.h $RPM_BUILD_ROOT%{_includedir}/canokey-core
78 cp -p canokey-crypto/include/*.h $RPM_BUILD_ROOT%{_includedir}/canokey-crypto
81 rm -rf $RPM_BUILD_ROOT
83 %post -p /sbin/ldconfig
84 %postun -p /sbin/ldconfig
87 %defattr(644,root,root,755)
89 %attr(755,root,root) %{_libdir}/libcanokey-core.so
90 %attr(755,root,root) %{_libdir}/libcanokey-crypto.so
93 %defattr(644,root,root,755)
94 %{_includedir}/canokey-core
95 %{_includedir}/canokey-crypto