From 75808db17caf8b960b351e3408e74142f4c85aac Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 15:42:30 +0200 Subject: Adding upstream version 2.117.0. Signed-off-by: Daniel Baumann --- t/templates/source-make-builder/Makefile.in | 86 ++++++++++++++++++++++ .../fill-values.d/source-make-builder.values | 3 + t/templates/source-make-builder/tar-orig | 8 ++ 3 files changed, 97 insertions(+) create mode 100644 t/templates/source-make-builder/Makefile.in create mode 100644 t/templates/source-make-builder/fill-values.d/source-make-builder.values create mode 100755 t/templates/source-make-builder/tar-orig (limited to 't/templates/source-make-builder') diff --git a/t/templates/source-make-builder/Makefile.in b/t/templates/source-make-builder/Makefile.in new file mode 100644 index 0000000..f527523 --- /dev/null +++ b/t/templates/source-make-builder/Makefile.in @@ -0,0 +1,86 @@ +ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) + +name = [% $source %] +version = [% $upstream_version %] +type = [% $type %] + +packagedir = $(name)-$(version) +underscored = $(name)_$(version) + +origdata = $(ROOT_DIR)/orig +origstem = $(underscored).orig + +debiandata = $(ROOT_DIR)/debian + +formatfile = $(debiandata)/source/format + +watchfile = $(packagedir)/debian/watch + +post_clean = $(ROOT_DIR)/post-clean +pre_orig = $(ROOT_DIR)/pre-orig +tar_orig = $(ROOT_DIR)/tar-orig +pre_build = $(ROOT_DIR)/pre-build +post_build = $(ROOT_DIR)/post-build + +product = [% $build_product %] + +ifneq (,$(wildcard $(ROOT_DIR)/dpkg-overrides)) +dpkgoverrides = $(shell cat $(ROOT_DIR)/dpkg-overrides) +endif + +ifeq ($(type),native) +dpkgoptions = -sn +else +dpkgoptions = -sp +endif + +.DEFAULT_GOAL := $(product) + +$(product): + -mkdir -p $(packagedir) + if [ -x $(post_clean) ] ; then \ + $(post_clean) $(packagedir) ; \ + fi + + mkdir $(origdata) || true + cp -rp $(origdata)/. $(packagedir) + + if [ "[% $type %]" != "native" ] ; then \ + if [ -x $(pre_orig) ] ; then \ + $(pre_orig) $(shell realpath $(packagedir)) ; \ + fi ; \ + if [ -x $(tar_orig) ] ; then \ + $(tar_orig) $(origstem) $(packagedir) ; \ + fi ; \ + if [ -f $(formatfile) ] && grep --quiet "^3\.. (quilt)$$" $(formatfile) ; then \ + rm -rf $(packagedir)/debian ; \ + fi ; \ + fi + + -mkdir -p $(packagedir)/debian + if [ -d $(debiandata) ] ; then \ + cp -rp $(debiandata)/. $(packagedir)/debian ; \ + fi + if [ "[% $type %]" != "native" ] ; then \ + if [ ! -f $(watchfile) ] ; then \ + echo '# Empty watch file' > $(watchfile) ; \ + fi ; \ + fi + + if [ -x $(pre_build) ] ; then \ + $(pre_build) $(shell realpath $(packagedir)) ; \ + fi + if [ -f $(formatfile) ] && grep --quiet "^3\.. (quilt)$$" $(formatfile) ; then \ + dpkg-source $(dpkgoverrides) -b $(packagedir) ; \ + else \ + dpkg-source $(dpkgoverrides) $(dpkgoptions) -b $(packagedir) ; \ + fi + if [ -x $(post_build) ] ; then \ + $(post_build) $(product) ; \ + fi + + +.PHONY: clean +clean: + rm -rf $(packagedir) + rm -f $(underscored)* diff --git a/t/templates/source-make-builder/fill-values.d/source-make-builder.values b/t/templates/source-make-builder/fill-values.d/source-make-builder.values new file mode 100644 index 0000000..41e08da --- /dev/null +++ b/t/templates/source-make-builder/fill-values.d/source-make-builder.values @@ -0,0 +1,3 @@ +Build-Product: [% $source %]_[% $version %].dsc +Build-Command: fakeroot make --trace -f [% $source_path %]/Makefile DEFAULT_DH_COMPAT=[% $dh_compat_level %] +Default-Build-Depends: debhelper-compat (= [% $dh_compat_level %]) diff --git a/t/templates/source-make-builder/tar-orig b/t/templates/source-make-builder/tar-orig new file mode 100755 index 0000000..791bca4 --- /dev/null +++ b/t/templates/source-make-builder/tar-orig @@ -0,0 +1,8 @@ +#!/bin/sh + +set -e + +tarstem="$1" +directory="$2" + +tar --create --file "$tarstem.tar.gz" --gzip "$directory" -- cgit v1.2.3