commit:     30b5af1d5bca756332361ed9a58a8ff8b852ea4b
Author:     Adrian Ratiu <adrian.ratiu <AT> collabora <DOT> com>
AuthorDate: Sun May  5 22:58:04 2024 +0000
Commit:     Adrian Ratiu <adrian.ratiu <AT> collabora <DOT> com>
CommitDate: Sun May  5 23:06:41 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=30b5af1d

app-crypt/sac-core: add new ebuild

SafeNet Authentication Client is a widely used middleware for
qualified digital certificates and other auth mechanisms for
EU government services.

Unfortunately it is not open source, however it integrates
well with pcslite and ccid and is useable for proving gov id
for various services.

Signed-off-by: Adrian Ratiu <adrian.ratiu <AT> collabora.com>

 app-crypt/sac-core/Manifest                        |  1 +
 .../files/safenetauthenticationclient.service      |  8 +++
 app-crypt/sac-core/metadata.xml                    | 17 +++++
 app-crypt/sac-core/sac-core-10.8.1050.ebuild       | 73 ++++++++++++++++++++++
 4 files changed, 99 insertions(+)

diff --git a/app-crypt/sac-core/Manifest b/app-crypt/sac-core/Manifest
new file mode 100644
index 0000000000..f27558e4ee
--- /dev/null
+++ b/app-crypt/sac-core/Manifest
@@ -0,0 +1 @@
+DIST SAC_Linux_10.8.105_R1_GA.zip 118355633 BLAKE2B 
19040c84e10290f64b9225a7e093ff86f4b2e6dbf0dae2798526fecf754daf39c74db6dc257a4d90b4fac8a536c1707cde4458b4905f826d84ad2e03f3583f8e
 SHA512 
6f3fac16a73f0d1074abf59039e4efea7dfb07193b24e24bf3944a7b2779c00d74c4e9471fa39571701c3694c2e4260ff9d7792ddfdbae8b6a5337dcf3ac7634

diff --git a/app-crypt/sac-core/files/safenetauthenticationclient.service 
b/app-crypt/sac-core/files/safenetauthenticationclient.service
new file mode 100644
index 0000000000..1bbed78053
--- /dev/null
+++ b/app-crypt/sac-core/files/safenetauthenticationclient.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Thales eToken SACSrv daemon
+
+[Service]
+ExecStart=/usr/bin/SACSrv
+
+[Install]
+WantedBy=multi-user.target

diff --git a/app-crypt/sac-core/metadata.xml b/app-crypt/sac-core/metadata.xml
new file mode 100644
index 0000000000..2fc7dcd221
--- /dev/null
+++ b/app-crypt/sac-core/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+  <longdescription>
+    SAC is a Public Key Infrastructure (PKI) middleware that provides a secure
+    method for exchanging information based on public key cryptography, 
enabling
+    trusted third-party verification of user identities.
+
+    It utilizes a system of digital certificates, Certificate Authorities, and
+    other registration authorities that verify and authenticate the validity of
+    each party involved in an internet transaction.
+  </longdescription>
+  <maintainer type="person">
+    <name>Adrian Ratiu</name>
+    <email>adrian.ra...@collabora.com</email>
+  </maintainer>
+</pkgmetadata>

diff --git a/app-crypt/sac-core/sac-core-10.8.1050.ebuild 
b/app-crypt/sac-core/sac-core-10.8.1050.ebuild
new file mode 100644
index 0000000000..65c5d5cb20
--- /dev/null
+++ b/app-crypt/sac-core/sac-core-10.8.1050.ebuild
@@ -0,0 +1,73 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Thales/Gemalto SafeNet Authentication Client for eToken 5110/5300 
& IDPrime (core PKCS#11 modules)"
+
+SRC_URI="https://nullroute.lt/tmp/2023/pkg/SAC_Linux_10.8.105_R1_GA.zip";
+
+HOMEPAGE="https://cpl.thalesgroup.com/access-management/security-applications/authentication-client-token-management";
+# see usr/share/doc copyright file
+LICENSE="no-source-code EULA"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+ssl"
+
+# binaries are already stripped
+RESTRICT="strip"
+
+inherit systemd
+
+RDEPEND="
+       dev-libs/openssl
+       sys-apps/pcsc-lite
+       app-crypt/ccid
+       virtual/libusb:0
+       ssl? ( dev-libs/libp11 )
+"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"
+
+src_unpack() {
+       default
+
+       cd "$S" || die
+
+       unpack "SAC Linux ${PV} R1 
GA/Installation/withoutUI/Ubuntu-2204/safenetauthenticationclient-core_${PV}_amd64.deb"
 || die
+       unpack "./data.tar.gz" || die
+}
+
+src_install() {
+       # v10.8 is 64bit only, so move to the proper libdir
+       mv usr/lib usr/$(get_libdir) || die
+
+       # libs are not marked as executable
+       chmod 755 usr/$(get_libdir)/lib*.${PV} || die
+
+       # move docs to proper location
+       mkdir -p "usr/share/doc/${PF}" || die
+       mv usr/share/doc/safenetauthenticationclient-core 
"usr/share/doc/${PF}/" || die
+
+       # exclude already compressed file from compression
+       docompress -x 
"/usr/share/doc/${PF}/safenetauthenticationclient-core/changelog.gz" || die
+
+       # Create missing SONAME symlinks
+       ln -s libSACLog.so.${PV} "usr/$(get_libdir)/libSACLog.so.10" || die
+       ln -s libeTokenHID.so.${PV} "usr/$(get_libdir)/libeTokenHID.so.10" || 
die
+       ln -s libIDPrimePKCS11.so.${PV} 
"usr/$(get_libdir)/libIDPrimePKCS11.so.10" || die
+       ln -s libIDPrimeTokenEngine.so.${PV} 
"usr/$(get_libdir)/libIDPrimeTokenEngine.so.10" || die
+       ln -s libIDClassicSISTokenEngine.so.${PV} 
"usr/$(get_libdir)/libIDClassicSISTokenEngine.so.10" || die
+       ln -s libIDPrimeSISTokenEngine.so.${PV} 
"usr/$(get_libdir)/libIDPrimeSISTokenEngine.so.10" || die
+
+       mv usr/ "${D}/" || die
+       mv etc/ "${D}/" || die
+
+       systemd_dounit "${FILESDIR}/safenetauthenticationclient.service"
+}
+
+pkg_posintst() {
+       einfo "To allow pcscd access to usb devices:"
+       einfo "usermod -aG usb pcscd"
+}

Reply via email to