aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <igor.pashev@nexenta.com>2012-09-14 08:26:55 +0400
committerIgor Pashev <igor.pashev@nexenta.com>2012-09-14 08:26:55 +0400
commit2240b1afa6d7df10f6efc658f8ea7b6944018009 (patch)
tree993d5b9e7059a0432fdb0402d73888dfa7667293
parent20fffafa81b5bbef10b227746a1150b68edd6067 (diff)
downloadcibs-2240b1afa6d7df10f6efc658f8ea7b6944018009.tar.gz
make checksum > Makefile - create checksums
'make checksum' will print "checksum := ..." to insert into Makefile. Usefull when creating new packages or updating upstream
-rw-r--r--rules/archive.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/rules/archive.mk b/rules/archive.mk
index 82d46ab..6601862 100644
--- a/rules/archive.mk
+++ b/rules/archive.mk
@@ -59,6 +59,15 @@ unpack-%-stamp: validate-%-stamp
unpack-stamp: $$(addprefix unpack-,$$(addsuffix -stamp,$$(archives) $$(archive)))
+
+checksum:
+ @echo '# Insert this into Makefile:'
+ @echo 'checksum := \'
+ @printf " md5:"; md5sum "$(archive)" | awk '{print $$1 " \\"}'
+ @printf " sha1:"; sha1sum "$(archive)" | awk '{print $$1 " \\"}'
+ @printf " sha256:"; sha256sum "$(archive)" | awk '{print $$1 " \\"}'
+ @printf " size:"; stat -c '%s' "$(archive)"
+
__archive_mk := included
endif