Create SWDB entry during make distcheck
authorWerner Koch <wk@gnupg.org>
Tue, 22 Nov 2016 08:16:05 +0000 (09:16 +0100)
committerWerner Koch <wk@gnupg.org>
Tue, 22 Nov 2016 08:16:05 +0000 (09:16 +0100)
* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Build emacs flavor.
(distcheck-hook): New.

Signed-off-by: Werner Koch <wk@gnupg.org>
Makefile.am

index 7dcc0ae..ef80f6c 100644 (file)
@@ -20,7 +20,7 @@
 ## Process this file with automake to produce Makefile.in
 
 ACLOCAL_AMFLAGS = -I m4
-DISTCHECK_CONFIGURE_FLAGS = --disable-pinentry-qt
+DISTCHECK_CONFIGURE_FLAGS = --disable-pinentry-qt --enable-pinentry-emacs
 
 GITLOG_TO_CHANGELOG=gitlog-to-changelog
 
@@ -88,6 +88,21 @@ install-exec-local:
 dist-hook: gen-ChangeLog
        echo "$(VERSION)" > $(distdir)/VERSION
 
+distcheck-hook:
+       set -e; ( \
+       pref="#+macro: pinentry_" ;\
+       reldate="$$(date -u +%Y-%m-%d)" ;\
+        echo "$${pref}ver  $(PACKAGE_VERSION)"  ;\
+        echo "$${pref}date $${reldate}" ;\
+        list='$(DIST_ARCHIVES)'; for i in $$list; do \
+         case "$$i" in *.tar.bz2) \
+            echo "$${pref}size $$(wc -c <$$i|awk '{print int($$1/1024)}')k" ;\
+           echo "$${pref}sha1 $$(sha1sum <$$i|cut -d' ' -f1)" ;\
+           echo "$${pref}sha2 $$(sha256sum <$$i|cut -d' ' -f1)" ;;\
+         esac;\
+       done ) | tee $(distdir).swdb
+
+
 gen_start_date = 2012-08-08T00:00:00
 .PHONY: gen-ChangeLog
 gen-ChangeLog: