r4501@hubble: cbe | 2007-06-25 11:18:02 +0200
[pgp-tools.git] / Makefile
index c5704e7fc447150d476bfd86aa72136459e1a525..28248c9e582b2afe41093389560980edee69d06f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,8 @@
-DIRS=caff gpg-key2ps gpg-mailkeys gpgsigs
+DIRS=caff gpg-key2ps gpg-mailkeys gpgsigs gpglist keylookup
 VERSION=$(shell dpkg-parsechangelog 2>&1 | perl -ne 'print $$1 if /^Version: ([^-]*)/')
+DEBVERSION=$(shell dpkg-parsechangelog 2>&1 | perl -ne 'print $$1 if /^Version: (.*)/')
 TGZ=../signing-party_$(VERSION).orig.tar.gz
+TGZ_DIR=signing-party-$(VERSION)
 
 all:
        for dir in $(DIRS) ; do if [ -f $$dir/Makefile ] ; then $(MAKE) -C $$dir || exit 1 ; fi ; done
@@ -10,4 +12,20 @@ clean:
 
 dist:
        [ ! -f $(TGZ) ]
-       tar cvz -f $(TGZ) --exclude .svn --exclude debian .
+       mkdir $(TGZ_DIR)
+       for dir in $(DIRS) ; do cp -a $$dir $(TGZ_DIR); done
+       cp -a README TODO Makefile $(TGZ_DIR)
+       tar cvz -f $(TGZ) --exclude .svn $(TGZ_DIR)
+       rm -rf $(TGZ_DIR)
+
+tag-release:
+       if svn ls svn+ssh://svn.debian.org/svn/pgp-tools/tags/release-$(VERSION) >/dev/null 2>&1; then \
+               echo "Already exists." >&2; exit 1; \
+       fi
+       svn cp -m 'tagging release $(VERSION)' svn+ssh://svn.debian.org/svn/pgp-tools/trunk svn+ssh://svn.debian.org/svn/pgp-tools/tags/release-$(VERSION)
+
+tag-debian-version:
+       if svn ls svn+ssh://svn.debian.org/svn/pgp-tools/tags/debian-version-$(DEBVERSION) >/dev/null 2>&1; then \
+               echo "Already exists." >&2; exit 1; \
+       fi
+       svn cp -m 'tagging debian version $(DEBVERSION)' svn+ssh://svn.debian.org/svn/pgp-tools/trunk svn+ssh://svn.debian.org/svn/pgp-tools/tags/debian-version-$(DEBVERSION)