summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXZS2016-05-12 01:14:42 +0200
committerXZS2016-05-12 01:14:42 +0200
commitb6cd9bc84c0f038acfea94d39734cda0c1ac227d (patch)
tree4734906b24e1ac43727213399bf900fb8132e36e
parentd514088aff54fe53be8630f0212fb5c5cc3ec9d9 (diff)
downloadaur-b6cd9bc84c0f038acfea94d39734cda0c1ac227d.tar.gz
derive URL from extension name
The description page for the Add-On follows a similar naming scheme as the download link, so it can be automatically composed, too. Only doing so when the $url is not yet set takes into account that the Add-Ons may get a dedicated web page in the future. The conditional would not be necessary as long as the $url would then be overwritten afterwards. Nonetheless, it allows ordering the PKGBUILD in an usual fashion: Automatic composition of values is semantically more suited to be placed amongst the part of the PKGBUILD where prepare, build, package and related functions are collected while the simple value assignment belongs into the earlier block defining variables.
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD2
2 files changed, 2 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 44d8c3b164b8..099f21a65c8a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -2,7 +2,7 @@ pkgbase = firefox-theme-ft-deepdark
pkgdesc = Smooth dark theme for Firefox
pkgver = 14.0.3
pkgrel = 1
- url = https://addons.mozilla.org/en-us/firefox/addon/ft-deepdark/
+ url = https://addons.mozilla.org/firefox/addon/ft-deepdark/
arch = any
license = custom:noncommercial
makedepends = unzip
diff --git a/PKGBUILD b/PKGBUILD
index 99d54df32d3c..bc5b592c08cf 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,6 @@ pkgname=firefox-theme-ft-deepdark
pkgver=14.0.3
pkgrel=1
pkgdesc='Smooth dark theme for Firefox'
-url='https://addons.mozilla.org/en-us/firefox/addon/ft-deepdark/'
license=('custom:noncommercial')
md5sums=('6bd4cf826aae34f9fbcce6a2949ddf29')
@@ -16,6 +15,7 @@ source+=(
"${pkgname}.zip::https://addons.mozilla.org/firefox/downloads/latest/${_extname=${pkgname#*-*-}}/platform:2/"
".version::https://services.addons.mozilla.org/firefox/api/1.5/addon/$_extname"
)
+[ ${url++} ] || url="https://addons.mozilla.org/${pkgname%%-*}/addon/$_extname/"
md5sums+=('SKIP')
noextract+=("${pkgname}.zip")
makedepends+=(unzip)