X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=Makefile;h=356793886ea52edca66c128bd31296a74d04fa61;hb=cff844dc14b3280effd3d8e7aa8395466afe0385;hp=08880a11d4248741fb4e3ed4da90b11cd93fce45;hpb=b0d2a46de1faaa3bb0be7c7742f84746e5a292d0;p=monkeysphere.git diff --git a/Makefile b/Makefile index 08880a1..3567938 100755 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ # © 2008-2010 Daniel Kahn Gillmor # Licensed under GPL v3 or later -MONKEYSPHERE_VERSION = `head -n1 Changelog | sed 's/.*(\([^-]*\)).*/\1/'` +MONKEYSPHERE_VERSION:=$(shell head -n1 Changelog | sed 's/.*(\([^-]*\)).*/\1/') # these defaults are for debian. porters should probably adjust them # before calling make install @@ -17,20 +17,11 @@ MANPREFIX ?= $(PREFIX)/share/man # nothing actually needs to be built now. all: -tarball: clean - rm -rf monkeysphere-$(MONKEYSPHERE_VERSION) - ln -s ../Changelog ../COPYING ../etc ../Makefile ../man ../src ../tests monkeysphere-$(MONKEYSPHERE_VERSION) - echo Monkeysphere $(MONKEYSPHERE_VERSION) > monkeysphere-$(MONKEYSPHERE_VERSION)/VERSION - echo -n "git revision " >> monkeysphere-$(MONKEYSPHERE_VERSION)/VERSION - git rev-parse HEAD >> monkeysphere-$(MONKEYSPHERE_VERSION)/VERSION - tar -ch --exclude='*~' monkeysphere-$(MONKEYSPHERE_VERSION) | gzip -n > monkeysphere_$(MONKEYSPHERE_VERSION).orig.tar.gz - rm -rf monkeysphere-$(MONKEYSPHERE_VERSION) - -debian-package: tarball - tar xzf monkeysphere_$(MONKEYSPHERE_VERSION).orig.tar.gz - cp -a packaging/debian monkeysphere-$(MONKEYSPHERE_VERSION) - (cd monkeysphere-$(MONKEYSPHERE_VERSION) && debuild -uc -us) - rm -rf monkeysphere-$(MONKEYSPHERE_VERSION) +VERSION: Changelog + sed 's/^Monkeysphere .*$$/Monkeysphere '$(MONKEYSPHERE_VERSION)'/' -i VERSION + +debian-package: + git buildpackage -uc -us --git-upstream-branch=master --git-debian-branch=debian --git-no-pristine-tar --git-ignore-new # don't explicitly depend on the tarball, since our tarball # (re)generation is not idempotent even when no source changes.