File: rules

package info (click to toggle)
lincity 1.10-4
  • links: PTS
  • area: main
  • in suites: slink
  • size: 3,272 kB
  • ctags: 2,368
  • sloc: cpp: 21,292; makefile: 241; sh: 26
file content (85 lines) | stat: -rwxr-xr-x 1,957 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
#!/usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.

package=lincity

# If your architecture has svgalib support, add it to this list
svgalib-archs=i386

ARCH:=$(shell dpkg --print-architecture)
ifneq (,$(findstring $(ARCH), $(svgalib-archs)))
make_target=all
else
make_target=xlincity
endif

build:
	$(checkdir)
	
	make $(make_target)

	touch build

clean:
	$(checkdir)
	-rm -f build
	-make clean
	-rm -f `find . -name "*~"`
	-rm -f lincity xlincity
	-rm -rf debian/tmp `find debian/* -type d` debian/files* core
	-rm -f debian/*substvars
	dh_clean

binary-indep:	build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs -i
	make install DESTDIR=`pwd`/debian/tmp
	rm -rf debian/tmp/usr/games
	dh_installdocs -i README README.INSTALL README.profiling FAQ Acknowledgements
	dh_installmanpages -i
	dh_installchangelogs -i CHANGES
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_builddeb -i
	

binary-arch:	build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs -a
	make install DESTDIR=`pwd`/debian/tmp
ifneq (,$(findstring $(ARCH), $(svgalib-archs)))
	dh_movefiles -plincity-svga
	install -d debian/lincity-svga/usr/doc
	ln -s lincity debian/lincity-svga/usr/doc/lincity-svga
	chmod a-s debian/lincity-svga/usr/games/lincity
endif
	dh_movefiles -plincity-x
	install -d debian/lincity-x/usr/man/man6
	ln -s lincity.6.gz debian/lincity-x/usr/man/man6/xlincity.6.gz
	install -d debian/lincity-x/usr/doc
	ln -s lincity debian/lincity-x/usr/doc/lincity-x
	dh_installmenu -a
	dh_strip -a
	dh_compress -a
	dh_fixperms -a
	dh_installdeb -a
	dh_shlibdeps -a
ifneq (,$(findstring $(ARCH), $(svgalib-archs)))
	dh_gencontrol -plincity-svga
	dh_builddeb -plincity-svga
endif
	dh_gencontrol -plincity-x
	dh_builddeb -plincity-x

# Below here is fairly generic really

binary:		binary-indep binary-arch

.PHONY: binary binary-arch binary-indep clean