summaryrefslogtreecommitdiff
path: root/app-crypt/autofirma-bin/autofirma-bin-1.9.0.ebuild
blob: ab8e3fc96fa37f8d9accee99e4cdc069c98bbecf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

RPM_COMPRESS_TYPE=zstd
inherit rpm xdg

DESCRIPTION="Spanish government certificate and digital signature manager"
HOMEPAGE="https://administracionelectronica.gob.es/ctt/verPestanaGeneral.htm?idIniciativa=clienteafirma
	https://github.com/ctt-gob-es/clienteafirma"

# Upstream blocks wget, so we need a fallback option
SRC_URI="
	https://estaticos.redsara.es/comunes/autofirma/$(ver_rs 1- /)/Autofirma_Linux_Fedora.zip -> ${P}.zip
	https://dev.gentoo.org/~pacho/${PN}/${P}.zip
"
S="${WORKDIR}"

LICENSE="|| ( GPL-2 EUPL-1.1 )"
SLOT="0"
KEYWORDS="~amd64"

RDEPEND="
	dev-libs/nss[utils]
	virtual/jre:17
"
BDEPEND="app-arch/unzip"

QA_PREBUILT="*"

src_unpack() {
	default
	rpm_unpack ./${PN/-bin}-$(ver_cut 1-2)-1.noarch_FEDORA.rpm
	rm -r "${S}/usr/share/licenses" || die
}

src_install() {
	dodir /
	cd "${ED}" || die
	mv "${S}"/usr . || die

	# Fix .desktop file
	sed -i -e '/Version/d' \
		"${ED}"/usr/share/applications/${PN/-bin}.desktop || die
	sed -i -e 's/Utilities/X-Utilities/g' \
		"${ED}"/usr/share/applications/${PN/-bin}.desktop || die
	sed -i -e 's/Signature/X-Signature/g' \
		"${ED}"/usr/share/applications/${PN/-bin}.desktop || die
}