Debian: Various package building improvements

Use a two digit revision number instead of a single digit revision number to
fix a lintian warning. Exclude .gitignore files from the source archive.
Copy the debhelper major version number into debian/compat instead of
hardcoding the compatibility level because the highest compatibility level
supported by Ubuntu 16.04 is 9 and because compatibility level 9 is considered
deprecated by Ubuntu 20.04.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9333 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2021-01-10 01:21:44 +00:00
parent e0e4dcba2c
commit 613e7583c2
2 changed files with 12 additions and 9 deletions

View File

@@ -58,7 +58,7 @@ REVISION ?= $(shell if [ -e .svn ]; then \
fi)
VERSION_WITHOUT_REVISION := $(shell echo -n "$$(sed -n 's/^\#define[[:blank:]]SCST_VERSION_NAME[[:blank:]]*\"\([^-]*\).*\"/\1/p' scst/include/scst_const.h)")
VERSION := $(VERSION_WITHOUT_REVISION)$(REVISION)
DEBIAN_REVISION=1
DEBIAN_REVISION=1.1
RPMTOPDIR ?= $(shell if [ $$(id -u) = 0 ]; then echo /usr/src/packages;\
else echo $$PWD/rpmbuilddir; fi)
@@ -289,8 +289,9 @@ make-scst-dist = \
mkdir "$${name}-$(3)" && \
{ \
{ \
scripts/list-source-files && \
scripts/list-source-files | grep -v '/\.gitignore' && \
if [ -e debian/changelog ]; then echo debian/changelog; fi; \
if [ -e debian/compat ]; then echo debian/compat; fi; \
} | \
$(4) | \
tar -T- -cf- | \
@@ -349,11 +350,15 @@ debian/changelog: debian/changelog.in
sed 's/%{scst_version}/$(VERSION)-$(DEBIAN_REVISION)/' \
<debian/changelog.in >debian/changelog
../scst_$(VERSION).orig.tar.gz: debian/changelog Makefile
debian/compat:
dpkg-query -W --showformat='$${Version}\n' debhelper 2>/dev/null | \
sed 's/\..*//' >$@
../scst_$(VERSION).orig.tar.gz: debian/changelog debian/compat Makefile
$(call make-scst-dist,z,gz,$(VERSION),cat) && \
mv "scst-$(VERSION).tar.gz" "$@"
../scst_$(VERSION).orig.tar.xz: debian/changelog Makefile
../scst_$(VERSION).orig.tar.xz: debian/changelog debian/compat Makefile
$(call make-scst-dist,J,xz,$(VERSION),cat) && \
mv "scst-$(VERSION).tar.xz" "$@"

8
debian/rules vendored
View File

@@ -24,7 +24,7 @@ VERSION:=$(shell head -n1 debian/changelog | sed 's/.*(\([0-9.]*\).*).*/\1/')
clean:
dh_testdir && \
dh_prep -Xqla_isp/TAGS -Xdebian/changelog && \
scripts/clean-source-tree -x debian/changelog
scripts/clean-source-tree -x debian/changelog -x debian/compat
build:
make 2release && \
@@ -96,10 +96,8 @@ binary: binary-indep binary-arch
override_dh_installinit:
dh_installinit --onlyscripts
# dh_make generated override targets
# This is example for Cmake (See https://bugs.debian.org/641051 )
#override_dh_auto_configure:
# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
override_dh_auto_configure:
true
.PHONY: clean binary binary-arch binary-indep build build-arch build-indep \
install