File: rules

package info (click to toggle)
xtux 0.2.030306-12
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 10,200 kB
  • ctags: 2,009
  • sloc: ansic: 11,703; makefile: 174; perl: 126; sh: 44
file content (97 lines) | stat: -rwxr-xr-x 2,800 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
95
96
97
#!/usr/bin/make -f
#-*- makefile -*-
# Made with the aid of dh_make, by Craig Small
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# Some lines taken from debmake, by Christoph Lameter.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

build: build-stamp
build-stamp:
	dh_testdir
	QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2
	$(MAKE) 
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp install-stamp
	[ ! -f Makefile ] || $(MAKE) clean
	QUILT_PATCHES=debian/patches quilt pop -a -R || test $$? = 2

	rm -f src/client/config.cache src/client/config.log src/client/config.status

	dh_clean

install: install-stamp
install-stamp: build-stamp
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	
	# install by hand
	cp xtux debian/xtux-client/usr/games/xtux
	cp tux_serv debian/xtux-server/usr/games/xtux-server
	cp -a data/* debian/xtux-levels/usr/share/games/xtux
	cp -a doc/* debian/xtux-levels/usr/share/doc/xtux-levels
	find debian/xtux-levels/usr/share/games/xtux -type f | xargs chmod 644
	find debian/xtux-levels/usr/share/games/xtux -type d | xargs chmod 755
	
	# install GGZ stuff
	#cp src/ggz/xtux.dsc debian/xtux-server/etc/ggz/games/
	#cp src/ggz/xtux.room debian/xtux-server/etc/ggz/rooms/
	#cp src/ggz/xtuxclient.dsc debian/xtux-client/etc/ggz/clients/xtux.dsc
	
	# move images
	rm -Rf `find debian/xtux-levels/usr/share/games/xtux/images \
			-type d -name .xvpics`
	mv debian/xtux-levels/usr/share/games/xtux/images \
		debian/xtux-common/usr/share/games/xtux/
	
	# copy our nice icon and tell lintian it's in xtux-levels
	cp debian/xtux.xpm debian/xtux-levels/usr/share/games/xtux/
	for package in xtux-server xtux-client; do \
		echo "$${package}: menu-icon-missing /usr/share/games/xtux/xtux.xpm" > debian/$${package}/usr/share/lintian/overrides/$${package} ; \
	done
	
	touch install-stamp
	
	for p in xtux-common xtux-client xtux-server xtux; do \
		ln -s xtux-levels debian/$${p}/usr/share/doc/$${p} ; done

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir -i
	dh_testroot -i
	dh_installdocs -p xtux-levels AUTHORS README
	dh_installexamples -p xtux-levels debian/example-config
	dh_installmenu -i
	dh_installchangelogs -i CHANGELOG
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir -a
	dh_testroot -a
	dh_installmenu -a
	dh_installman -p xtux-client debian/xtux.6
	dh_installman -p xtux-server debian/xtux-server.6
	dh_strip -a
	dh_compress -a
	dh_fixperms -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary