diff mbox series

auto-packer: mkpackage: add build depend dh-dkms for lunar

Message ID 20230324085041.41307-1-ivan.hu@canonical.com
State Accepted
Headers show
Series auto-packer: mkpackage: add build depend dh-dkms for lunar | expand

Commit Message

Ivan Hu March 24, 2023, 8:50 a.m. UTC
lunar build fail, when dh-dkms no installed, add the dh-dkms to
Build-Depends when prepare build for lunar.
dh-dkms is only on lunar and kinetic, not on other releases, so
not adding directly to debian/control for all releases in case we don't have
build error in those releases which no dh-dkms package.

Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
---
 auto-packager/mkpackage.sh | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/auto-packager/mkpackage.sh b/auto-packager/mkpackage.sh
index 1dbe189a..8279b70b 100755
--- a/auto-packager/mkpackage.sh
+++ b/auto-packager/mkpackage.sh
@@ -123,7 +123,15 @@  mk_package()
 	#
 	sed "s/) $deb_release/$suffix) $rel;/" debian/changelog > debian/changelog.new
 	mv debian/changelog.new debian/changelog
-	
+
+        #
+        # control hack
+        #
+        if [ "$rel" = "lunar" ]; then
+                sed 's/dkms,/dkms,\n               dh-dkms,/' debian/control > debian/control.new
+                mv debian/control.new debian/control
+        fi
+
   	echo 'y' | debuild -S
 	rm -rf $FWTS
 	popd >& /dev/null