From 5921fb481706961ea6d8de6362b577e0a8c80cce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Tue, 5 Aug 2014 18:18:25 +0200 Subject: [PATCH] Added support for RHEL (i.e. no PSKC yet on RHEL) --- oath-toolkit.spec | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/oath-toolkit.spec b/oath-toolkit.spec index f01cfc9..0b12087 100644 --- a/oath-toolkit.spec +++ b/oath-toolkit.spec @@ -1,11 +1,13 @@ Name: oath-toolkit Version: 2.4.1 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv3+ Group: System Environment/Libraries Summary: One-time password components -BuildRequires: xmlsec1-devel, pam-devel, gtk-doc, libtool, libtool-ltdl-devel -BuildRequires: xmlsec1-openssl-devel +BuildRequires: pam-devel, gtk-doc, libtool, libtool-ltdl-devel +%if ! 0%{?rhel:1} +BuildRequires: xmlsec1-devel, xmlsec1-openssl-devel +%endif Source: http://download.savannah.gnu.org/releases/%{name}/%{name}-%{version}.tar.gz URL: http://www.nongnu.org/oath-toolkit/ # Escape leading single quotes in man pages which are misinterpreted as macros, @@ -55,6 +57,7 @@ BuildArch: noarch %description -n liboath-doc Documentation files for liboath. +%if ! 0%{?rhel:1} %package -n libpskc Summary: Library for PSKC handling Group: Development/Libraries @@ -88,6 +91,7 @@ BuildArch: noarch %description -n libpskc-doc Documentation files for libpskc. +%endif %package -n oathtool Summary: A command line tool for generating and validating OTPs @@ -98,6 +102,7 @@ Provides: bundled(gnulib) %description -n oathtool A command line tool for generating and validating OTPs. +%if ! 0%{?rhel:1} %package -n pskctool Summary: A command line tool for manipulating PSKC data # https://fedorahosted.org/fpc/ticket/174 @@ -106,6 +111,7 @@ Requires: xmlsec1-openssl%{?_isa} %description -n pskctool A command line tool for manipulating PSKC data. +%endif %package -n pam_oath Summary: A PAM module for pluggable login authentication for OATH @@ -123,7 +129,7 @@ A PAM module for pluggable login authentication for OATH. %configure --with-pam-dir=%{_libdir}/security # Kill rpaths and link with --as-needed -for d in liboath libpskc oathtool pam_oath pskctool +for d in liboath %{!?rhel:libpskc pskctool} oathtool pam_oath do sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' $d/libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' $d/libtool @@ -146,9 +152,11 @@ mkdir -p -m 0600 %{buildroot}%{_sysconfdir}/liboath %postun -n liboath -p /sbin/ldconfig +%if ! 0%{?rhel:1} %post -n libpskc -p /sbin/ldconfig %postun -n libpskc -p /sbin/ldconfig +%endif %files -n liboath %doc liboath/COPYING @@ -164,6 +172,7 @@ mkdir -p -m 0600 %{buildroot}%{_sysconfdir}/liboath %{_mandir}/man3/oath* %{_datadir}/gtk-doc/html/liboath/* +%if ! 0%{?rhel:1} %files -n libpskc %doc libpskc/README %{_libdir}/libpskc.so.* @@ -177,21 +186,27 @@ mkdir -p -m 0600 %{buildroot}%{_sysconfdir}/liboath %files -n libpskc-doc %{_mandir}/man3/pskc* %{_datadir}/gtk-doc/html/libpskc/* +%endif %files -n oathtool %doc oathtool/COPYING %{_bindir}/oathtool %{_mandir}/man1/oathtool.* +%if ! 0%{?rhel:1} %files -n pskctool %{_bindir}/pskctool %{_mandir}/man1/pskctool.* +%endif %files -n pam_oath %doc pam_oath/README pam_oath/COPYING %{_libdir}/security/pam_oath.so %changelog +* Tue Aug 5 2014 Jaroslav Škarvada - 2.4.1-5 +- Added support for RHEL (i.e. no PSKC yet on RHEL) + * Sat Jun 07 2014 Fedora Release Engineering - 2.4.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild