From 613e7583c2cc2f29ab97e5567762939c9f7bff39 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 10 Jan 2021 01:21:44 +0000 Subject: [PATCH] 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 --- Makefile | 13 +++++++++---- debian/rules | 8 +++----- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 7ef193fdb..78bb23af2 100644 --- a/Makefile +++ b/Makefile @@ -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 -../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" "$@" diff --git a/debian/rules b/debian/rules index 3a0fa9f47..f78e364a0 100755 --- a/debian/rules +++ b/debian/rules @@ -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