File: rules

package info (click to toggle)
gravitation 3+dfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 2,176 kB
  • ctags: 1,599
  • sloc: cpp: 13,160; objc: 245; sh: 134; makefile: 94; perl: 67
file content (47 lines) | stat: -rwxr-xr-x 1,812 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
	dh $@ --parallel

override_dh_auto_configure:
	chmod u+x game5/gameSource/configure
	cd game5/gameSource && platformSelection=1 ./configure

override_dh_auto_build:
	convert -type Grayscale -negate ./game5/build/macOSX/iconMask.png mask.png
	composite -compose CopyOpacity mask.png ./game5/build/macOSX/iconColor.png gravitation.png
	mkdir -p 32x32
	convert -scale 32x32 gravitation.png 32x32/gravitation.png
	convert 32x32/gravitation.png 32x32/gravitation.xpm
	sed -i -e 's/PLATFORM_COMPILE_FLAGS = */PLATFORM_COMPILE_FLAGS = $$(CFLAGS) $$(CPPFLAGS) /' game5/gameSource/Makefile
	sed -i -e 's/PLATFORM_LINK_FLAGS = */PLATFORM_LINK_FLAGS = $$(LDFLAGS) /' game5/gameSource/Makefile
	$(MAKE) -C game5/gameSource LDFLAGS="-lpthread $(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS) -DETCDIR=\\\"/etc/gravitation\\\" -DDATADIR=\\\"/usr/share/games/gravitation/\\\""

override_dh_auto_clean:
	find game5 -name "*.o" -delete
	find minorGems -name "*.o" -delete
	rm -f game5/gameSource/Gravitation
	rm -f game5/gameSource/Makefile
	rm -f game5/gameSource/Makefile.dependencies
	rm -rf mask.png gravitation.png 32x32

override_dh_installchangelogs:
	dh_installchangelogs game5/documentation/changeLog.txt

V=3
P=Gravitation
p=gravitation
sfp=hcsoftware/Gravitation

get-orig-source:
	wget -c http://downloads.sourceforge.net/project/$(sfp)/v$(V)/$(P)_$(V)_UnixSource.tar.gz
	tar zxf $(P)_$(V)_UnixSource.tar.gz
	# Pre-built Windows libraries, unused
	rm $(P)_$(V)_UnixSource/game2/build/win32/*.dll
	# non-free, unused
	rm -r $(P)_$(V)_UnixSource/minorGems/util/development/fortify
	mv $(P)_$(V)_UnixSource $(p)-$(V)+dfsg1.orig
	tar zcf ../$(p)_$(V)+dfsg1.orig.tar.gz $(p)-$(V)+dfsg1.orig
	rm -r $(P)_$(V)_UnixSource.tar.gz $(p)-$(V)+dfsg1.orig