File: rules

package info (click to toggle)
0ad 0.0.23.1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 78,292 kB
  • sloc: cpp: 245,166; ansic: 200,249; python: 13,754; sh: 6,104; perl: 4,620; makefile: 977; xml: 810; java: 533; ruby: 229; erlang: 46; pascal: 30; sql: 21; tcl: 4
file content (63 lines) | stat: -rwxr-xr-x 1,900 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/make -f

# mozjs' build process does not seem to be compatible with other shells
# like zsh
export SHELL = /bin/sh

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

include /usr/share/dpkg/architecture.mk

PARALLEL_JOBS=$(shell getconf _NPROCESSORS_ONLN)
ifeq ($(findstring parallel=,$(DEB_BUILD_OPTIONS)),)
	export DEB_BUILD_OPTIONS+=parallel=$(PARALLEL_JOBS)
endif

%:
	dh $@

override_dh_auto_clean:
	build/workspaces/clean-workspaces.sh
	# Clean up some extra cruft not picked up by clean-workspaces.sh
	find binaries/system/ -type f ! -name readme.txt -delete
	rm -f libraries/fcollada/lib/*.a
	rm -f build/premake/.*.tmp
	rm -f libraries/source/spidermonkey/lib/*
	rm -f libraries/source/cxxtest-4.4/python/cxxtest/*.pyc
	rm -f libraries/source/fcollada/lib/*
	rm -rf libraries/source/spidermonkey/include-unix-*
	rm -f source/ps/tests/stub_impl_hack.cpp
	dh_auto_clean

override_dh_auto_build:
	mkdir -p libraries/source/fcollada/lib
	build/workspaces/update-workspaces.sh \
		--bindir=/usr/games \
		--libdir=/usr/lib/games/0ad \
		--datadir=/usr/share/games/0ad \
		--with-system-nvtt \
		-j$(PARALLEL_JOBS)
	
	$(MAKE) config=release verbose=1 -C build/workspaces/gcc \
		-j$(PARALLEL_JOBS)

override_dh_auto_test:
	# Note: Avoid running tests from root dir of build, otherwise certain
	# tests (i.e. in testsuite MeshManager) may not work as intended and
	# create spurious directories above root dir (../data/mods).
ifeq (,$(filter armhf arm64 kfreebsd-amd64 kfreebsd-i386, $(DEB_HOST_ARCH)))
	cd binaries/system/ && LD_LIBRARY_PATH=. ./test -libdir .
endif

override_dh_auto_install:
	install -Dm 0755 build/resources/0ad.sh $(CURDIR)/debian/tmp/usr/games/0ad
	dh_auto_install

override_dh_strip:
	dh_strip --dbgsym-migration='0ad-dbg (<< 0.0.20-2~)'

override_dh_makeshlibs:
	dh_makeshlibs -Xusr/lib/games/0ad