[arch-commits] Commit in eclipse-ecj/trunk (PKGBUILD)
Guillaume Alaux
guillaume at archlinux.org
Mon Oct 31 15:22:59 UTC 2016
Date: Monday, October 31, 2016 @ 15:22:58
Author: guillaume
Revision: 279533
Do not dynamically generate SHA array entries
Modified:
eclipse-ecj/trunk/PKGBUILD
----------+
PKGBUILD | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2016-10-31 14:16:16 UTC (rev 279532)
+++ PKGBUILD 2016-10-31 15:22:58 UTC (rev 279533)
@@ -13,18 +13,17 @@
url='http://www.eclipse.org/'
depends=('java-runtime')
makedepends=('apache-ant' 'java-environment')
-_base_url=http://download.eclipse.org/eclipse/downloads/drops4
-_sum_file_url=${_base_url}/R-${pkgver}-${_date}/checksum/eclipse-${pkgver}-SUMSSHA512
+_base_url=http://download.eclipse.org/eclipse/downloads/drops4/R-${pkgver}-${_date}
_source_file_name=ecjsrc-${pkgver}.jar
-source=(${_base_url}/R-${pkgver}-${_date}/${_source_file_name}
- ${_sum_file_url}{,.asc}
+_sha_file_name=eclipse-${pkgver}-SUMSSHA512
+source=(${_base_url}/${_source_file_name}
+ ${_base_url}/checksum/${_sha_file_name}{,.asc}
01-ecj-include-props.patch
02-buildxml-fix-manifest.patch
ecj)
validpgpkeys=('869FF7E31C98FBCFCF167CDE01D81CA560A48EFD') # Eclipse Project
-_source_file_sum=$(curl ${_sum_file_url} | grep -m 1 ${_source_file_name} | cut -d ' ' -f 1)
-sha512sums=(${_source_file_sum}
+sha512sums=('945f3029d6f7085e0e7daba3360d978c3e5648d8fd47165eab31c8879ae108fad50a8d52e191f05a1950c28b30bb6c851aced002e6163dfb8317cfe03c06fce8'
'ae98861af1ab9d2a90a3d1660700de2c5654a272f1c3d0af0698dc6d1827d3a2e2ccda4690eff706836f87bf0d5e1fbe283121ab41da7087c8618fc3fecb4d27'
'SKIP'
'72c8a2437333e8068e60e1a035bf4e5e9b66881fc06936600a6867dc7e4eb4670f94c4b2392634ebb28f85f8fdf88248ccb9cc315717e257ce336b495c2f2d68'
@@ -31,6 +30,16 @@
'11ca94869d71842401e48acca72fd89e339ba65c81909cf8501bb243457caa21dc659d268b98c42ac77a1834fb7de46138787e8ea0966d96324c8de829fe563c'
'1895c12c63262a08a2c889bb1db61308b5cb8846e5f20e584cde6878afd4da5ee051045a61a0a5a4498146a7315c8a14bf120e5d369365f4efc573d371381846')
+prepare() {
+ cd "${srcdir}"
+ local _source_file_sum=$(grep -m 1 ${_source_file_name} ${_sha_file_name} | cut -d ' ' -f 1)
+ if [[ "${sha512sums[0]}" != "${_source_file_sum}" ]]; then
+ echo "Source file ${_source_file_name} does not match the SHA sum"
+ echo "provided by upstream in their PGP signed file"
+ return 1
+ fi
+}
+
build() {
cd "${srcdir}"
for p in 01-ecj-include-props 02-buildxml-fix-manifest; do
More information about the arch-commits
mailing list