File: rules

package info (click to toggle)
flash-kernel 3.107
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 716 kB
  • sloc: sh: 519; makefile: 36
file content (48 lines) | stat: -rwxr-xr-x 1,340 bytes parent folder | download | duplicates (3)
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
42
43
44
45
46
47
48
#! /usr/bin/make -f

AUTOGEN_DEB_FILES := flash-kernel.templates flash-kernel-installer.postinst default/flash-kernel

ifeq (yes,$(shell dpkg-vendor --derives-from Ubuntu && echo yes))
DEFAULT_CMDLINE := quiet splash
else
DEFAULT_CMDLINE := quiet
endif

override_dh_auto_install:
	for i in $(AUTOGEN_DEB_FILES); do \
		sed "s/@DEFAULT_CMDLINE@/$(DEFAULT_CMDLINE)/" \
			< debian/$$i.in > debian/$$i; \
	done

	install -m0755 -p -d debian/flash-kernel/etc/flash-kernel/bootscript
	set -ex ; for arch in all $(DEB_HOST_ARCH) ; do \
		[ -d bootscript/$${arch} ] || continue ; \
		install -m0644 bootscript/$${arch}/bootscr.* \
			debian/flash-kernel/etc/flash-kernel/bootscript/ ; \
	done
ifeq (armhf,$(DEB_HOST_ARCH))
	install -m0644 bootscript/$(DEB_HOST_ARCH)/olpc.fth \
		debian/flash-kernel/etc/flash-kernel/bootscript/
endif

	dh_auto_install

override_dh_auto_clean:
	for i in $(AUTOGEN_DEB_FILES); do \
		rm -f debian/$$i; \
	done
	dh_auto_clean

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	FK_CHECKOUT=. ./test_db
	FK_CHECKOUT=. ./test_flash-kernel
	FK_CHECKOUT=. ./test_functions

# check alphabetic ordering of database
# The key for each entry is its first Machine: line
	awk '/^$$/ { seen=0 } seen == 0 && /^Machine: / { seen=1; print }' db/all.db | LC_ALL=C sort --check --ignore-case
endif

%:
	dh $@