Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 export DH_VERBOSE=1
4
5 export DEB_BUILD_MAINT_OPTIONS := hardening=+all
6 export DH_ALWAYS_EXCLUDE := COPYING:LICENSE
7 export LANG:=C
8
9 include /usr/share/dpkg/pkg-info.mk
10
11 # Get Debian package version
12 DPKG_QUERY_OPTS= --show --showformat='$${version}'
13 DEB_PKG_VERSION=$(call dpkg_late_eval,$1, dpkg-query ${DPKG_QUERY_OPTS} $2)
14
15 # Set CGE version
16 CGE_VER=$(call DEB_PKG_VERSION,CGE_VER,fp-units-castle-game-engine)
17
18 # Get directories
19 CURDIR:=$(shell pwd)
20 TMP_DIR=$(CURDIR)/debian/tmp
21
22 # Set default compilation options
23 BUILDOPTS=\
24 --compiler-option=@castle-game-engine \
25 --compiler-option=@hardening \
26
27 %:
28 dh ${@}
29
30 override_dh_auto_clean:
31 dh_auto_clean -- -i
32 $(MAKE) clean-code
33
34 override_dh_auto_build:override_dh_auto_build-arch override_dh_auto_build-indep
35 override_dh_auto_build-arch:
36 mkdir -p $(TMP_DIR)
37
38 # Once pasdoc ships file_to_pascal_string, the next lines can be simplified
39 fpc -FE$(TMP_DIR) @hardening debian/file_to_pascal_string.dpr
40 PATH=${PATH}:$(TMP_DIR) $(MAKE) generate-code
41
42 ${MAKE} compile CASTLE_ENGINE_TOOL_OPTIONS='$(BUILDOPTS)'
43 inkscape --export-width=48 --export-height=48 freedesktop/castle-model-viewer.svg \
44 --export-filename=freedesktop/castle-model-viewer
45
46 override_dh_auto_build-indep:
47
48 override_dh_auto_test:
49 # Code to run the package test suite.
50 # We need the directories where the files to test are to be
51 # writeable by the current (non-root) user. Copying them in
52 # the current tree is the easiest way to accomplish that.
53 #
54 # TBD. New tests planned using castle-game-engine
55
56 override_dh_auto_install-arch:
57 fpc-depends
58 echo CGE:Version=${CGE_VER} >> debian/castle-model-viewer.substvars
59
60 override_dh_auto_install-indep:
61
62 lintian:
63 lintian -I -i ../${DEB_SOURCE}_${DEB_VERSION}.dsc