From 2cd6d7aab3687bbfc43f1fc82da626b8c9395f27 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Wed, 16 Jul 2014 19:34:55 +0200 Subject: [build] add target for signing packages ``make sign`` builds a CTAN package and signs it with GnuPG. --- Makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6a552c2..4124a1a 100644 --- a/Makefile +++ b/Makefile @@ -72,6 +72,7 @@ TEXMFROOT = $(shell kpsewhich --var-value TEXMFHOME) DISTDIR = $(BUILDDIR)/$(NAME) CTAN_ZIPFILE = $(NAME).zip +CTAN_ZIPSIG = $(BUILDDIR)/$(CTAN_ZIPFILE).asc TDS_ZIPFILE = $(NAME).tds.zip CTAN_ZIP = $(BUILDDIR)/$(CTAN_ZIPFILE) TDS_ZIP = $(BUILDDIR)/$(TDS_ZIPFILE) @@ -138,7 +139,7 @@ $(BUILDDIR): /dev/null mkdir -p $(BUILDDIR) define make-ctandir -@$(RM) -rf $(DISTDIR) +@$(RM) -rf -- $(DISTDIR) @mkdir -p $(DISTDIR) && cp $(RESOURCES) $(DOCPDF) $(VGND) $(CONFDEMO) $(SOURCE) $(DISTDIR) endef @@ -148,6 +149,11 @@ $(CTAN_ZIP): $(DOCS) $(SOURCE) $(TDS_ZIP) $(make-ctandir) cd $(BUILDDIR) && zip -r -9 $(CTAN_ZIPFILE) $(TDS_ZIPFILE) $(NAME) >/dev/null +$(CTAN_ZIPSIG): $(CTAN_ZIP) + @echo "Signing package $(CTAN_ZIP)" + @$(RM) -- $@ + @gpg --batch --armor --detach-sign "$(CTAN_ZIP)" + define run-install-doc @mkdir -p $(DOCDIR) && cp -- $(DOCSTATUS) $(VGND) $(CONFDEMO) $(DOCDIR) @mkdir -p $(SRCDIR) && cp -- $(SRCSTATUS) $(SRCDIR) @@ -169,7 +175,9 @@ $(TDS_ZIP): $(DOCS) $(ALL_STATUS) check @cd $(TEXMFROOT) && zip -9 ../$@ -r . >/dev/null @$(RM) -r -- $(TEXMFROOT) -.PHONY: install manifest clean mrproper show showtargets +sign: $(CTAN_ZIPSIG) + +.PHONY: install manifest clean mrproper show showtargets check install: $(ALL_STATUS) @echo "Installing in '$(TEXMFROOT)'." @@ -215,6 +223,7 @@ showtargets: @echo @echo " tds package a zipball according to the TDS" @echo " ctan package a zipball for uploading to CTAN" + @echo " sign sign zipball" @echo # vim:noexpandtab:tabstop=8:shiftwidth=2 -- cgit v1.2.3