Branch: master

1a3660cb 2016-10-16 04:51:52 François Andriot
RPM packaging: fix smartcardauth r14.0.x build
M redhat/applications/smartcardauth/smartcardauth-14.0.0.spec
diff --git a/redhat/applications/smartcardauth/smartcardauth-14.0.0.spec b/redhat/applications/smartcardauth/smartcardauth-14.0.0.spec
index 8c1806c..a4d2fd7 100644
--- a/redhat/applications/smartcardauth/smartcardauth-14.0.0.spec
+++ b/redhat/applications/smartcardauth/smartcardauth-14.0.0.spec
@@ -56,7 +56,6 @@
 
 Source0:		%{name}-%{tde_version}%{?preversion:~%{preversion}}.tar.gz
 Source1:		trinity-%{tde_pkg}-rpmlintrc
-#Patch0:			%{tde_pkg}-14.0.0.patch
 
 BuildRequires:	trinity-tdelibs-devel >= %{tde_version}
 BuildRequires:	trinity-tdebase-devel >= %{tde_version}
@@ -126,6 +125,22 @@
 # TLS support
 BuildRequires:	gnutls-devel
 
+# PRETTYPRINT utility
+%if "%{?tde_version}" != "14.1.0"
+%if 0%{?rhel} || 0%{?fedora}
+BuildRequires:	nss-tools
+%define pp %{_libdir}/nss/unsupported-tools/pp
+%endif
+%if 0%{?mgaversion} || 0%{?mdkversion}
+BuildRequires:	nss
+%define pp /usr/bin/pp
+%endif
+%if 0%{?suse_version}
+BuildRequires:	mozilla-nss-tools
+%define pp /usr/lib/nss/pp
+%endif
+%endif
+
 
 %description
 This utility will allow you to set up your computer to accept a SmartCard as an authentication source for:
@@ -152,17 +167,17 @@
 
 %prep
 %setup -q -n %{name}-%{tde_version}%{?preversion:~%{preversion}}
-#patch0 -p1
 
 %__sed -i "Makefile" \
-	-e "s|/usr/lib/perl5/Chipcard|%{_libdir}/perl5/vendor_perl/Chipcard|g"
+       -e "s|/usr/lib/perl5/Chipcard|%{_libdir}/perl5/vendor_perl/Chipcard|g" \
+       -e "s|/usr/bin/pp|%{pp}|"
 
 
 %build
 export PATH="%{tde_bindir}:${PATH}"
 
 cd src
-make CFLAGS="${RPM_OPT_FLAGS}"  CXXFLAGS="${RPM_OPT_FLAGS}"
+make CFLAGS="${RPM_OPT_FLAGS}" CXXFLAGS="${RPM_OPT_FLAGS}"
 
 
 %install
@@ -178,9 +193,27 @@
 %files
 %defattr(-,root,root,-)
 %doc gpl.txt
+%if "%{tde_version}" == "14.1.0"
 %{_bindir}/cardpincheck
 %{_bindir}/cryptosmartcard.sh
 %{_datadir}/initramfs-tools/
+%else
+%dir %{_sysconfdir}/init
+%{_sysconfdir}/init/smartauthlogin.conf
+%{_sysconfdir}/smartauth/
+%{tde_bindir}/cryptosmartcard.sh
+%{tde_bindir}/scriptor.pl
+%{tde_bindir}/setupcard.sh
+%{tde_bindir}/setupslavecard.sh
+%{tde_bindir}/smartauth.sh
+%{tde_bindir}/smartauthckpasswd
+%{tde_bindir}/smartauthmon
+%{tde_datadir}/applications/smartcardauth.desktop
+%{tde_datadir}/applications/smartcardrestrict.desktop
+%{tde_datadir}/icons/hicolor/16x16/apps/smartcardauth.png
+%{tde_datadir}/icons/hicolor/32x32/apps/smartcardauth.png
+%{tde_datadir}/initramfs-tools/
+%endif
 
 
 %changelog