File: rules

package info (click to toggle)
initramfs-tools 0.150
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 672 kB
  • sloc: sh: 2,300; ansic: 457; python: 189; makefile: 24
file content (29 lines) | stat: -rwxr-xr-x 948 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

%:
	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)

override_dh_gencontrol:
	echo >> debian/initramfs-tools-core.substvars "busybox:Recommends=$(wordlist 2,100,$(BUSYBOX_PACKAGES:%=| %))"
	dh_gencontrol

override_dh_install:
	install -d debian/initramfs-tools-core/usr/sbin
	sed -e 's,@BUSYBOX_PACKAGES@,$(wordlist 2,100,$(BUSYBOX_PACKAGES:%=or %)),;s,@VERSION@,$(DEB_VERSION),' \
		mkinitramfs > debian/initramfs-tools-core/usr/sbin/mkinitramfs
	chmod 755 debian/initramfs-tools-core/usr/sbin/mkinitramfs
	dh_install

override_dh_installinitramfs:
	@:

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	tests/functions_test
endif