summaryrefslogtreecommitdiffstats
path: root/redhat/applications/smartcardauth
diff options
context:
space:
mode:
authorFrançois Andriot <albator78@libertysurf.fr>2021-01-30 14:34:02 +0100
committerFrançois Andriot <albator78@libertysurf.fr>2021-01-30 22:29:41 +0100
commit6581dc50b83f203d65eac61c00a159ab2a6ddb5d (patch)
tree85c02d38ca9dcedc28798ee41c4b16ec7260e9bc /redhat/applications/smartcardauth
parent87e57a1a070839a44db16a0410ef57902db2df3e (diff)
downloadtde-packaging-6581dc50b83f203d65eac61c00a159ab2a6ddb5d.tar.gz
tde-packaging-6581dc50b83f203d65eac61c00a159ab2a6ddb5d.zip
RPM: massive update and cleanup
Diffstat (limited to 'redhat/applications/smartcardauth')
-rw-r--r--redhat/applications/smartcardauth/smartcardauth-3.5.13.2.spec138
-rw-r--r--redhat/applications/smartcardauth/smartcardauth.spec (renamed from redhat/applications/smartcardauth/smartcardauth-14.0.0.spec)85
2 files changed, 47 insertions, 176 deletions
diff --git a/redhat/applications/smartcardauth/smartcardauth-3.5.13.2.spec b/redhat/applications/smartcardauth/smartcardauth-3.5.13.2.spec
deleted file mode 100644
index 18d214b2c..000000000
--- a/redhat/applications/smartcardauth/smartcardauth-3.5.13.2.spec
+++ /dev/null
@@ -1,138 +0,0 @@
-# Default version for this component
-%define tde_pkg smartcardauth
-%define tde_version 3.5.13.2
-
-# TDE specific building variables
-%define tde_bindir %{tde_prefix}/bin
-%define tde_datadir %{tde_prefix}/share
-%define tde_docdir %{tde_datadir}/doc
-%define tde_includedir %{tde_prefix}/include
-%define tde_libdir %{tde_prefix}/%{_lib}
-%define tde_mandir %{tde_datadir}/man
-%define tde_appdir %{tde_datadir}/applications
-
-%define tde_tdeappdir %{tde_appdir}/kde
-%define tde_tdedocdir %{tde_docdir}/tde
-%define tde_tdeincludedir %{tde_includedir}/tde
-%define tde_tdelibdir %{tde_libdir}/trinity
-
-%define _docdir %{tde_tdedocdir}
-
-
-Name: trinity-%{tde_pkg}
-Summary: SmartCard Login and LUKS Decrypt, Setup Utility
-Version: 1.0
-Release: %{?!preversion:4}%{?preversion:3_%{preversion}}%{?dist}
-
-License: GPLv2+
-Group: Applications/System
-
-Vendor: Trinity Project
-Packager: Francois Andriot <francois.andriot@free.fr>
-URL: http://www.trinitydesktop.org/
-
-Prefix: %{tde_prefix}
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-Source0: %{name}-%{tde_version}%{?preversion:~%{preversion}}.tar.gz
-
-BuildRequires: trinity-tqtinterface-devel >= %{tde_version}
-BuildRequires: trinity-arts-devel >= 1:1.5.10
-BuildRequires: trinity-tdelibs-devel >= %{tde_version}
-BuildRequires: trinity-tdebase-devel >= %{tde_version}
-BuildRequires: desktop-file-utils
-
-#BuildRequires: perl-PAR-Packer
-%if 0%{?mgaversion} || 0%{?mdkversion}
-Requires: perl-pcsc-perl
-%endif
-%if 0%{?rhel} || 0%{?fedora}
-Requires: pcsc-perl
-%endif
-%if 0%{?suse_version}
-Requires: perl-pcsc
-%endif
-
-%description
-This utility will allow you to set up your computer to accept a SmartCard as an authentication source for:
-- Your encrypted LUKS partition
-- TDE3.x, including automatic login, lock, and unlock features
-
-It is designed to work with any ISO 7816-1,2,3,4 compliant smartcard
-Examples of such cards are:
-- The Schlumberger MultiFlex
-- The ACS ACOS5 / ACOS6 series of cryptographic ISO 7816 cards
-
-If a card is chosen that has PKSC support, such as the ACOS cards, this utility can run
-simultaneously with the certificate reading program(s) to provide single sign on
-in addition to the PKCS certificate functionality
-
-
-%if 0%{?suse_version} || 0%{?pclinuxos}
-%debug_package
-%endif
-
-
-%prep
-%setup -q -n %{name}-%{tde_version}%{?preversion:~%{preversion}}
-
-%__sed -i "Makefile" \
- -e "s|/usr/lib/perl5/Chipcard|%{_libdir}/perl5/vendor_perl/Chipcard|g"
-
-
-%build
-export PATH="%{tde_bindir}:${PATH}"
-
-./build_ckpasswd
-
-
-%install
-export PATH="%{tde_bindir}:${PATH}"
-%__rm -rf %{buildroot}
-
-%__install -D -m 755 scriptor_standalone.pl %{buildroot}%{tde_bindir}/scriptor.pl
-%__install -D -m 755 src/ckpasswd %{buildroot}%{tde_bindir}/smartauthckpasswd
-#%__install -D -m 755 src/ckpasswd %{buildroot}%{tde_bindir}/smartauthmon
-%__ln_s smartauthckpasswd %{buildroot}%{tde_bindir}/smartauthmon
-%__cp -Rp usr/* %{buildroot}%{tde_prefix}
-
-%__mkdir_p %{buildroot}%{_sysconfdir}
-%__cp -Rp etc/* %{buildroot}%{_sysconfdir}
-
-
-%clean
-%__rm -rf %{buildroot}
-
-
-%post
-update-desktop-database %{tde_appdir} > /dev/null
-touch --no-create %{tde_datadir}/icons/hicolor || :
-gtk-update-icon-cache --quiet %{tde_datadir}/icons/hicolor || :
-
-%postun
-update-desktop-database %{tde_appdir} > /dev/null
-touch --no-create %{tde_datadir}/icons/hicolor || :
-gtk-update-icon-cache --quiet %{tde_datadir}/icons/hicolor || :
-
-
-%files
-%defattr(-,root,root,-)
-%doc gpl.txt
-%{_sysconfdir}/init/smartauthlogin.conf
-%{_sysconfdir}/smartauth/smartauth.sh.in
-%{_sysconfdir}/smartauth/smartauthmon.sh.in
-%{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/hooks/cryptlukssc
-
-
-%changelog
diff --git a/redhat/applications/smartcardauth/smartcardauth-14.0.0.spec b/redhat/applications/smartcardauth/smartcardauth.spec
index 27ed4338c..15e037274 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.1.0
%endif
%define tde_pkg smartcardauth
%define tde_prefix /opt/trinity
@@ -33,10 +33,11 @@
%define tde_tdeincludedir %{tde_includedir}/tde
%define tde_tdelibdir %{tde_libdir}/trinity
-%if 0%{?fedora} >= 27
+%if 0%{?fedora} >= 27 || 0%{?mgaversion}
%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} || 0%{?pclinuxos}
Requires: perl-pcsc-perl
%endif
%if 0%{?rhel} || 0%{?fedora}
@@ -105,12 +104,8 @@ 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
BuildRequires: db5-devel
%endif
-%endif
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
BuildRequires: libdb-devel
BuildRequires: libdb-cxx-devel
@@ -133,6 +128,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,27 +160,52 @@ 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 ! 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
+%if 0%{?suse_version}
+ -DPERL_LIB_CHIPCARD="%{perl_vendorarch}" \
+%endif
+ \
+ -DBUILD_ALL=ON \
+ -DBUILD_DOC=ON \
+ -DBUILD_TRANSLATIONS=ON \
+ \
+ ..
+
+%__make %{?_smp_mflags} || %__make
%install
export PATH="%{tde_bindir}:${PATH}"
%__rm -rf %{buildroot}
+%__make install DESTDIR="%{?buildroot}" -C build
-%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}"
-
-echo "OnlyShowIn=TDE;" >>"%{?buildroot}%{_datadir}/applications/smartcardauth.desktop"
-echo "OnlyShowIn=TDE;" >>"%{?buildroot}%{_datadir}/applications/smartcardrestrict.desktop"
-%endif
+# Debian stuff
+%__rm -f %{buildroot}/usr/share/initramfs-tools/hooks/cryptlukssc
%clean
@@ -192,22 +215,8 @@ echo "OnlyShowIn=TDE;" >>"%{?buildroot}%{_datadir}/applications/smartcardrestric
%files
%defattr(-,root,root,-)
%doc gpl.txt
-%{_bindir}/cryptosmartcard.sh
-%{_datadir}/initramfs-tools/
-%if "%{tde_version}" == "14.1.0"
%{_bindir}/cardpincheck
-%else
-%{_bindir}/scriptor.pl
-%{_bindir}/setupcard.sh
-%{_bindir}/setupslavecard.sh
-%{_bindir}/smartauth.sh
-%{_bindir}/smartauthckpasswd
-%{_bindir}/smartauthmon
-%{_datadir}/applications/smartcardauth.desktop
-%{_datadir}/applications/smartcardrestrict.desktop
-%{_datadir}/icons/hicolor/16x16/apps/smartcardauth.png
-%{_datadir}/icons/hicolor/32x32/apps/smartcardauth.png
-%endif
+%{_bindir}/cryptosmartcard.sh
%changelog