File u2f-utils.spec of Package u2f-utils
#
# spec file for package u2f-toolset
#
# Copyright (c) 2015 SUSE LINUX Products 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/
#
Name: u2f-utils
Version: 0.0.0+git1420732548.8af92a2
Release: 0
License: BSD-4-Clause
Summary: U2F toolset
Url: https://github.com/stealth/u2f
Group: Productivity/Networking/Security
Source: %{name}-%{version}.tar.bz2
Patch: 0001-use-system-libhidapi.patch
Patch1: 0002-allow-passing-in-optflags.patch
Patch2: 0003-fix-variable-expansion.patch
Patch3: 0004-Fix-linker-cmdline-to-make-linking-with-asneeded-wor.patch
Patch4: 0005-Fix-make-install.patch
BuildRequires: gcc-c++
BuildRequires: libhidapi-devel
BuildRequires: openssl-devel
BuildRequires: pam-devel
BuildRequires: pkgconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: pam_fido-u2f
%define _pamdir /%{_lib}/security/
%description
This u2f toolset contains small footprint u2f tools for enrolling and signing
operations as well as a PAM module for authenticating users on local services
where they can physically plug in the u2f token (i.e. xdm, login, su, ...).
%package -n pam_fido-u2f
Summary: The PAM module from the U2F toolset
Requires: %{name} = %{version}
#
Group: Productivity/Networking/Security
%description -n pam_fido-u2f
This u2f toolset contains small footprint u2f tools for enrolling and signing
operations as well as a PAM module for authenticating users on local services
where they can physically plug in the u2f token (i.e. xdm, login, su, ...).
This package contains the pam module.
%prep
%setup -q
%patch -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%build
make OPTFLAGS="%{optflags}" PAMDIR="%{_pamdir}" PREFIX="%{_prefix}"
%install
make install DESTDIR=%{buildroot} PAMDIR="%{_pamdir}" PREFIX="%{_prefix}"
%files
%defattr(-,root,root)
%doc README.md
%{_bindir}/u2f-sign
%{_bindir}/u2f-enroll
%{_bindir}/pam-enroll
%files -n pam_fido-u2f
%defattr(-,root,root)
%{_pamdir}/pam_fido-u2f.so
%changelog