summaryrefslogtreecommitdiffstats
path: root/t/templates/upload-make-builder
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:42:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:42:30 +0000
commit75808db17caf8b960b351e3408e74142f4c85aac (patch)
tree7989e9c09a4240248bf4658a22208a0a52d991c4 /t/templates/upload-make-builder
parentInitial commit. (diff)
downloadlintian-75808db17caf8b960b351e3408e74142f4c85aac.tar.xz
lintian-75808db17caf8b960b351e3408e74142f4c85aac.zip
Adding upstream version 2.117.0.upstream/2.117.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 't/templates/upload-make-builder')
-rw-r--r--t/templates/upload-make-builder/Makefile.in90
-rw-r--r--t/templates/upload-make-builder/fill-values.d/upload-make-builder.values4
2 files changed, 94 insertions, 0 deletions
diff --git a/t/templates/upload-make-builder/Makefile.in b/t/templates/upload-make-builder/Makefile.in
new file mode 100644
index 0000000..d67f796
--- /dev/null
+++ b/t/templates/upload-make-builder/Makefile.in
@@ -0,0 +1,90 @@
+ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+
+package = [% $source %]
+upstream_version = [% $upstream_version %]
+type = [% $type %]
+
+packagedir = $(package)-$(upstream_version)
+
+origdata = $(ROOT_DIR)/orig
+origtargz = $(package)_$(upstream_version).orig.tar.gz
+
+debiandata = $(ROOT_DIR)/debian
+formatfile = $(debiandata)/source/format
+
+diffdata = $(ROOT_DIR)/diff
+
+private_key = $(ROOT_DIR)/upstream/private-key.asc
+
+pre_build = $(ROOT_DIR)/pre-build
+post_build = $(ROOT_DIR)/post-build
+pre_upstream = $(ROOT_DIR)/pre-upstream
+
+product = [% $build_product %]
+upload_type = [% $upload_type %]
+
+ifeq ($(upload_type),source)
+extraflags = -S
+else
+extraflags =
+endif
+
+.DEFAULT_GOAL := $(product)
+
+$(product): $(origtargz)
+ if [ -r $(origtargz) -a -r $(private_key) ] ; then \
+ tmpdir=$(shell mktemp -d) ; \
+ gpg --homedir "$$tmpdir" --import $(private_key) ; \
+ gpg --homedir "$$tmpdir" --batch --yes --armor --output $(origtargz).asc \
+ --detach-sign $(origtargz) ; \
+ gpg-connect-agent --homedir "$$tmpdir" KILLAGENT /bye ; \
+ rm -rf "$$tmpdir" ; \
+ fi
+ if [ -d $(diffdata)/. ] ; then \
+ cp -rp $(diffdata)/. $(packagedir) ; \
+ fi
+ if [ -d $(debiandata)/. ] ; then \
+ cp -rp $(debiandata)/. $(packagedir)/debian ; \
+ fi
+
+ if [ -x $(pre_build) ] ; then \
+ $(pre_build) $(shell realpath $(packagedir)) ; \
+ fi
+
+ cd $(packagedir) && dpkg-buildpackage -rfakeroot $(extraflags) -us -uc -d \
+ -iNEVER_MATCH_ANYTHING -INEVER_MATCH_ANYTHING --source-option=--auto-commit
+
+ if [ -x $(post_build) ] ; then \
+ $(post_build) $(shell realpath $(packagedir)) ; \
+ fi
+
+ifeq ($(type),native)
+$(origtargz):
+ -mkdir $(packagedir)
+ if [ -d $(origdata)/. ] ; then \
+ cp -rp $(origdata)/. $(packagedir) ; \
+ fi
+else
+$(origtargz):
+ -mkdir $(packagedir)
+ if [ -d $(origdata)/. ] ; then \
+ cp -rp $(origdata)/. $(packagedir) ; \
+ fi
+
+ if [ -x $(pre_upstream) ] ; then \
+ $(pre_upstream) $(shell realpath $(packagedir)) ; \
+ fi
+
+ tar czf $(origtargz) $(packagedir)
+
+ if [ -f $(formatfile) ] && grep --quiet "^3\.. (quilt)$$" $(formatfile) ; then \
+ rm -rf $(packagedir)/debian ; \
+ fi
+endif
+
+.PHONY: clean
+clean:
+ rm -rf $(packagedir)
+ if [ "$(type)" = "native" ] ; then \
+ rm -f $(origtargz) ; \
+ fi
diff --git a/t/templates/upload-make-builder/fill-values.d/upload-make-builder.values b/t/templates/upload-make-builder/fill-values.d/upload-make-builder.values
new file mode 100644
index 0000000..ec90e55
--- /dev/null
+++ b/t/templates/upload-make-builder/fill-values.d/upload-make-builder.values
@@ -0,0 +1,4 @@
+Upload-Type: [% $host_architecture %]
+Build-Product: [% $source %]_[% $no_epoch %]_[% $upload_type %].changes
+Build-Command: make --trace -f [% $source_path %]/Makefile DEFAULT_DH_COMPAT=[% $dh_compat_level %]
+Default-Build-Depends: debhelper-compat (= [% $dh_compat_level %])