public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Quirin Gylstorff <Quirin.Gylstorff@siemens.com>
To: isar-users@googlegroups.com
Subject: [PATCH] debianize: use debhelper-compat to generate compat file
Date: Wed, 31 Jan 2024 17:08:38 +0100	[thread overview]
Message-ID: <20240131161943.3331272-1-Quirin.Gylstorff@siemens.com> (raw)

From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

debhelper supports the versions debhelper-compat (= 9) till
debhelper-compat (= 13).

This patch also adds the variable `DEBIAN_COMPAT` to set the compat
to the desired version.

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
 meta/classes/debianize.bbclass | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/meta/classes/debianize.bbclass b/meta/classes/debianize.bbclass
index 16f3638d..7de98673 100644
--- a/meta/classes/debianize.bbclass
+++ b/meta/classes/debianize.bbclass
@@ -10,6 +10,7 @@ DEBIAN_BUILD_DEPENDS ??= ""
 DEBIAN_DEPENDS ??= ""
 DEBIAN_CONFLICTS ??= ""
 DEBIAN_MULTI_ARCH ??= "no"
+DEBIAN_COMPAT ??= "10"
 DESCRIPTION ??= "must not be empty"
 MAINTAINER ??= "Unknown maintainer <unknown@example.com>"
 
@@ -60,19 +61,15 @@ EOF
 	fi
 }
 
-deb_create_compat() {
-	echo 10 > ${S}/debian/compat
-}
 
 deb_create_control() {
-	compat=$( cat ${S}/debian/compat )
 	cat << EOF > ${S}/debian/control
 Source: ${BPN}
 Section: misc
 Priority: optional
 Standards-Version: 3.9.6
 Maintainer: ${MAINTAINER}
-Build-Depends: debhelper (>= ${compat}), ${DEBIAN_BUILD_DEPENDS}
+Build-Depends: debhelper-compat (= ${DEBIAN_COMPAT}), ${DEBIAN_BUILD_DEPENDS}
 
 Package: ${BPN}
 Architecture: ${DPKG_ARCH}
@@ -103,12 +100,6 @@ EOF
 deb_debianize() {
 	install -m 755 -d ${S}/debian
 
-	# create the compat-file if there is no file with that name in WORKDIR
-	if [ -f ${WORKDIR}/compat ]; then
-		install -v -m 644 ${WORKDIR}/compat ${S}/debian/compat
-	else
-		deb_create_compat
-	fi
 	# create the control-file if there is no control-file in WORKDIR
 	if [ -f ${WORKDIR}/control ]; then
 		install -v -m 644 ${WORKDIR}/control ${S}/debian/control
-- 
2.43.0


             reply	other threads:[~2024-01-31 16:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-31 16:08 Quirin Gylstorff [this message]
2024-02-01  7:26 ` MOESSBAUER, Felix
2024-02-01  9:53   ` Gylstorff Quirin
2024-02-01 10:00     ` MOESSBAUER, Felix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240131161943.3331272-1-Quirin.Gylstorff@siemens.com \
    --to=quirin.gylstorff@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox