aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Lloro <ivan.lloro.boada@gmail.com>2024-06-30 01:15:05 +0200
committerIvan Lloro <ivan.lloro.boada@gmail.com>2024-06-30 01:15:05 +0200
commit61a82d3cd7fdd5377109a24188ec93be63753b17 (patch)
tree5e00e590dfb107be99738507d4320a5208734cda /app-crypt
parentapp-crypt/autofirma: Included fallback method for automatically downloading s... (diff)
downloadguru-61a82d3cd7fdd5377109a24188ec93be63753b17.tar.gz
guru-61a82d3cd7fdd5377109a24188ec93be63753b17.tar.bz2
guru-61a82d3cd7fdd5377109a24188ec93be63753b17.zip
app-crypt/autofirma: Avoid downloading source file if available in DISTDIR, make the ebuild compatible for same version revisions, and minor QA improvements.
Signed-off-by: Ivan Lloro <ivan.lloro.boada@gmail.com>
Diffstat (limited to 'app-crypt')
-rw-r--r--app-crypt/autofirma/autofirma-1.8.3.ebuild15
1 files changed, 10 insertions, 5 deletions
diff --git a/app-crypt/autofirma/autofirma-1.8.3.ebuild b/app-crypt/autofirma/autofirma-1.8.3.ebuild
index f9d8c773f..89b649368 100644
--- a/app-crypt/autofirma/autofirma-1.8.3.ebuild
+++ b/app-crypt/autofirma/autofirma-1.8.3.ebuild
@@ -13,7 +13,7 @@ HOMEPAGE="
# Upstream blocks wget with no User Agent. It can be addressed globally (see https://wiki.gentoo.org/wiki/FETCHCOMMAND).
# If Gentoo's default configuration is in place, pkg_pretend() and pkg_nofetch() provide fallback options.
-SRC_URI="https://estaticos.redsara.es/comunes/autofirma/$(ver_rs 1- /)/AutoFirma_Linux_Fedora.zip -> ${P}.zip"
+SRC_URI="https://estaticos.redsara.es/comunes/autofirma/$(ver_rs 1- /)/AutoFirma_Linux_Fedora.zip -> ${PF}.zip"
S=${WORKDIR}
@@ -22,18 +22,23 @@ SLOT="0"
KEYWORDS="~amd64"
RDEPEND="virtual/jre:1.8"
-BDEPEND="app-arch/unzip"
+BDEPEND="
+ app-arch/unzip
+ net-misc/wget
+"
pkg_pretend() {
# Upstream blocks vanilla wget, so we set up a browser User-Agent as a fallback.
- URI="https://estaticos.redsara.es/comunes/autofirma/$(ver_rs 1- /)/AutoFirma_Linux_Fedora.zip"
- /usr/sbin/wget --user-agent="Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0" "${URI}" -O "${PORTAGE_ACTUAL_DISTDIR}"/"${P}".zip
+ local URI="https://estaticos.redsara.es/comunes/autofirma/$(ver_rs 1- /)/AutoFirma_Linux_Fedora.zip"
+ local USER_AGENT="Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0"
+ local DISTFILE="${PORTAGE_ACTUAL_DISTDIR}/${PF}.zip"
+ [ -f "${DISTFILE}" ] || /usr/sbin/wget --user-agent="${USER_AGENT}" "${URI}" -O "${DISTFILE}"
}
pkg_nofetch() {
einfo "Please download:"
einfo " https://estaticos.redsara.es/comunes/autofirma/$(ver_rs 1- /)/AutoFirma_Linux_Fedora.zip"
- einfo "and move it to your distfiles directory as autofirma-${PV}.zip."
+ einfo "and move it to ${PORTAGE_ACTUAL_DISTDIR}/${PF}.zip."
}
src_unpack() {