File: rules

package info (click to toggle)
box2d 2.3.1%2Bds-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,760 kB
  • sloc: cpp: 23,626; makefile: 48
file content (60 lines) | stat: -rwxr-xr-x 1,859 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/make -f
#export DH_VERBOSE=1
VER   = 2.3.1
UURL  = http://box2d.googlecode.com/svn/tags/v
PKG   = box2d
DTYPE = +ds

%:
	dh $@ --buildsystem=cmake --sourcedirectory=Box2D

override_dh_auto_configure:
	dh_auto_configure -- \
		-DBOX2D_INSTALL=ON \
		-DBOX2D_BUILD_SHARED=ON \
		-DBOX2D_BUILD_STATIC=ON \
		-DBOX2D_BUILD_EXAMPLES=OFF \
		-DLIB_SUFFIX=/$(DEB_HOST_MULTIARCH)

override_dh_auto_build-indep:
	# Build the documentation without TIMESTAMPS, see #779223
	cd Box2D/Documentation && ( cat Doxyfile ; echo "HTML_TIMESTAMP=NO" ) | doxygen -
	$(RM) -v Box2D/Documentation/API/html/*.md5
	$(RM) -v Box2D/Documentation/API/html/*.map
	$(RM) -v Box2D/Documentation/API/html/jquery.js
	rdfind -outputname /dev/null -makesymlinks true Box2D/Documentation/API/html
	symlinks -rsc Box2D/Documentation/API/html

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_installchangelogs:
	dh_installchangelogs Box2D/Changes.txt

override_dh_clean:
	dh_clean
	$(RM) -r Box2D/Documentation/API

## https://wiki.debian.org/onlyjob/get-orig-source
get-orig-source: $(PKG)_$(VER).orig.tar.xz
	@

$(PKG)_$(VER).orig.tar.xz:
	svn checkout --config-option config:miscellany:use-commit-times=yes \
		$(UURL)$(VER) $(PKG)-$(VER) \
		|| $(RM) -r $(PKG)-$(VER)
	@echo "Clean-up..."
	cd $(PKG)-$(VER) \
	&& find . -depth -name ".svn" -exec $(RM) -r '{}' \; \
	&& $(RM) -r -v \
		Contributions \
		Box2D/glew \
		Box2D/glfw
	@echo "Packing..."
	find -L "$(PKG)-$(VER)" -xdev -type f -print \
		| sort | XZ_OPT="-7v" tar -caf "$(PKG)_$(VER)$(DTYPE).orig.tar.xz" -T- --owner=root --group=root --mode=a+rX \
		&& $(RM) -r "$(PKG)-$(VER)"