From dc96d0896127bd79e786c48b6c260177ac198263 Mon Sep 17 00:00:00 2001 From: Andrei Belov Date: Wed, 7 Feb 2018 17:26:38 +0300 Subject: [PATCH] Packages: fixed building of deb packages with redefined versions. --- pkg/deb/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/deb/Makefile b/pkg/deb/Makefile index 1f941b44..747a2576 100644 --- a/pkg/deb/Makefile +++ b/pkg/deb/Makefile @@ -175,9 +175,16 @@ debuild-%: debuild/unit_$(VERSION).orig.tar.gz ../../docs/changes.xml mkdir $@/$(SRCDIR)/debian/source echo '3.0 (quilt)' > $@/$(SRCDIR)/debian/source/format cd ../../docs && make ../build/unit-$(MODULE_SUFFIX_$*).deb-changelog +ifneq ($(DEFAULT_VERSION)$(DEFAULT_RELEASE), $(VERSION)$(RELEASE)) + cat ../../build/unit-$(MODULE_SUFFIX_$*).deb-changelog | sed \ + -e "s/unit-$* ($(DEFAULT_VERSION)-$(DEFAULT_RELEASE)~/unit-$* ($(VERSION)-$(RELEASE)~/" \ + -e "s#%%CODENAME%%#$(CODENAME)#g" \ + > $@/$(SRCDIR)/debian/changelog +else cat ../../build/unit-$(MODULE_SUFFIX_$*).deb-changelog | sed \ -e "s#%%CODENAME%%#$(CODENAME)#g" \ > $@/$(SRCDIR)/debian/changelog +endif cp debian/copyright debuild-$*/$(SRCDIR)/debian/ @{ \ set -e ; \