public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] debianize: use debhelper-compat to generate compat file
@ 2024-01-31 16:08 Quirin Gylstorff
  2024-02-01  7:26 ` MOESSBAUER, Felix
  0 siblings, 1 reply; 4+ messages in thread
From: Quirin Gylstorff @ 2024-01-31 16:08 UTC (permalink / raw)
  To: isar-users

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-02-01 10:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-31 16:08 [PATCH] debianize: use debhelper-compat to generate compat file Quirin Gylstorff
2024-02-01  7:26 ` MOESSBAUER, Felix
2024-02-01  9:53   ` Gylstorff Quirin
2024-02-01 10:00     ` MOESSBAUER, Felix

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox