| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
include /usr/share/dpkg/pkg-info.mk |
| 4 |
|
| 5 |
%: |
| 6 |
dh $@ --with bash-completion |
| 7 |
|
| 8 |
# On Debian we can use either busybox or busybox-static, but on Ubuntu |
| 9 |
# and derivatives only busybox-initramfs will work. |
| 10 |
BUSYBOX_PACKAGES := $(shell if dpkg-vendor --derives-from ubuntu; then echo busybox-initramfs; else echo busybox busybox-static; fi) |
| 11 |
|
| 12 |
override_dh_gencontrol: |
| 13 |
echo >> debian/initramfs-tools-core.substvars "busybox:Recommends=$(wordlist 2,100,$(BUSYBOX_PACKAGES:%=| %))" |
| 14 |
dh_gencontrol |
| 15 |
|
| 16 |
override_dh_install: |
| 17 |
install -d debian/initramfs-tools-core/usr/sbin |
| 18 |
sed -e 's,@BUSYBOX_PACKAGES@,$(wordlist 2,100,$(BUSYBOX_PACKAGES:%=or %)),;s,@VERSION@,$(DEB_VERSION),' \ |
| 19 |
mkinitramfs > debian/initramfs-tools-core/usr/sbin/mkinitramfs |
| 20 |
chmod 755 debian/initramfs-tools-core/usr/sbin/mkinitramfs |
| 21 |
dh_install |
| 22 |
|
| 23 |
override_dh_installinitramfs: |
| 24 |
@: |
| 25 |
|
| 26 |
override_dh_auto_test: |
| 27 |
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) |
| 28 |
tests/functions_test |
| 29 |
endif |