libfido2/libfido2.spec

91 lines
2.7 KiB
RPMSpec

#
# spec file for package libu2f-host
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define sover 0_2_0
Name: libfido2
Version: 0.2.0
Release: 0
Summary: FIDO U2F and FIDO 2.0 protocols
License: BSD-2-Clause
Group: Productivity/Networking/Security
Url: https://github.com/Yubico/libfido2
Source0: https://github.com/Yubico/libfido2/archive/%{version}.tar.gz#/libfido2-%{version}.tar.gz
BuildRequires: libhidapi-devel
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: libopenssl-1_1-devel
BuildRequires: pkg-config
BuildRequires: pkgconfig(libcbor)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Provides library functionality for communicating with a FIDO device
over USB as well as verifying attestation and assertion signatures.
%package -n %{name}-%{sover}
Summary: FIDO U2F and FIDO 2.0 protocols
Group: System/Libraries
%description -n %{name}-%{sover}
This library supports the FIDO U2F and FIDO 2.0 protocols for
communicating with a USB authenticator via the
Client-to-Authenticator Protocol (CTAP 1 and 2).
%package -n %{name}-devel
Summary: Development files for FIDO U2F and FIDO 2.0 protocols
Group: Development/Libraries/C and C++
Requires: %{name}-%{sover} = %{version}
Requires: libopenssl-1_1-devel
Requires: libhidapi-devel
%description -n %{name}-devel
This package contains the header file needed to develop applications that
use FIDO U2F and FIDO 2.0 protocols.
%prep
%setup -q
%build
%cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCBOR_LIBRARY_DIRS=%{_libdir}
make %{?_smp_mflags}
%install
pushd build
%make_install
popd
find %{buildroot} -type f -name "*.a" -delete -print
%post -n %{name}-%{sover} -p /sbin/ldconfig
%postun -n %{name}-%{sover} -p /sbin/ldconfig
%files -n %{name}-%{sover}
%doc README.adoc LICENSE
%{_libdir}/%{name}.so.*
%{_mandir}/man?/*
%{_bindir}/fido2-*
%files -n %{name}-devel
%{_includedir}/*.h
%dir %{_includedir}/fido
%{_includedir}/fido/*.h
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/*
%changelog