Fixed version string when using SVN revision suffix and date-time suffix (to ensure proper ordering by Debian packaging tools). Removed dependency of 'make deb' on 'make debfiles'.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@37875 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Ivan Vučica 2014-05-11 01:07:59 +00:00
parent ba4e951b53
commit 0d5df98ed6
4 changed files with 39 additions and 15 deletions

View file

@ -1,3 +1,22 @@
2014-05-11 Ivan Vucica <ivan@vucica.net>
* GNUmakefile.in: Date-time and svn-revision suffix are now using
the tilde character to ensure that the 'actual' commit and 'actual'
tagged release are treated as being newer by the Debian packaging.
Also stopped using periods in date-time.
debfiles target will no longer be automatically run, allowing for
build scripts to do some customization of debfiles inbetween, or
to permit the packager maintain the debfiles separately.
* Master/deb.make: Slightly cleaner build dependency line for
gnustep-make.
The version of gnustep-make we build-depend on is now read using
dpkg -s.
* Master/source-distribution.make: Date-time and svn-revision
suffix are now using the tilde character to ensure that the
'actual' commit and 'actual' tagged release are treated as being
newer by the Debian packaging. Also stopped using periods in
date-time.
2014-05-06 Ivan Vucica <ivan@vucica.net>
* bake_debian_files.sh: If DEB_DEPENDS is non-empty, prepend a

View file

@ -171,7 +171,7 @@ endif
# Version code that will be used in 'svn-export' target. Expand immediately;
# it should be constant in the script.
DATE_TIME_VERSION := $(shell date +%Y.%m.%d.%H.%M)
DATE_TIME_VERSION := $(shell date +%Y%m%d%H%M)
# Revision; potentially expensive so expand when used.
SVN_REVISION = $(shell svn info . | sed -ne 's/^Revision: //p')
@ -386,18 +386,18 @@ svn-dist:
svn-snapshot:
svn export $(SVNPREFIX)/trunk \
gnustep-make-$(GNUSTEP_MAKE_VERSION).$(SVN_REVISION)
tar --gzip -cf gnustep-make-$(GNUSTEP_MAKE_VERSION).$(SVN_REVISION).tar.gz gnustep-make-$(GNUSTEP_MAKE_VERSION).$(SVN_REVISION)
echo $(GNUSTEP_MAKE_VERSION).$(SVN_REVISION) > svn-snapshot-tarball-version
rm -rf gnustep-make-$(GNUSTEP_MAKE_VERSION).$(SVN_REVISION)
gnustep-make-$(GNUSTEP_MAKE_VERSION)~svn$(SVN_REVISION)
tar --gzip -cf gnustep-make-$(GNUSTEP_MAKE_VERSION)~svn$(SVN_REVISION).tar.gz gnustep-make-$(GNUSTEP_MAKE_VERSION)~svn$(SVN_REVISION)
echo $(GNUSTEP_MAKE_VERSION)~svn$(SVN_REVISION) > svn-snapshot-tarball-version
rm -rf gnustep-make-$(GNUSTEP_MAKE_VERSION)~svn$(SVN_REVISION)
svn-export:
@echo Note: any local changes are included.
svn export . \
gnustep-make-$(GNUSTEP_MAKE_VERSION).$(SVN_REVISION).$(DATE_TIME_VERSION)
tar --gzip -cf gnustep-make-$(GNUSTEP_MAKE_VERSION).$(SVN_REVISION).$(DATE_TIME_VERSION).tar.gz gnustep-make-$(GNUSTEP_MAKE_VERSION).$(SVN_REVISION).$(DATE_TIME_VERSION)
echo $(GNUSTEP_MAKE_VERSION).$(SVN_REVISION).$(DATE_TIME_VERSION) > svn-export-tarball-version
rm -rf gnustep-make-$(GNUSTEP_MAKE_VERSION).$(SVN_REVISION).$(DATE_TIME_VERSION)
gnustep-make-$(GNUSTEP_MAKE_VERSION)~svn$(SVN_REVISION)~date$(DATE_TIME_VERSION)
tar --gzip -cf gnustep-make-$(GNUSTEP_MAKE_VERSION)~svn$(SVN_REVISION)~date$(DATE_TIME_VERSION).tar.gz gnustep-make-$(GNUSTEP_MAKE_VERSION)~svn$(SVN_REVISION)~date$(DATE_TIME_VERSION)
echo $(GNUSTEP_MAKE_VERSION)~svn$(SVN_REVISION)~date$(DATE_TIME_VERSION) > svn-export-tarball-version
rm -rf gnustep-make-$(GNUSTEP_MAKE_VERSION)~svn$(SVN_REVISION)~date$(DATE_TIME_VERSION)
cvs-tag:
cvs -z3 rtag make-$(VERTAG) make
@ -446,7 +446,11 @@ debclean:
deb: debian_dist/gnustep-make_$(DEB_TARBALL_VERSION)_any.deb
debian_dist/gnustep-make_$(DEB_TARBALL_VERSION)_any.deb: debfiles
debian_dist/gnustep-make_$(DEB_TARBALL_VERSION)_any.deb:
$(EC)(if [ ! -e "debian_dist/gnustep-make-$(DEB_TARBALL_VERSION)/debian/control" ] ; then \
echo "Please manually run 'make debfiles' first." ; \
echo "Intentionally not automatically depending to ease customization between steps." ; \
fi)
cd debian_dist/gnustep-make-$(DEB_TARBALL_VERSION)/ && EDITOR=/bin/true dpkg-source --commit -q . gnustep-make-automatic
cd debian_dist/gnustep-make-$(DEB_TARBALL_VERSION)/ && debuild $(DEBUILD_ARGS) -S
cd debian_dist/gnustep-make-$(DEB_TARBALL_VERSION)/ && debuild $(DEBUILD_ARGS) -b

