summaryrefslogtreecommitdiffstats
path: root/debian/rules
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:45:08 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:45:08 +0000
commitf866c40aef35932863d4cb9f22859641227c9b60 (patch)
tree916091dcb4e1c863c6e666133f0d32244e2d84eb /debian/rules
parentAdding upstream version 0.142. (diff)
downloadinitramfs-tools-f866c40aef35932863d4cb9f22859641227c9b60.tar.xz
initramfs-tools-f866c40aef35932863d4cb9f22859641227c9b60.zip
Adding debian version 0.142.debian/0.142debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules24
1 files changed, 24 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..251387e
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,24 @@
+#!/usr/bin/make -f
+
+%:
+ dh $@ --with bash-completion
+
+# On Debian we can use either busybox or busybox-static, but on Ubuntu
+# and derivatives only busybox-initramfs will work.
+BUSYBOX_PACKAGES := $(shell if dpkg-vendor --derives-from ubuntu; then echo busybox-initramfs; else echo busybox busybox-static; fi)
+BUSYBOX_MIN_VERSION := 1:1.22.0-17~
+
+override_dh_gencontrol:
+ echo >> debian/initramfs-tools-core.substvars "busybox:Breaks=$(wordlist 2,100,$(BUSYBOX_PACKAGES:%=, % (<< $(BUSYBOX_MIN_VERSION))))"
+ echo >> debian/initramfs-tools-core.substvars "busybox:Recommends=$(wordlist 2,100,$(BUSYBOX_PACKAGES:%=| % (>= $(BUSYBOX_MIN_VERSION))))"
+ dh_gencontrol
+
+override_dh_install:
+ sed -e 's,@BUSYBOX_PACKAGES@,$(wordlist 2,100,$(BUSYBOX_PACKAGES:%=or %)),' \
+ -e 's/@BUSYBOX_MIN_VERSION@/$(BUSYBOX_MIN_VERSION)/' \
+ mkinitramfs > debian/initramfs-tools-core/usr/sbin/mkinitramfs
+ chmod 755 debian/initramfs-tools-core/usr/sbin/mkinitramfs
+ dh_install
+
+override_dh_installinitramfs:
+ @: