From 1a3660cb3f43492a6c457b95d96e400cc3248483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= Date: Sun, 16 Oct 2016 11:51:52 +0200 Subject: [PATCH] RPM packaging: fix smartcardauth r14.0.x build --- .../smartcardauth/smartcardauth-14.0.0.spec | 41 +++++++++++++++++-- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/redhat/applications/smartcardauth/smartcardauth-14.0.0.spec b/redhat/applications/smartcardauth/smartcardauth-14.0.0.spec index 8c1806c7a..a4d2fd74f 100644 --- a/redhat/applications/smartcardauth/smartcardauth-14.0.0.spec +++ b/redhat/applications/smartcardauth/smartcardauth-14.0.0.spec @@ -56,7 +56,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 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 @@ BuildRequires: pam-devel # 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 @@ in addition to the PKCS certificate functionality %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 @@ export PATH="%{tde_bindir}:${PATH}" %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