File: rules

package info (click to toggle)
acpi-support 0.142-8
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 788 kB
  • sloc: sh: 1,068; ansic: 131; makefile: 33
file content (41 lines) | stat: -rwxr-xr-x 1,258 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
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/make -f

include /usr/share/quilt/quilt.make

DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
ifeq ($(DEB_HOST_ARCH),i386)
arch-depends := -V'arch:Suggests=toshset'
endif

%:
	dh ${@} --with quilt,systemd

override_dh_auto_build:
	make -C debian/addons/fakekey all

override_dh_auto_clean:
	dh_auto_clean

	make -C debian/addons/fakekey clean

override_dh_install:
	dh_install

	[ ! -d debian/acpi-support ] || find debian/acpi-support/etc/acpi -name "*.sh" -exec chmod a+x {} \;
	[ ! -d debian/acpi-support ] || chmod a-x debian/acpi-support/usr/share/acpi-support/state-funcs
	[ ! -d debian/acpi-support-base ] || find debian/acpi-support-base/etc/acpi -name "*.sh" -exec chmod a+x {} \;

override_dh_installinit:
	dh_installinit -pacpi-support --no-start
	dh_installinit -pacpi-fakekey

# Keep this manually generated so that it doesn't build-dep on
# 'linux-headers' and stays predictable.

key-constants: /usr/include/linux/input.h debian/addons/build/aliased-keys
	test -f $<
	echo -n '# Generated from $< dated ' > $@
	date -r $< >> $@
	awk '/#define  *KEY_/{if(strtonum($$3) <= 255) print $$2"="strtonum($$3)}' $< | sort -nt'=' -k2 >> $@
	test -f debian/addons/build/aliased-keys && cat debian/addons/build/aliased-keys >> $@