]> git.etc.gen.nz Git - mythtv-status.git/commitdiff
Get the release stuff working. 0.2
authorAndrew Ruthven <andrew@cerberus.etc.gen.nz>
Wed, 14 Nov 2007 17:54:30 +0000 (06:54 +1300)
committerAndrew Ruthven <andrew@cerberus.etc.gen.nz>
Wed, 14 Nov 2007 17:54:30 +0000 (06:54 +1300)
Makefile

index 155bcd389c63aa61c30086da5b3af058941d8315..b288e4da6c426383a157871063b186296a23dbc4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,29 +4,40 @@ package=mythtv-status
 releases=etch sid
 
 build=dpkg-buildpackage -uc -us -rfakeroot
-version=`git-tag -l | head -1`
+version=$(shell git-tag -l | tail -1)
 
 deb=$(package)_$(version)_all.deb
 tarball=build/tarball/$(package)-$(version).tar.gz
+tarball_dir=../$(package)_tarballs
 
-DEBS=$(foreach release, $(release), build/$(release)/$(deb))
+DEBS=$(foreach release, $(releases), build/$(release)/$(deb))
 
-release: build/tarball/mythtv-status-${version}.tar.gz etch-i386 sid-i386
+RELEASE_FILES=build/tarball/mythtv-status-${version}.tar.gz $(DEBS)
 
-all: $(tarball) $(DEBS)
+all: release
+
+release: $(RELEASE_FILES)
 
 $(tarball):
-       mkdir -p $(@D)
-       git-archive --format=tar $(version) | gzip > $(tarball)
+       @mkdir -p $(@D)
+       @git-archive --format=tar $(version) | gzip > $(tarball)
 
-etch-i386:
-       ssh build-etch-i386 "cd `pwd`; $(build)"
+build/etch/$(deb): 
+       @ssh build-etch-i386 "cd `pwd`; $(build)"
        @mkdir -p build/etch
        @mv ../$(deb) build/etch
 
-sid-i386:
-       ssh build-sid-i386 "cd `pwd`; $(build)"
+build/sid/$(deb): 
+       @ssh build-sid-i386 "cd `pwd`; $(build)"
        @mkdir -p build/sid
        @mv ../$(deb) build/sid
 
-.PHONY: release etch-i386 sid-i386
+publish: $(RELEASE_FILES)
+       for release in $(releases); do ars-add -r $$release -g main build/$$release/$(deb); done
+       @cp $(tarball) $(tarball_dir)
+       @ln -sf $(tarball_dir)/$(tarball) $(tarball_dir)/$(package)-latest.tar.gz
+
+clean:
+       @rm -rf build
+
+.PHONY: release clean