| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) |
| 4 |
ifeq ($(DEB_HOST_ARCH),i386) |
| 5 |
arch-depends := -V'arch:Suggests=toshset' |
| 6 |
endif |
| 7 |
|
| 8 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 9 |
|
| 10 |
ifeq (linux,$(DEB_HOST_ARCH_OS)) |
| 11 |
CONFIGURE_EXTRA_FLAGS += --with-systemdsystemunitdir=/lib/systemd/system |
| 12 |
else |
| 13 |
CONFIGURE_EXTRA_FLAGS += --with-systemdsystemunitdir=no |
| 14 |
endif |
| 15 |
|
| 16 |
%: |
| 17 |
dh ${@} |
| 18 |
|
| 19 |
override_dh_auto_build: |
| 20 |
dh_auto_build --sourcedirectory=debian/addons/fakekey -- all |
| 21 |
|
| 22 |
override_dh_auto_clean: |
| 23 |
dh_auto_clean |
| 24 |
|
| 25 |
make -C debian/addons/fakekey clean |
| 26 |
|
| 27 |
override_dh_install: |
| 28 |
dh_install |
| 29 |
|
| 30 |
[ ! -d debian/acpi-support ] || find debian/acpi-support/etc/acpi -name "*.sh" -exec chmod a+x {} \; |
| 31 |
[ ! -d debian/acpi-support ] || chmod a-x debian/acpi-support/usr/share/acpi-support/state-funcs |
| 32 |
[ ! -d debian/acpi-support-base ] || find debian/acpi-support-base/etc/acpi -name "*.sh" -exec chmod a+x {} \; |
| 33 |
|
| 34 |
override_dh_installinit: |
| 35 |
dh_installinit -pacpi-support --no-start |
| 36 |
dh_installinit -pacpi-fakekey --no-start |
| 37 |
|
| 38 |
# Keep this manually generated so that it doesn't build-dep on |
| 39 |
# 'linux-headers' and stays predictable. |
| 40 |
|
| 41 |
key-constants: /usr/include/linux/input.h debian/addons/build/aliased-keys |
| 42 |
test -f $< |
| 43 |
echo -n '# Generated from $< dated ' > $@ |
| 44 |
date -r $< >> $@ |
| 45 |
awk '/#define *KEY_/{if(strtonum($$3) <= 255) print $$2"="strtonum($$3)}' $< | sort -nt'=' -k2 >> $@ |
| 46 |
test -f debian/addons/build/aliased-keys && cat debian/addons/build/aliased-keys >> $@ |