File: rules

package info (click to toggle)
firmware-tomu 2.0~rc7-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 3,104 kB
  • sloc: ansic: 7,007; makefile: 301; xml: 15; sh: 12
file content (30 lines) | stat: -rwxr-xr-x 955 bytes parent folder | download
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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
    export MAKE = make -j2 "INSTALL=install --strip-program=true" QUIET=
endif

CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)

%:
	dh $@

override_dh_auto_build:
		cd toboot && $(MAKE)
		cd booster && $(MAKE)
		gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) booster/make-booster.c -o booster/make-booster
		cd booster && ./make-booster ../toboot/toboot.bin toboot-booster.bin && cp toboot-booster.bin toboot-booster.dfu
		dfu-suffix --pid 0x70b1 --vid 0x1209 --add booster/toboot-booster.dfu

override_dh_auto_clean:
		cd toboot && $(MAKE) clean
		cd booster && $(MAKE) clean
		$(RM) booster/make-booster booster/toboot-booster.bin booster/toboot-booster.dfu

override_dh_fixperms:
		dh_fixperms
		chmod 644 debian/firmware-tomu/usr/lib/firmware-tomu/*