summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLopo2016-08-23 10:41:31 +0200
committerLopo2016-08-23 10:41:31 +0200
commit4c46bd333c841d464af3269215a56ee361fff5e5 (patch)
tree3c19caf46e6b03c0b97bf32117cdd00442414dc1
parentb5bbc62bf79ef5bb90178a4a4235fd22ed993be9 (diff)
downloadaur-4c46bd333c841d464af3269215a56ee361fff5e5.tar.gz
fix for hash change
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD38
2 files changed, 29 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index bb731187a7c..c26be34de6a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,9 @@
+# Generated by mksrcinfo v8
+# Tue Aug 23 08:41:24 UTC 2016
pkgbase = netbeans-php-nightly
pkgdesc = Netbeans IDE for PHP
pkgver = latest
- pkgrel = 9
+ pkgrel = 10
url = http://netbeans.org
install = netbeans.install
arch = any
diff --git a/PKGBUILD b/PKGBUILD
index 783a4200a97..e95e32e4a5a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
_bundle='php'
pkgname="netbeans-${_bundle}-nightly"
pkgver=latest
-pkgrel=9
+pkgrel=10
pkgdesc="Netbeans IDE for PHP"
license=('CDDL')
arch=('any')
@@ -30,19 +30,33 @@ prepare() {
_file="${_zipname}-${_bundle}.zip"
_md5=`grep "zip/${_file}" files.js \
| awk 'BEGIN {FPAT="\"[0-9a-z]+\""} {gsub(/\"/, "", $NF); print}'`
+ case ${#_md5} in
+ 32)
+ _alg=md5
+ ;;
+ 40)
+ _alg=sha1
+ ;;
+ 56)
+ _alg=sha224
+ ;;
+ 64)
+ _alg=sha256
+ ;;
+ 96)
+ _alg=sha384
+ ;;
+ 128)
+ _alg=sha512
+ ;;
+ *)
+ msg "unbale to detect hash algorithm, hash: ${_md5}"
+ return 1
+ ;;
+ esac
download_file "${_webroot}/zip/${_file}"
-
- msg "$(gettext "Validating source files with %s...")" "md5sums"
- file="$(get_filename "${_file}")"
- printf "%s" " $file ... " >&2
- local _realsum="$(openssl dgst -md5 "${_file}")"
- if [ "${_md5}" != "${_realsum##* }" ]; then
- printf -- "$(gettext "FAILED")\n" >&2
- return 1
- else
- printf -- "$(gettext "Passed")\n" >&2
- fi
+ verify_integrity_one "${_file}" ${_alg} "${_md5}" || return 1
cd "$srcdir"
ln -fs "${SRCDEST}/${_file}"