File: rules

package info (click to toggle)
firmware-microbit-micropython 1.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 25,448 kB
  • sloc: ansic: 83,496; cpp: 27,664; python: 2,475; asm: 274; makefile: 243; javascript: 41; sh: 25
file content (43 lines) | stat: -rwxr-xr-x 1,463 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
42
43
#!/usr/bin/make -f

export DH_VERBOSE=1

export LANG=C.UTF-8
export LC_ALL=C.UTF-8

%:
	dh $@ --with sphinxdoc

override_dh_auto_clean:
	dh_auto_clean
	rm -rf build
	rm -f inc/genhdr/microbitversion.h

override_dh_auto_build:
	# rename directories created from components tarballs (we note that
	# the underscore is not valid in the "component name" section of the
	# original source tarball filename, so must handle it here)
	mv yotta-targets yotta_targets
	mv yotta-modules yotta_modules
	# build the firmware
	make all
	# revert directories created from components tarballs
	mv yotta_targets yotta-targets
	mv yotta_modules yotta-modules
	# build documentation and remove sources
	PYTHONPATH=. http_proxy='127.0.0.1:9' https_proxy='127.0.0.1:9' python3 -m sphinx -N -bhtml docs/ build/html
	# fix duplicated images created by sphinx-build
	rm -f build/html/_images/speech-pitch1.png
	ln -sr build/html/_images/speech-pitch.png build/html/_images/speech-pitch1.png
	rm -f build/html/_images/scroll-hello1.gif
	ln -sr build/html/_images/scroll-hello.gif build/html/_images/scroll-hello1.gif
	rm -f build/html/_images/speech1.png
	ln -sr build/html/_images/speech.png build/html/_images/speech1.png

override_dh_fixperms:
	dh_fixperms
	find debian/firmware-microbit-micropython/usr/share/doc/firmware-microbit-micropython/examples \
			-name "*.py" -exec chmod -x '{}' \;

# all tests are executed on an attached micro:bit, so disable them
override_dh_auto_test: