From ed7f86dc2e816841071737b370e1cf4e70e8387d Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Tue, 22 Sep 2026 06:25:11 -0300
Subject: RPM smartcardauth: update packaging for TDE master
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

RPM smartcardauth: update packaging for TDE master

Consolidate the final validated packaging changes for smartcardauth from the Tumbleweed build series.

Original commits represented: 2.

Signed-off-by: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
---
 .../system/smartcardauth/smartcardauth.spec        | 59 +++-------------------
 1 file changed, 7 insertions(+), 52 deletions(-)

diff --git a/redhat/applications/system/smartcardauth/smartcardauth.spec b/redhat/applications/system/smartcardauth/smartcardauth.spec
index 0bb7cda1f..d4735f5a8 100644
--- a/redhat/applications/system/smartcardauth/smartcardauth.spec
+++ b/redhat/applications/system/smartcardauth/smartcardauth.spec
@@ -63,23 +63,10 @@ Source0:		%{name}-%{tde_version}%{?preversion:~%{preversion}}.tar.gz
 Source1:		trinity-%{tde_pkg}-rpmlintrc
 
 BuildRequires:	trinity-tdelibs-devel >= %{tde_version}
-BuildRequires:	trinity-tdebase-devel >= %{tde_version}
-BuildRequires:	desktop-file-utils
 
 BuildRequires:	trinity-tde-cmake >= %{tde_version}
 BuildRequires:	gcc-c++
 BuildRequires:	pkgconfig
-BuildRequires:	fdupes
-
-# SUSE desktop files utility
-%if 0%{?suse_version}
-BuildRequires:	update-desktop-files
-%endif
-
-%if 0%{?opensuse_bs} && 0%{?suse_version}
-# for xdg-menu script
-BuildRequires:	brp-check-trinity
-%endif
 
 # PCSC support
 %if 0%{?mgaversion} || 0%{?mdkversion} || 0%{?pclinuxos}
@@ -100,27 +87,6 @@ BuildRequires:	%{_lib}pkcs11-helper-devel
 BuildRequires:	pkcs11-helper-devel
 %endif
 
-# DB4/DB5 support
-%if 0%{?rhel} || 0%{?fedora} || 0%{?suse_version} >= 1220 || 0%{?mdkversion} || 0%{?mgaversion}
-%define with_db 1
-%if 0%{?mgaversion} || 0%{?mdkversion}
-BuildRequires:  db5-devel
-%endif
-%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
-BuildRequires:  libdb-devel
-BuildRequires:  libdb-cxx-devel
-%endif
-%if 0%{?suse_version}
-BuildRequires:  libdb-4_8-devel
-%endif
-%if 0%{?rhel} && 0%{?rhel} <= 6
-BuildRequires:  db4-devel
-%endif
-%endif
-
-# PAM support
-BuildRequires:	pam-devel
-
 # TLS support
 %if 0%{?suse_version}
 BuildRequires:	libgnutls-devel
@@ -128,8 +94,11 @@ BuildRequires:	libgnutls-devel
 BuildRequires:	gnutls-devel
 %endif
 
-# The 'pp' utility
-BuildRequires:	perl-PAR-Packer
+BuildRequires:	libopenssl-devel
+
+Requires:	initramfs-tools
+Requires:	opensc
+Requires:	pcsc-lite
 
 
 %description
@@ -163,11 +132,6 @@ in addition to the PKCS certificate functionality
 unset QTDIR QTINC QTLIB
 export PATH="%{tde_bindir}:${PATH}"
 
-if ! rpm -E %%cmake|grep -e 'cd build\|cd ${CMAKE_BUILD_DIR:-build}'; then
-  %__mkdir_p build
-  cd build
-fi
-
 %cmake \
   -DCMAKE_BUILD_TYPE="RelWithDebInfo" \
   -DCMAKE_C_FLAGS="${RPM_OPT_FLAGS}" \
@@ -193,9 +157,7 @@ fi
   \
   -DBUILD_ALL=ON \
   -DBUILD_DOC=ON \
-  -DBUILD_TRANSLATIONS=ON \
-  \
-  ..
+  -DBUILD_TRANSLATIONS=ON
 
 %__make %{?_smp_mflags} || %__make
 
@@ -205,19 +167,12 @@ export PATH="%{tde_bindir}:${PATH}"
 %__rm -rf %{buildroot}
 %__make install DESTDIR="%{?buildroot}" -C build
 
-# Debian stuff
-%__rm -f %{buildroot}/usr/share/initramfs-tools/hooks/cryptlukssc
-
-
-%clean
-%__rm -rf %{buildroot}
-
-
 %files
 %defattr(-,root,root,-)
 %doc gpl.txt
 %{_bindir}/cardpincheck
 %{_bindir}/cryptosmartcard.sh
+%{_datadir}/initramfs-tools/hooks/cryptlukssc
 
 
 %changelog
-- 
cgit v1.2.3

