diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2016-01-20 19:45:36 +0000 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2016-01-20 20:52:53 +0000 |
commit | 913a861175d65a5423f4de47c4a033b94485ec28 (patch) | |
tree | c56fea5fbc833dea69345e0de2285b201927d50d /debian/rules | |
parent | 3084929076627b9388b123a06ecaebc469c8cb27 (diff) |
debian/control: Recommend the right busybox packages for the target distribution
Ubuntu's busybox and busybox-static are no use in an initramfs, so
instead of listing all variants of busybox, check for Ubuntu
derivatives at build time.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules index e6e920c..ea2ff3b 100755 --- a/debian/rules +++ b/debian/rules @@ -2,3 +2,12 @@ %: 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.01-3 + +override_dh_gencontrol: + echo >> debian/initramfs-tools-core.substvars "busybox:Recommends=$(wordlist 2,100,$(BUSYBOX_PACKAGES:%=| % (>= $(BUSYBOX_MIN_VERSION))))" + dh_gencontrol |