From e487ceef68f572b4f86ce40481a57a5454cc8c46 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Wed, 18 Mar 2015 04:57:14 +0100 Subject: ./distribute: recreate temporary directory each time a source or binary package is built * you no longer have to make an entire clean when e.g. uploading for another Ubuntu release. Therefore, the source tar ball is preserved (it must be the same for all packages with the same upstream version). * also try to extract the SciTECO version from the ./configure script instead of hardcoding it in ./distribute --- distribute | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/distribute b/distribute index 61787fd..24f9494 100755 --- a/distribute +++ b/distribute @@ -4,7 +4,10 @@ SRCDIR=. ABS_SRCDIR=$(abspath $(SRCDIR)) -SCITECO_VERSION = 0.6 +# Try to extract version from ./configure +SCITECO_VERSION = $(shell $(SRCDIR)/configure --version | \ + sed -n 's/SciTECO configure //p') + SCITECO_SRC = sciteco-$(SCITECO_VERSION).tar.gz $(SCITECO_SRC): @@ -15,7 +18,9 @@ all : $(SCITECO_SRC) debian mingw-binary # $(UBUNTU) sets the Ubuntu distribution and fixes the package's # version debian-prepare: debian-temp/ +.PHONY: debian-temp/ debian-temp/ : $(SCITECO_SRC) + rm -rf debian-temp/ mkdir debian-temp/ (cd debian-temp/; \ cp ../$(SCITECO_SRC) \ @@ -36,6 +41,19 @@ else DEBUILD_FLAGS := -us -uc endif +# Whether to upload upstream sources (dist tarball) to the PPA +# This must be YES for new releases. +# It must be NO after the tarball has been +# uploaded once, else launchpad refuses +# building the source package. +# Launchpad will also refuse new versions of the +# tar ball for the same release, so the tarball +# should NOT be cleaned when uploading for multiple +# Ubuntu versions. +# If a bug is found only during PPA building, +# the upstream version must be increased since we +# cannot upload a new tarball and adding patches to the +# Debian package would be idiotic :-( UPLOAD_SRC ?= yes ifeq ($(UPLOAD_SRC),yes) DEBUILD_FLAGS += -sa -- cgit v1.2.3