Skip to content

Commit

Permalink
./distribute: recreate temporary directory each time a source or bina…
Browse files Browse the repository at this point in the history
…ry 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
  • Loading branch information
rhaberkorn committed Mar 18, 2015
1 parent c3e9da0 commit e487cee
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion distribute
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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) \
Expand All @@ -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
Expand Down

0 comments on commit e487cee

Please sign in to comment.