]> git.etc.gen.nz Git - mythtv-status.git/commitdiff
Move build out of the git tree
authorAndrew Ruthven <andrew@etc.gen.nz>
Sat, 15 Jul 2023 12:28:42 +0000 (00:28 +1200)
committerAndrew Ruthven <andrew@etc.gen.nz>
Sat, 15 Jul 2023 12:28:42 +0000 (00:28 +1200)
Makefile

index 05387351c01fb25bb0216c196e4655c234b26569..d57e8b84e1039791e794ece3413ad9ae033bb80c 100755 (executable)
--- 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)