[vlc-devel] [PATCH] contrib: add support for openssl to check the sha512 hashes

Felix Paul Kühne fkuehne at videolan.org
Wed Jan 4 18:54:45 CET 2012


---
 contrib/src/main.mak |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index fdd0892..17fdbf6 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -197,9 +197,11 @@ ZCAT ?= $(error Gunzip client (zcat) not found!)
 endif
 
 ifeq ($(shell sha512sum --version >/dev/null 2>&1 || echo FAIL),)
-SHA512SUM = sha512sum
+SHA512SUM = sha512sum --check
 else ifeq ($(shell shasum --version >/dev/null 2>&1 || echo FAIL),)
-SHA512SUM = shasum -a 512
+SHA512SUM = shasum -a 512 --check
+else ifeq ($(shell openssl version >/dev/null 2>&1 || echo FAIL),)
+SHA512SUM = openssl dgst -sha512
 else
 SHA512SUM = $(error SHA-512 checksumming not found!)
 endif
@@ -247,7 +249,7 @@ checksum = \
 	$(foreach f,$(filter $(TARBALLS)/%,$^), \
 		grep -- " $(f:$(TARBALLS)/%=%)$$" \
 			"$(SRC)/$(patsubst .sum-%,%,$@)/$(2)SUMS" &&) \
-	(cd $(TARBALLS) && $(1) --check /dev/stdin) < \
+	(cd $(TARBALLS) && $(1) /dev/stdin) < \
 		"$(SRC)/$(patsubst .sum-%,%,$@)/$(2)SUMS"
 CHECK_SHA512 = $(call checksum,$(SHA512SUM),SHA512)
 UNPACK = $(RM) -R $@ \
-- 
1.7.5.4




More information about the vlc-devel mailing list