SHA256
1
0
forked from pool/libyubikey
libyubikey/libyubikey.spec

100 lines
2.9 KiB
RPMSpec

#
# spec file for package libyubikey
#
# 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: libyubikey
Version: 1.13
Release: 0
Summary: Yubico's USB key low-level C library
License: BSD-2-Clause
Group: Productivity/Networking/Security
Url: https://developers.yubico.com/
# a different tarball is available from github. It will not build with this spec file
Source0: https://developers.yubico.com/yubico-c/Releases/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Low-level library for decrypting and parsing Yubikey One-Time Passwords (OTP) in C.
%package -n libyubikey0
Summary: Yubico's USB key low-level C library
Group: Productivity/Networking/Security
%description -n libyubikey0
Low-level library for decrypting and parsing Yubikey One-Time Passwords (OTP) in C.
%package devel
Summary: Yubico's USB key low-level C library
Group: Development/Libraries/C and C++
Requires: glibc-devel
Requires: libyubikey0 = %{version}
%description devel
Low-level library for decrypting and parsing Yubikey One-Time Passwords (OTP) in C.
%package tools
Summary: Tools to support Yubico's USB key low-level C library
Group: Development/Libraries/C and C++
Requires: libyubikey0 = %{version}
%description tools
Binary tools to support Yubico's Low-level library for decrypting and parsing Yubikey One-Time Passwords (OTP) in C.
%prep
%setup -q
%build
%configure --disable-static --with-pic
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
find %{buildroot} -type f -name "*.la" -delete -print
%post -n libyubikey0 -p /sbin/ldconfig
%postun -n libyubikey0 -p /sbin/ldconfig
%files tools
%defattr(-,root,root,-)
%doc COPYING AUTHORS NEWS
%{_bindir}/modhex
%{_bindir}/ykgenerate
%{_bindir}/ykparse
%{_mandir}/man1/*
%files -n libyubikey0
%defattr(-,root,root,-)
%doc COPYING AUTHORS NEWS
%{_libdir}/libyubikey.so.*
%files devel
%defattr(-,root,root,-)
%doc COPYING AUTHORS NEWS
%{_libdir}/libyubikey.so
%{_includedir}/yubikey.h
%changelog