File: rules

package info (click to toggle)
box2d 2.4.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 5,920 kB
  • sloc: cpp: 54,320; ansic: 22,948; objc: 1,878; makefile: 23; sh: 12
file content (31 lines) | stat: -rwxr-xr-x 716 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
#!/usr/bin/make -f
#export DH_VERBOSE=1

VER = 2.4.1

%:
	dh $@ --buildsystem=cmake

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
RUN_TESTS=ON
else
RUN_TESTS=OFF
endif

override_dh_auto_configure:
	dh_auto_configure -- \
		-DBOX2D_BUILD_DOCS=ON \
		-DBOX2D_BUILD_UNIT_TESTS=$(RUN_TESTS) \
		-DBOX2D_BUILD_TESTBED=OFF \
		-DBUILD_SHARED_LIBS=ON \
		-DLIB_SUFFIX=/$(DEB_HOST_MULTIARCH)

override_dh_auto_install:
	dh_auto_install
	mkdir -p debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig
	sed -e 's/\$${DEB_HOST_MULTIARCH}/$(DEB_HOST_MULTIARCH)/' \
		-e 's/\$${VER}/$(VER)/' \
		debian/box2d.pc.in > debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/box2d.pc

override_dh_auto_test:
	cd obj-*/bin && ./unit_test