File: rules

package info (click to toggle)
irrlicht 1.8.4+dfsg1-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 44,560 kB
  • sloc: cpp: 153,800; ansic: 3,884; makefile: 899; perl: 104; xml: 43; sh: 21; sed: 11
file content (94 lines) | stat: -rwxr-xr-x 2,855 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/usr/bin/make -f

export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
SOURCE_DATE := $(shell dpkg-parsechangelog --show-field=Date)

# shared library versions, option 1
upstream_version=1.8.4
version=1.8.4
major=1.8
repackv=1
scripts_svn_rev=5339

%:
	dh $@ --sourcedirectory=source/Irrlicht --parallel

override_dh_clean:
	# clean documentation
	rm -rf doctemp
	rm -rf doc/html
	rm -rf doc/latex
	
	# clean everything else
	$(MAKE) -C source/Irrlicht clean
	
	dh_clean

override_dh_auto_build:
	mkdir -p lib/Linux
	
	# build irrlicht shared and static lib
	NDEBUG="true" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
	CXXFLAGS="$(CXXFLAGS)" dh_auto_build -- sharedlib staticlib
	
	# build documentation
	# based off of scripts/doc/irrlicht/makedocumentation.sh
	set -e ; cd scripts/doc/irrlicht && rm -f tut.txt && \
	for i in ../../../examples/[012]*/main.cpp; do \
	  sed -f tutorials.sed "$${i}" >>tut.txt; \
	done && \
	doxygen doxygen.cfg && \
	cp irrlicht.png logobig.png ../../../doctemp/html
	mv doctemp/* doc/

override_dh_installdirs:
	dh_installdirs -plibirrlicht-dev -Pdebian/tmp usr/include/irrlicht \
	usr/lib/$(DEB_HOST_MULTIARCH)

override_dh_auto_install:
	dh_auto_install -- \
	INSTALL_DIR=$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)

override_dh_installchangelogs:
	dh_installchangelogs changes.txt

override_dh_link:
	dh_link -plibirrlicht$(major) \
	usr/lib/$(DEB_HOST_MULTIARCH)/libIrrlicht.so.$(version) \
	usr/lib/$(DEB_HOST_MULTIARCH)/libIrrlicht.so.$(major)

override_dh_strip:
	dh_strip --dbg-package=libirrlicht$(major)-dbg

get-orig-source:
	# Note: scripts/ directory seems to be missing from upstream zip, so download from:
	# https://irrlicht.svn.sourceforge.net/svnroot/irrlicht/branches/releases/1.8/scripts/
	mkdir -p ../repack
	uscan --force-download --destdir ../repack --download-current-version
	( \
		cd ../repack ;\
		unzip -q irrlicht-$(upstream_version).zip ;\
		cd irrlicht-$(upstream_version) ;\
		rm -rf source/Irrlicht/jpeglib ;\
		rm -rf source/Irrlicht/zlib ;\
		rm -rf source/Irrlicht/libpng ;\
		rm -rf source/Irrlicht/lzma ;\
		rm -rf source/Irrlicht/bzip2 ;\
		rm -rf source/Irrlicht/MacOSX ;\
		rm -f source/Irrlicht/glext.h ;\
		rm -f source/Irrlicht/glxext.h ;\
		rm -f source/Irrlicht/wglext.h ;\
		rm -rf bin ;\
		rm -rf media ;\
		rm -rf lib ;\
		rm -rf doc/html ;\
		svn co -r $(scripts_svn_rev) https://svn.code.sf.net/p/irrlicht/code/branches/releases/1.8/scripts/ scripts ;\
		find . -name .svn -exec rm -rf {} \; ;\
		find . \( -name \*.exe -o -name \*.dll \) -exec rm -f {} \; ;\
		cd .. ;\
		GZIP="--best" tar --mtime="$(SOURCE_DATE)" -czf irrlicht_$(upstream_version)+dfsg$(repackv).orig.tar.gz irrlicht-$(upstream_version) ;\
		mv irrlicht_$(upstream_version)+dfsg$(repackv).orig.tar.gz .. ;\
	)
	rm -rf ../repack