summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authordeusstultus2016-04-05 11:34:07 -0500
committerdeusstultus2016-04-05 11:34:07 -0500
commit691f41a9a473688b506a09d662cf6cb438757d10 (patch)
tree643350244a1918f54511bc71539960f90c486577 /PKGBUILD
parent8ecf526a1fcd24872565973c6e83c2d9a649857b (diff)
downloadaur-xflux.tar.gz
pkgrel to 5. Reworked license verification
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD16
1 files changed, 12 insertions, 4 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 25ac4f528fe9..aa886760dba6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@
pkgname=xflux
pkgver=20130901
-pkgrel=4
+pkgrel=5
pkgdesc="(f.lux for X) Changes monitor color temperature adaptively to ease eye strain (command-line version)"
arch=('i686' 'x86_64')
url="https://justgetflux.com/"
@@ -16,14 +16,22 @@ depends_x86_64=('gcc-libs')
source=('f.lux-eula.txt' 'f.lux-eula.html::https://justgetflux.com/news/pages/eula/index.html')
source_i686=('https://justgetflux.com/linux/xflux-pre.tgz')
source_x86_64=('https://justgetflux.com/linux/xflux64.tgz')
-sha256sums=('1d989851f6f02a2eb280faec1e3bbb348ba9a5d1677da22fa89dfc02cb063030'
- 'cc092411b8edbd2158436ffad45bafc03d9ff1eb1b2be31659bf7308c2c33b26')
+sha256sums=('05b1edc619263941960f37ebce2cf63baabdd5959a287b52b6829b7195d20653'
+ 'SKIP') #Verified through prepare() rather than sums as websites change
sha256sums_i686=('fda5d10c3ca16ba38eddc5fbdecebeccd607c4c95787b4379d1ab372760877b4')
sha256sums_x86_64=('cc50158fabaeee58c331f006cc1c08fd2940a126e99d37b76c8e878ef20c2021')
#EULA compliance
prepare() {
- #cat $srcdir/f.lux-eula.txt
+ #build and compare license from fetched html
+ echo f.lux End User License Agreement > license_verify
+
+ awk < f.lux-eula.html '/div id="post"/,/<\/div>/' | sed -e 's/<[^>]*>//g' -e 's/^ *//' >> license_verify
+ if [ "$(md5sum license_verify|cut -c1-32)" != "$(md5sum f.lux-eula.txt|cut -c1-32)" ]
+ then
+ echo "Downloaded license does not match that cached in package, aborting."
+ return 1
+ fi
echo 'Download of this software requires agreement with EULA at https://justgetflux.com/news/pages/eula/index.html'
}