build-system: remove use of git-buildpackage, dput. Add pristine-tar.

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.
This commit is contained in:
David Bremner 2011-07-17 09:55:50 -03:00
parent 9fb9fb2986
commit 939c91b7ef

View file

@ -25,6 +25,7 @@ RELEASE_HOST=notmuchmail.org
RELEASE_DIR=/srv/notmuchmail.org/www/releases RELEASE_DIR=/srv/notmuchmail.org/www/releases
RELEASE_URL=http://notmuchmail.org/releases RELEASE_URL=http://notmuchmail.org/releases
TAR_FILE=$(PACKAGE)-$(VERSION).tar.gz TAR_FILE=$(PACKAGE)-$(VERSION).tar.gz
DEB_TAR_FILE=$(PACKAGE)_$(VERSION).orig.tar.gz
SHA1_FILE=$(TAR_FILE).sha1 SHA1_FILE=$(TAR_FILE).sha1
GPG_FILE=$(SHA1_FILE).asc GPG_FILE=$(SHA1_FILE).asc
@ -89,17 +90,13 @@ release: verify-source-tree-and-version
$(MAKE) VERSION=$(VERSION) verify-newer $(MAKE) VERSION=$(VERSION) verify-newer
$(MAKE) VERSION=$(VERSION) clean $(MAKE) VERSION=$(VERSION) clean
$(MAKE) VERSION=$(VERSION) test $(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) $(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) 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)" ssh $(RELEASE_HOST) "rm -f $(RELEASE_DIR)/LATEST-$(PACKAGE)-[0-9]* && ln -s $(TAR_FILE) $(RELEASE_DIR)/LATEST-$(PACKAGE)-$(VERSION)"
mkdir -p releases mkdir -p releases
mv $(TAR_FILE) $(SHA1_FILE) $(GPG_FILE) 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 tag -s -m "$(PACKAGE) $(VERSION) release" $(VERSION)
git push origin $(VERSION) git push origin $(VERSION)
$(MAKE) VERSION=$(VERSION) release-message > $(PACKAGE)-$(VERSION).announce $(MAKE) VERSION=$(VERSION) release-message > $(PACKAGE)-$(VERSION).announce