summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2018-02-07 17:26:38 +0300
committerAndrei Belov <defan@nginx.com>2018-02-07 17:26:38 +0300
commitdc96d0896127bd79e786c48b6c260177ac198263 (patch)
treeb0c9250c65e6e7142a98c33db0a5a64debabfb68
parent539caf0946d2a5881ffaa34481f63c1bc67be96d (diff)
downloadunit-dc96d0896127bd79e786c48b6c260177ac198263.tar.gz
unit-dc96d0896127bd79e786c48b6c260177ac198263.tar.bz2
Packages: fixed building of deb packages with redefined versions.
-rw-r--r--pkg/deb/Makefile7
1 files changed, 7 insertions, 0 deletions
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 ; \