View file

@ -84,10 +84,10 @@ ifeq ($(_DEB_SHOULD_EXPORT), )
#
ifeq ($(DEB_BUILD_DEPENDS),)
DEB_BUILD_DEPENDS = gnustep-make (>= $(GNUSTEP_MAKE_VERSION))
DEB_BUILD_DEPENDS =gnustep-make (>= $(shell dpkg -s gnustep-make | grep 'Version: ' | sed 's/Version: //'))
export DEB_BUILD_DEPENDS
else
DEB_BUILD_DEPENDS += , gnustep-make (>= $(GNUSTEP_MAKE_VERSION))
DEB_BUILD_DEPENDS +=, gnustep-make (>= $(shell dpkg -s gnustep-make | grep 'Version: ' | sed 's/Version: //'))
export DEB_BUILD_DEPENDS
endif
@ -103,6 +103,7 @@ debfiles:: _debenv.phony
$(ECHO_NOTHING)(if [ -z "$(_DEB_TARBALL)" ] || [ ! -e "$(_DEB_TARBALL)" ] ; then \
echo "No tarball found. Please produce it manually using a target such as dist, svn-dist, " ; \
echo "svn-bugfix, svn-snapshot or svn-export." ; \
echo "Expecting name $(VERSION_NAME).tar.gz in current or parent directory." ; \
exit 1 ; \
fi)$(END_ECHO)
$(ECHO_NOTHING)echo "Baking deb control files ("$(GNUSTEP_TARGET_CPU)")..."$(END_ECHO)

View file

@ -147,13 +147,13 @@ endif
ifeq ($(TARBALL_VERSION_INCLUDE_SVN_REVISION), yes)
# Revision; potentially expensive so expand when used.
SVN_REVISION = $(shell svn info . | sed -ne 's/^Revision: //p')
TARBALL_VERSION := $(TARBALL_VERSION).$(SVN_REVISION)
TARBALL_VERSION := $(TARBALL_VERSION)~svn$(SVN_REVISION)
endif
ifeq ($(TARBALL_VERSION_INCLUDE_DATE_TIME), yes)
# Expand immediately; it should be constant in the script.
DATE_TIME_VERSION := $(shell date +%Y.%m.%d.%H.%M)
TARBALL_VERSION := $(TARBALL_VERSION).$(DATE_TIME_VERSION)
DATE_TIME_VERSION := $(shell date +%Y%m%d%H%M)
TARBALL_VERSION := $(TARBALL_VERSION)~date$(DATE_TIME_VERSION)
endif
VERSION_NAME = $(PACKAGE_NAME)-$(TARBALL_VERSION)