From 9ea78555923b177327373ac9b9870e1ac5e6507b Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Sun, 16 Jul 2023 00:28:42 +1200 Subject: [PATCH] Move build out of the git tree --- Makefile | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 0538735..d57e8b8 100755 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ package=mythtv-status releases=sid release=sid -build=dpkg-buildpackage -rfakeroot -i'(.git|build|.gitignore|testing)*' -I.git -Ibuild -I.gitignore -Itesting -tc -kC603FC4E600F1CECD1C8D97C4B53D931E4D3E863 --changes-option=-S --changes-option=-sa +build=dpkg-buildpackage -rfakeroot -i'(.git|.gitignore|testing)*' -I.git -I.gitignore -Itesting -tc -kC603FC4E600F1CECD1C8D97C4B53D931E4D3E863 --changes-option=-S --changes-option=-sa ifeq ($(version),) version=$(shell git tag -l | grep '^[0-9]' | sort -t"." -k 1,1 -k 2,2 -k 3,3 -n | tail -1) endif @@ -15,12 +15,12 @@ deb_version=$(shell git tag -l | grep ^debian-$(release)-[[:digit:]] | sed 's/de deb=$(package)_$(deb_version)_all.deb orig_tarball=../$(package)_$(version).orig.tar.gz -tarball=build/tarball/$(package)-$(version).tar.gz +tarball=../build/tarball/$(package)-$(version).tar.gz tarball_dir=../$(package)_tarballs -DEBS=$(foreach release, $(releases), build/$(release)/$(deb)) +DEBS=$(foreach release, $(releases), ../build/$(release)/$(deb)) -RELEASE_FILES=$(orig_tarball) build/tarball/mythtv-status-${version}.tar.gz $(DEBS) +RELEASE_FILES=$(orig_tarball) ../build/tarball/mythtv-status-${version}.tar.gz $(DEBS) TEST_VERBOSE=0 TEST_FILES=t/*.t @@ -32,35 +32,36 @@ release: $(RELEASE_FILES) $(orig_tarball): $(tarball) @rm -f $@ @ln -s `basename \`pwd\``/$< $@ + @ln -sf `basename \`pwd\``/$<.asc $@.asc $(tarball): @mkdir -p $(@D) @git archive --format=tar --prefix=$(package)-$(version)/ $(version) `git ls-tree --name-only $(version) | egrep -v "(.gitignore|debian|Makefile|testing)"` | gzip > $(tarball) @gpg -sb --armour $(tarball) -build/$(release)/$(deb): $(orig_tarball) +../build/$(release)/$(deb): $(orig_tarball) @echo Building $(release) @ssh -t build-$(release)-amd64 "cd `pwd`; $(build)" @ssh build-$(release)-amd64 "cd `pwd`/..; /usr/bin/lintian -i -I $(package)_$(version)*.changes" || true #@ssh build-$(release)-amd64 "cd `pwd`/..; /usr/bin/linda -i $(package)_$(version)*.changes" || true - @mkdir -p build/$(release) + @mkdir -p ../build/$(release) @cp ../$(deb) \ ../$(package)_$(deb_version)_*.changes \ ../$(package)_$(deb_version)_*.buildinfo \ ../$(package)_$(deb_version).dsc \ ../$(package)_$(version).orig.tar.?z \ ../$(package)_$(deb_version).debian.tar.?z \ - build/$(release) + ../build/$(release) publish: $(RELEASE_FILES) - for release in $(releases); do reprepro includedsc $$release build/$$release/$(package)_$(deb_version).dsc; done - for release in $(releases); do reprepro includedeb $$release build/$$release/$(package)_$(deb_version)_all.deb; done + for release in $(releases); do reprepro includedsc $$release ../build/$$release/$(package)_$(deb_version).dsc; done + for release in $(releases); do reprepro includedeb $$release ../build/$$release/$(package)_$(deb_version)_all.deb; done @cp $(tarball) $(tarball_dir) @chmod o+r $(tarball_dir)/*-$(version).* @ln -sf `basename $(tarball)` $(tarball_dir)/$(package)-latest.tar.gz upload: $(RELEASE_FILES) - for release in $(releases); do cd build/$$release; dput $(package)_$(deb_version)*.changes; done + for release in $(releases); do cd ../build/$$release; dput $(package)_$(deb_version)*.changes; done install: install -d $(BINDIR) -- 2.30.2