build-system: remove use of git-buildpackage, dput. Add pristine-tar.
authorDavid Bremner <bremner@debian.org>
Sun, 17 Jul 2011 12:55:50 +0000 (09:55 -0300)
committerDavid Bremner <bremner@debian.org>
Sun, 17 Jul 2011 13:59:41 +0000 (10:59 -0300)
The previous setup was dependent on the git-buildpackage configuration
to find the resulting tar file, and consequently a bit fragile.

We use pristine-tar instead to save a checksum-identical copy of the
tar file. This will also faciliate "non-native" debian packages, if
desired.

dput again depends on the local configuration, and mainly is a bit too
brave for me to do automatically.

Makefile.local

index 7f14e09974f52d98d3c684d7de3d55c41bd1083f..9b76c305964149f8efca37757187bd62c140dadf 100644 (file)
@@ -25,6 +25,7 @@ RELEASE_HOST=notmuchmail.org
 RELEASE_DIR=/srv/notmuchmail.org/www/releases
 RELEASE_URL=http://notmuchmail.org/releases
 TAR_FILE=$(PACKAGE)-$(VERSION).tar.gz
+DEB_TAR_FILE=$(PACKAGE)_$(VERSION).orig.tar.gz
 SHA1_FILE=$(TAR_FILE).sha1
 GPG_FILE=$(SHA1_FILE).asc
 
@@ -89,17 +90,13 @@ release: verify-source-tree-and-version
        $(MAKE) VERSION=$(VERSION) verify-newer
        $(MAKE) VERSION=$(VERSION) clean
        $(MAKE) VERSION=$(VERSION) test
-       rm -rf ./debian-build
-       git-buildpackage
-       cp debian-build/notmuch_$(VERSION).tar.gz notmuch-$(VERSION).tar.gz
        $(MAKE) VERSION=$(VERSION) $(GPG_FILE)
+       ln -sf $(TAR_FILE) $(DEB_TAR_FILE)
+       pristine-tar commit $(DEB_TAR_FILE) $(VERSION)
        scp $(TAR_FILE) $(SHA1_FILE) $(GPG_FILE) $(RELEASE_HOST):$(RELEASE_DIR)
        ssh $(RELEASE_HOST) "rm -f $(RELEASE_DIR)/LATEST-$(PACKAGE)-[0-9]* && ln -s $(TAR_FILE) $(RELEASE_DIR)/LATEST-$(PACKAGE)-$(VERSION)"
        mkdir -p releases
        mv $(TAR_FILE) $(SHA1_FILE) $(GPG_FILE) releases
-       (cd debian-build; dput *.changes)
-       mv debian-build/* releases
-       rmdir debian-build
        git tag -s -m "$(PACKAGE) $(VERSION) release" $(VERSION)
        git push origin $(VERSION)
        $(MAKE) VERSION=$(VERSION) release-message > $(PACKAGE)-$(VERSION).announce