From 32e0b49a4c4b1608e5c573ce5379d0512d3dc952 Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 26 Jan 2020 03:10:34 +0000 Subject: project: --srcinfo support: initial integration. --- project/srcdist/manifest.in | 15 +++++++++++++++ project/srcdist/srcinfo.in | 27 +++++++++++++++++++++++++++ project/srcgen.mk | 38 +++++++++++++++++++++++++++++++++----- 3 files changed, 75 insertions(+), 5 deletions(-) create mode 100644 project/srcdist/manifest.in create mode 100644 project/srcdist/srcinfo.in diff --git a/project/srcdist/manifest.in b/project/srcdist/manifest.in new file mode 100644 index 0000000..f6581aa --- /dev/null +++ b/project/srcdist/manifest.in @@ -0,0 +1,15 @@ + / + / GREETINGS. +| +| The source tree immediately containing this MANIFEST file is comprised of: +| +| a) upstream source files in preferred, unmodified form; +| b) downstream build system files; and +| c) downstream overlay and extension files. +| +| The following documents identify the origin of each of the source files by +| both its sha-256 signature and origin: +| +| MANIFEST.rawball provides a list of upstream source files. +| MANIFEST.overlay provides a list of downstream overlay and extension files. +| diff --git a/project/srcdist/srcinfo.in b/project/srcdist/srcinfo.in new file mode 100644 index 0000000..96b9331 --- /dev/null +++ b/project/srcdist/srcinfo.in @@ -0,0 +1,27 @@ + / + / GREETINGS. +| +| This copy of @program@ was built from a source tree comprised of: +| +| a) upstream source files in preferred, unmodified form; +| b) downstream build system files; and +| c) downstream overlay and extension files. +| +| The above source tree contains manifest documents which help identify +| each source file by both its sha-256 signature and origin. See the +| top-level MANIFEST file for additional information. +| +| The author(s) of one or more downstream files prefer, but do not require, +| that the complete corresponding source be shipped along with any package +| containing the program in binary form. +| +| The complete corresponding source of the program may also be downloaded at: +| +| https://@srcsite@/srchash/\$SRCHASH/@package@-@pkgver@.tar.xz +| https://@srcsite@/srchash/\$SRCHASH/@package@-@pkgver@.tar.xz.asc +| +| SRCHASH: @srcball_sha256@ +| PGPRKEY: @pgprkey@ +| PGPSKEY: @pgpskey@ +| + diff --git a/project/srcgen.mk b/project/srcgen.mk index d1ab778..3f73ec5 100644 --- a/project/srcgen.mk +++ b/project/srcgen.mk @@ -30,6 +30,16 @@ BIN_SUBST_RULES = \ -e 's!@am_AUTOM4TE@!$(AM_AUTOM4TE)!g' \ -e 's!@datadir@!$(DATADIR)!g' +SRCINFO_SUBST_RULES = \ + -e 's!@program@!$(PROGRAM)!g' \ + -e 's!@srcsite@!$(SRCSITE)!g' \ + -e 's!@package@!$(PACKAGE)!g' \ + -e 's,@pgprkey@,$(PGPRKEY),g' \ + -e 's,@pgpskey@,$(PGPSKEY),g' \ + -e 's!@pkgver@!$(AUTOMAKE_VER)!g' \ + -e 's!@srcball_sha256@!$(SRCBALL_SHA256)!g' + + LIB_GEN_SRCS = lib/Automake/Config.pm LIB_CONFIGURE_INPUT = Generated via variable substitution from $(subst $(SOURCE_DIR)/lib/Automake/,,$<). LIB_SUBST_RULES = \ @@ -44,11 +54,29 @@ ALL_GEN_SRCS = $(M4_GEN_SRCS) $(BIN_GEN_SRCS) $(LIB_GEN_SRCS) $(MAN_G m4/amversion.m4: $(SOURCE_DIR)/m4/amversion.in tree.tag sed $(M4_SUBST_RULES) $< > $@ -bin/aclocal-$(AUTOMAKE_VER): $(SOURCE_DIR)/bin/aclocal.in tree.tag - sed $(BIN_SUBST_RULES) $< > $@ && chmod +x $@ - -bin/automake-$(AUTOMAKE_VER): $(SOURCE_DIR)/bin/automake.in tree.tag - sed $(BIN_SUBST_RULES) $< > $@ && chmod +x $@ +bin/aclocal-$(AUTOMAKE_VER): PROGRAM=aclocal +bin/aclocal-$(AUTOMAKE_VER): $(SOURCE_DIR)/bin/aclocal.in tree.tag + sed -e '/$$PACKAGE) $$VERSION/,$$d' $(BIN_SUBST_RULES) \ + $< > $@.tmp \ + && sed $(SRCINFO_SUBST_RULES) \ + $(SRCINFO) >> $@.tmp \ + && sed -e '/$$PACKAGE) $$VERSION/p' \ + -e '1,/$$PACKAGE) $$VERSION/d' $(BIN_SUBST_RULES) \ + $< >> $@.tmp \ + && chmod +x $@.tmp \ + && mv $@.tmp $@ + +bin/automake-$(AUTOMAKE_VER): PROGRAM=automake +bin/automake-$(AUTOMAKE_VER): $(SOURCE_DIR)/bin/automake.in tree.tag + sed -e '/$$PACKAGE) $$VERSION/,$$d' $(BIN_SUBST_RULES) \ + $< > $@.tmp \ + && sed $(SRCINFO_SUBST_RULES) \ + $(SRCINFO) >> $@.tmp \ + && sed -e '/$$PACKAGE) $$VERSION/p' \ + -e '1,/$$PACKAGE) $$VERSION/d' $(BIN_SUBST_RULES) \ + $< >> $@.tmp \ + && chmod +x $@.tmp \ + && mv $@.tmp $@ lib/Automake/Config.pm: $(SOURCE_DIR)/lib/Automake/Config.in tree.tag sed $(LIB_SUBST_RULES) $< > $@ -- cgit v1.2.3