# # spec file for package oath-toolkit # # Copyright (c) 2016 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/ # %if 0%{?suse_version} >= 1320 || 0%{?sle_version} >= 120100 %define build_pskc 1 %endif Name: oath-toolkit Version: 2.6.2 Release: 0 Summary: Toolkit for one-time password authentication systems License: GPL-3.0-or-later and LGPL-2.1-or-later Group: Productivity/Networking/Security Url: http://www.nongnu.org/oath-toolkit/ Source: http://download.savannah.nongnu.org/releases/%{name}/%{name}-%{version}.tar.gz Patch1: 0001-Fix-no-return-in-nonvoid-function-errors-reported-by.patch Patch2: 0002-update_gnulibs_files.patch BuildRequires: bison BuildRequires: gengetopt BuildRequires: gtk-doc BuildRequires: libgcrypt-devel BuildRequires: pam-devel BuildRequires: pkgconfig BuildRoot: %{_tmppath}/%{name}-%{version}-build %if %{build_pskc} BuildRequires: libtool BuildRequires: libxml2-devel BuildRequires: pkgconfig(xmlsec1) %endif %description The OATH Toolkit makes it easy to build one-time password authentication systems. It contains shared libraries, command line tools and a PAM module. Supported technologies include the event-based HOTP algorithm (RFC4226) and the time-based TOTP algorithm (RFC6238). OATH stands for Open AuTHentication, which is the organization that specify the algorithms. For managing secret key files, the Portable Symmetric Key Container (PSKC) format described in RFC6030 is supported. %package -n pam_oath Summary: PAM module for pluggable login authentication for OATH License: GPL-3.0+ Group: Productivity/Networking/Security %description -n pam_oath The OATH Toolkit makes it easy to build one-time password authentication systems. It contains shared libraries, command line tools and a PAM module. Supported technologies include the event-based HOTP algorithm (RFC4226) and the time-based TOTP algorithm (RFC6238). OATH stands for Open AuTHentication, which is the organization that specify the algorithms. For managing secret key files, the Portable Symmetric Key Container (PSKC) format described in RFC6030 is supported. %package -n liboath0 Summary: Library for Open AuTHentication (OATH) HOTP support License: LGPL-2.1+ Group: Productivity/Networking/Security Requires: %{name}-xml >= %{version} %description -n liboath0 The OATH Toolkit makes it easy to build one-time password authentication systems. It contains shared libraries, command line tools and a PAM module. Supported technologies include the event-based HOTP algorithm (RFC4226) and the time-based TOTP algorithm (RFC6238). OATH stands for Open AuTHentication, which is the organization that specify the algorithms. For managing secret key files, the Portable Symmetric Key Container (PSKC) format described in RFC6030 is supported. %package xml Summary: This package contains xml files needed by liboath0 Group: Development/Libraries/C and C++ BuildArch: noarch %description xml The OATH Toolkit makes it easy to build one-time password authentication systems. It contains shared libraries, command line tools and a PAM module. Supported technologies include the event-based HOTP algorithm (RFC4226) and the time-based TOTP algorithm (RFC6238). OATH stands for Open AuTHentication, which is the organization that specify the algorithms. For managing secret key files, the Portable Symmetric Key Container (PSKC) format described in RFC6030 is supported. %package -n liboath-devel Summary: Library for Open AuTHentication (OATH) HOTP support -- Development Files License: LGPL-2.1+ Group: Development/Libraries/C and C++ Requires: glibc-devel Requires: liboath0 = %{version} %description -n liboath-devel The OATH Toolkit makes it easy to build one-time password authentication systems. It contains shared libraries, command line tools and a PAM module. Supported technologies include the event-based HOTP algorithm (RFC4226) and the time-based TOTP algorithm (RFC6238). OATH stands for Open AuTHentication, which is the organization that specify the algorithms. For managing secret key files, the Portable Symmetric Key Container (PSKC) format described in RFC6030 is supported. %if %{build_pskc} %package -n libpskc0 Summary: Library for Portable Symmetric Key Container License: LGPL-2.1+ Group: Productivity/Networking/Security %description -n libpskc0 The OATH Toolkit makes it easy to build one-time password authentication systems. It contains shared libraries, command line tools and a PAM module. Supported technologies include the event-based HOTP algorithm (RFC4226) and the time-based TOTP algorithm (RFC6238). OATH stands for Open AuTHentication, which is the organization that specify the algorithms. For managing secret key files, the Portable Symmetric Key Container (PSKC) format described in RFC6030 is supported. %package -n libpskc-devel Summary: Library for Portable Symmetric Key Container -- Development Files License: LGPL-2.1+ Group: Development/Libraries/C and C++ Requires: glibc-devel Requires: libpskc0 = %{version} %description -n libpskc-devel The OATH Toolkit makes it easy to build one-time password authentication systems. It contains shared libraries, command line tools and a PAM module. Supported technologies include the event-based HOTP algorithm (RFC4226) and the time-based TOTP algorithm (RFC6238). OATH stands for Open AuTHentication, which is the organization that specify the algorithms. For managing secret key files, the Portable Symmetric Key Container (PSKC) format described in RFC6030 is supported. %endif %prep %setup -q %patch1 -p1 %patch2 -p1 autoreconf -fi %build %configure --with-pam-dir=/%{_lib}/security \ --with-libgcrypt \ --disable-silent-rules \ --with-pic \ --disable-static make %{?_smp_mflags} %install make DESTDIR=%{buildroot} install %{?_smp_mflags} mv COPYING COPYING.summary find %{buildroot} -type f -name "*.la" -delete -print %post -n liboath0 -p /sbin/ldconfig %postun -n liboath0 -p /sbin/ldconfig %if %{build_pskc} %post -n libpskc0 -p /sbin/ldconfig %postun -n libpskc0 -p /sbin/ldconfig %endif %files %defattr(-,root,root) %doc ChangeLog NEWS README COPYING.summary %license oathtool/COPYING %{_bindir}/oathtool %{_mandir}/man1/oathtool.* %if %{build_pskc} %{_bindir}/pskctool %{_mandir}/man1/pskctool.* %endif %files -n pam_oath %defattr(-,root,root) %doc pam_oath/README %license pam_oath/COPYING /%{_lib}/security/pam_oath.so %files -n liboath0 %defattr(-,root,root) %license liboath/COPYING %{_libdir}/liboath.so.* %files xml %{_datadir}/xml/pskc/ %files -n liboath-devel %defattr(-,root,root) %{_libdir}/liboath.so %{_includedir}/liboath/ %{_libdir}/pkgconfig/liboath.pc %doc %{_datadir}/gtk-doc/html/liboath %{_mandir}/man3/oath_* %if %{build_pskc} %files -n libpskc0 %defattr(-,root,root) # there's no COPYING for libpskc, but it's LGPL, like liboath %doc libpskc/README %license liboath/COPYING %{_libdir}/libpskc.so.* %files -n libpskc-devel %defattr(-,root,root) %{_libdir}/libpskc.so %{_includedir}/pskc/ %{_libdir}/pkgconfig/libpskc.pc %doc %{_datadir}/gtk-doc/html/libpskc %{_mandir}/man3/pskc_* %endif %changelog