File: rules

package info (click to toggle)
passage 4%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,692 kB
  • sloc: cpp: 18,864; objc: 272; sh: 134; makefile: 122; perl: 67; ansic: 44
file content (55 lines) | stat: -rwxr-xr-x 2,413 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export PNGRBT=-define png:exclude-chunk=time
export PNGRBTD=+set date:create +set date:modify $(PNGRBT)

%:
	dh $@

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

override_dh_auto_build:
	mkdir -p 256x256 64x64 32x32
	convert -scale 256x256 gamma256/gameSource/iPhone/LargeIcon.png $(PNGRBTD) 256x256/passage.png
	convert -background None -gravity center -extent 64x64 gamma256/gameSource/iPhone/Icon.png $(PNGRBTD) 64x64/passage.png
	convert -type Grayscale -negate gamma256/build/macOSX/iconMask.png $(PNGRBTD) mask.png
	composite -compose CopyOpacity mask.png gamma256/build/macOSX/iconColor.png $(PNGRBT) passage.png
	convert -scale 32x32 passage.png $(PNGRBTD) 32x32/passage.png
	convert 32x32/passage.png 32x32/passage.xpm
	sed -i -e 's/PLATFORM_COMPILE_FLAGS = */PLATFORM_COMPILE_FLAGS = $$(CFLAGS) $$(CPPFLAGS) /' gamma256/gameSource/Makefile
	sed -i -e 's/PLATFORM_LINK_FLAGS = */PLATFORM_LINK_FLAGS = $$(LDFLAGS) /' gamma256/gameSource/Makefile
	dh_auto_build --buildsystem=makefile --sourcedirectory=gamma256/gameSource -- LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS) -DETCDIR=\\\"/etc/passage\\\" -DDATADIR=\\\"/usr/share/games/passage/\\\""

override_dh_auto_clean:
	find gamma256 -name "*.o" -delete
	find minorGems -name "*.o" -delete
	rm -f gamma256/gameSource/Passage
	rm -f gamma256/gameSource/Makefile
	rm -f gamma256/gameSource/Makefile.minorGems_dependencies
	rm -rf 256x256 64x64 32x32 passage.png mask.png

override_dh_installchangelogs:
	dh_installchangelogs gamma256/documentation/changeLog.txt

V=4
P=Passage
p=passage
sfp=hcsoftware/Passage

get-orig-source:
	wget -c http://downloads.sourceforge.net/project/$(sfp)/v$(V)/$(P)_$(V)_UnixSource.tar.gz
	tar xf $(P)_v$(V)_UnixSource.tar.gz
	# Embedded code copies, unused
	rm -rf $(P)_v$(V)_UnixSource/minorGems/graphics/converters/lodepng.*
	# Pre-built Windows libraries, unused
	rm $(P)_v$(V)_UnixSource/gamma256/build/win32/*.dll
	# non-free, unused
	rm -r $(P)_v$(V)_UnixSource/minorGems/util/development/fortify
	# Useless iPhone reports
	rm $(P)_v$(V)_UnixSource/gamma256/gameSource/iPhone/reports/*.txt
	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