File: rules

package info (click to toggle)
spider 1.2-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 852 kB
  • ctags: 1,229
  • sloc: ansic: 6,250; makefile: 839; sh: 9
file content (111 lines) | stat: -rwxr-xr-x 2,841 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#! /usr/bin/make -f

P=spider

build:
	$(checkdir)
# build big cards first
#
	cp round.Imakefile Imakefile
	xmkmf
	make clean
	make
	mv spider round.spider
# build small cards next
#
	cp small.Imakefile Imakefile
	xmkmf
	make clean
	cat cards.bm.aa cards.bm.ab >cards.bm
	make
	mv spider small.spider
	touch build

clean:
	$(checkdir)
	-rm -f build
	make clean
	-rm -rf round.spider small.spider
	-rm -rf *~ debian/tmp debian/*~ debian/files*

binary-indep:	
# None
	@echo 'No architecture indepenent portions for this package'; false

binary binary-arch:	checkroot build
	$(checkdir)
#  First clean up old directory
#
	-rm -rf debian/tmp
#  build new directories in temp
#
	install -d debian/tmp debian/tmp/DEBIAN
	install -d debian/tmp/usr/share/doc/$(P)
	install -d debian/tmp/usr/games
	install -d debian/tmp/usr/lib/menu
	install -d debian/tmp/usr/share/pixmaps
#  Install post install and pre remove scripts
#
	cp debian/postinst debian/tmp/DEBIAN/.
	chmod +x debian/tmp/DEBIAN/postinst
	cp debian/prerm debian/tmp/DEBIAN/.
	chmod +x debian/tmp/DEBIAN/prerm
	cp debian/postrm debian/tmp/DEBIAN/.
	chmod +x debian/tmp/DEBIAN/postrm

#  Install programs
#
	install -s small.spider round.spider debian/tmp/usr/games

#  install icons
#
	install -m 644 icons/Spider32x32.xpm debian/tmp/usr/share/pixmaps/Spider32x32.xpm
	install -m 644 icons/GladeSpider32x32.xpm debian/tmp/usr/share/pixmaps/GladeSpider32x32.xpm
	install -m 644 icons/Spider.png debian/tmp/usr/share/pixmaps/Spider.png
	install -m 644 icons/GladeSpider.png debian/tmp/usr/share/pixmaps/GladeSpider.png
	install -m 644 icons/Spider32.png debian/tmp/usr/share/pixmaps/Spider32.png

#  Link large card program as default
#
	ln -s round.spider debian/tmp/usr/games/spider
#  Install menu file
#
	install -m 644 debian/menu debian/tmp/usr/lib/menu/spider
#  Install and compress man pages
#
	install -d debian/tmp/usr/share/man/man1
	install -m 644 spider.man debian/tmp/usr/share/man/man1/spider.1
	gzip -9v debian/tmp/usr/share/man/man1/*
	(cd debian/tmp/usr/share/man/man1;ln -s spider.1.gz round.spider.1.gz)
	(cd debian/tmp/usr/share/man/man1;ln -s spider.1.gz small.spider.1.gz)
#  Install and compress doc files
#
	cp debian/changelog debian/tmp/usr/share/doc/$(P)/changelog.Debian
	cp doc.* debian/tmp/usr/share/doc/$(P)/.
	gzip -9v debian/tmp/usr/share/doc/$(P)/*
#  Except the copyright file
#
	install -m 644 debian/copyright debian/tmp/usr/share/doc/$(P)/
#  Compute dependencies
#
	dpkg-shlibdeps round.spider
#  Generate control information
#
	dpkg-gencontrol -isp
#  Set permissions
#
	chown -R root.root debian/tmp
	chmod -R g-ws debian/tmp
#  Build the package file
#
	dpkg --build debian/tmp ..

define checkdir
	test -f $(P).c -a -f debian/rules
endef

checkroot:
	$(checkdir)
	test root = "`whoami`"

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