summaryrefslogtreecommitdiffstats
path: root/redhat/applications/smartcardauth
diff options
context:
space:
mode:
authorFrançois Andriot <albator78@libertysurf.fr>2019-11-03 11:03:22 +0100
committerFrançois Andriot <albator78@libertysurf.fr>2019-11-03 11:16:56 +0100
commitcd8eb9fd74fafb2435bc1f878cbb2bc91f52d859 (patch)
tree51c7e8b06b5c920736585ff8dbead62834875859 /redhat/applications/smartcardauth
parent411aad4790a5b19fe3f927c4dffd18116fe4db16 (diff)
downloadtde-packaging-cd8eb9fd74fafb2435bc1f878cbb2bc91f52d859.tar.gz
tde-packaging-cd8eb9fd74fafb2435bc1f878cbb2bc91f52d859.zip
RPM: update spec files for TDE 14.0.7
Diffstat (limited to 'redhat/applications/smartcardauth')
-rw-r--r--redhat/applications/smartcardauth/smartcardauth.spec (renamed from redhat/applications/smartcardauth/smartcardauth-14.0.0.spec)80
1 files changed, 51 insertions, 29 deletions
diff --git a/redhat/applications/smartcardauth/smartcardauth-14.0.0.spec b/redhat/applications/smartcardauth/smartcardauth.spec
index 8c9d3fc8c..072d5b6c7 100644
--- a/redhat/applications/smartcardauth/smartcardauth-14.0.0.spec
+++ b/redhat/applications/smartcardauth/smartcardauth.spec
@@ -18,7 +18,7 @@
# TDE variables
%define tde_epoch 2
%if "%{?tde_version}" == ""
-%define tde_version 14.0.0
+%define tde_version 14.0.7
%endif
%define tde_pkg smartcardauth
%define tde_prefix /opt/trinity
@@ -37,6 +37,7 @@
%define debug_package %{nil}
%endif
+%define dont_check_desktop_files 1
Name: trinity-%{tde_pkg}
Epoch: %{tde_epoch}
@@ -65,7 +66,7 @@ BuildRequires: trinity-tdelibs-devel >= %{tde_version}
BuildRequires: trinity-tdebase-devel >= %{tde_version}
BuildRequires: desktop-file-utils
-BuildRequires: autoconf automake libtool m4
+BuildRequires: cmake >= 2.8
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: fdupes
@@ -80,10 +81,8 @@ BuildRequires: update-desktop-files
BuildRequires: brp-check-trinity
%endif
-#BuildRequires: perl-PAR-Packer
-
# PCSC support
-%if 0%{?mgaversion} || 0%{?mdkversion}
+%if 0%{?mgaversion} || 0%{?mdkversion} || 9%{?pclinuxos}
Requires: perl-pcsc-perl
%endif
%if 0%{?rhel} || 0%{?fedora}
@@ -105,11 +104,11 @@ BuildRequires: pkcs11-helper-devel
%if 0%{?rhel} || 0%{?fedora} || 0%{?suse_version} >= 1220 || 0%{?mdkversion} || 0%{?mgaversion}
%define with_db 1
%if 0%{?mgaversion} || 0%{?mdkversion}
-%if 0%{?pclinuxos}
-BuildRequires: db4-devel
-%else
+#%if 0%{?pclinuxos}
+#BuildRequires: db4-devel
+#%else
BuildRequires: db5-devel
-%endif
+#%endif
%endif
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
BuildRequires: libdb-devel
@@ -133,6 +132,9 @@ BuildRequires: libgnutls-devel
BuildRequires: gnutls-devel
%endif
+# The 'pp' utility
+BuildRequires: perl-PAR-Packer
+
%description
This utility will allow you to set up your computer to accept a SmartCard as an authentication source for:
@@ -162,28 +164,50 @@ in addition to the PKCS certificate functionality
%build
+unset QTDIR QTINC QTLIB
export PATH="%{tde_bindir}:${PATH}"
-cd src
-make CFLAGS="${RPM_OPT_FLAGS}" CXXFLAGS="${RPM_OPT_FLAGS}"
+if [ -x "%{_libdir}/nss/unsupported-tools/pp" ]; then
+ PATH="%{_libdir}/nss/unsupported-tools:${PATH}"
+fi
+
+if ! rpm -E %%cmake|grep -q "cd build"; then
+ %__mkdir_p build
+ cd build
+fi
+
+%cmake \
+ -DCMAKE_BUILD_TYPE="RelWithDebInfo" \
+ -DCMAKE_C_FLAGS="${RPM_OPT_FLAGS} -DNDEBUG" \
+ -DCMAKE_CXX_FLAGS="${RPM_OPT_FLAGS} -DNDEBUG" \
+ -DCMAKE_SKIP_RPATH=OFF \
+ -DCMAKE_VERBOSE_MAKEFILE=ON \
+ -DWITH_GCC_VISIBILITY=OFF \
+ \
+ -DCMAKE_INSTALL_PREFIX="%{_prefix}" \
+ \
+ -DWITH_ALL_OPTIONS=ON \
+ -DWITH_GCC_VISIBILITY=ON \
+%if 0%{?mgaversion} || 0%{?pclinuxos}
+ -DPERL_PAR_PACKER="pp.pl" \
+%endif
+%if 0%{?mgaversion} == 6 || 0%{?pclinuxos}
+ -DPERL_LIB_CHIPCARD="%{perl_sitearch}" \
+%endif
+ \
+ -DBUILD_ALL=ON \
+ -DBUILD_DOC=ON \
+ -DBUILD_TRANSLATIONS=ON \
+ \
+ ..
+
+%__make %{?_smp_mflags} || %__make
%install
export PATH="%{tde_bindir}:${PATH}"
%__rm -rf %{buildroot}
-
-%if "%{tde_version}" == "14.1.0"
-%__make install DESTDIR="%{?buildroot}"
-%else
-%__install -D -m 755 "scriptor_standalone.pl" "%{buildroot}%{_bindir}/scriptor.pl"
-%__install -D -m 755 "src/ckpasswd" "%{buildroot}%{_bindir}/smartauthckpasswd"
-%__ln_s "smartauthckpasswd" "%{buildroot}%{_bindir}/smartauthmon"
-%__cp -Rp "usr/"* "%{buildroot}%{_prefix}"
-
-sed -i "%{?buildroot}%{_datadir}/applications/"*".desktop" -e "/^Categories/ s|TDE|X-TDE|"
-echo "OnlyShowIn=TDE;" >>"%{?buildroot}%{_datadir}/applications/smartcardauth.desktop"
-echo "OnlyShowIn=TDE;" >>"%{?buildroot}%{_datadir}/applications/smartcardrestrict.desktop"
-%endif
+%__make install DESTDIR="%{?buildroot}" -C build
%clean
@@ -195,10 +219,7 @@ echo "OnlyShowIn=TDE;" >>"%{?buildroot}%{_datadir}/applications/smartcardrestric
%doc gpl.txt
%{_bindir}/cryptosmartcard.sh
%{_datadir}/initramfs-tools/
-%if "%{tde_version}" == "14.1.0"
-%{_bindir}/cardpincheck
-%else
-%{_bindir}/scriptor.pl
+%{_bindir}/scriptor_standalone
%{_bindir}/setupcard.sh
%{_bindir}/setupslavecard.sh
%{_bindir}/smartauth.sh
@@ -208,7 +229,8 @@ echo "OnlyShowIn=TDE;" >>"%{?buildroot}%{_datadir}/applications/smartcardrestric
%{_datadir}/applications/smartcardrestrict.desktop
%{_datadir}/icons/hicolor/16x16/apps/smartcardauth.png
%{_datadir}/icons/hicolor/32x32/apps/smartcardauth.png
-%endif
+%{_sysconfdir}/smartauth/
+%{_sysconfdir}/init/smartauthlogin.conf
%changelog