| 1 |
|
| 2 |
%: |
| 3 |
dh $@ |
| 4 |
|
| 5 |
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) |
| 6 |
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) |
| 7 |
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) |
| 8 |
|
| 9 |
ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) |
| 10 |
CROSS := |
| 11 |
else |
| 12 |
CROSS := CC=$(DEB_HOST_GNU_TYPE)-gcc STRIP=$(DEB_HOST_GNU_TYPE)-strip |
| 13 |
endif |
| 14 |
|
| 15 |
override_dh_auto_build: debian/templates.gen |
| 16 |
ifeq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) |
| 17 |
$(MAKE) small $(CROSS) |
| 18 |
else |
| 19 |
$(MAKE) DEBUG=1 $(CROSS) |
| 20 |
endif |
| 21 |
|
| 22 |
debian/templates.gen: debian/templates-arch |
| 23 |
debian/templates-build.pl $(DEB_HOST_ARCH) < $< > $@ |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
touch -mr $< $@ |
| 28 |
|
| 29 |
test: |
| 30 |
dh_auto_test |
| 31 |
|
| 32 |
override_dh_install-arch: |
| 33 |
dh_install |
| 34 |
if [ -e "kernel/$(DEB_HOST_ARCH).sh" ]; then \ |
| 35 |
install -D -m644 "kernel/$(DEB_HOST_ARCH).sh" \ |
| 36 |
debian/bootstrap-base/usr/lib/base-installer/kernel.sh; \ |
| 37 |
fi |
| 38 |
|
| 39 |
override_dh_installdebconf-arch: |
| 40 |
dh_installdebconf |
| 41 |
(echo ; cat debian/templates.gen) >> debian/bootstrap-base/DEBIAN/templates |