summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLopo2016-08-23 10:39:25 +0200
committerLopo2016-08-23 10:39:25 +0200
commit18ac9c81cf525c2e9c2f0ebde8e6ce9e671e32ad (patch)
treea3657f0d4ad2baadd6c4795a2cd73646b5470d9a
parent04276b5076c490e79213b21087305e6050e1327d (diff)
downloadaur-18ac9c81cf525c2e9c2f0ebde8e6ce9e671e32ad.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 0cf47a2596a..88057097411 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,9 @@
+# Generated by mksrcinfo v8
+# Tue Aug 23 08:38:26 UTC 2016
pkgbase = netbeans-cpp-nightly
pkgdesc = Netbeans IDE for C/C++
pkgver = latest
- pkgrel = 6
+ pkgrel = 7
url = http://netbeans.org
install = netbeans.install
arch = any
diff --git a/PKGBUILD b/PKGBUILD
index 4ed23465679..0ad518360eb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
_bundle='cpp'
pkgname="netbeans-${_bundle}-nightly"
pkgver=latest
-pkgrel=6
+pkgrel=7
pkgdesc="Netbeans IDE for C/C++"
license=('CDDL')
arch=('any')
@@ -29,19 +29,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}"