File: rules

package info (click to toggle)
spider 1.1-9
  • links: PTS
  • area: main
  • in suites: woody
  • size: 644 kB
  • ctags: 1,043
  • sloc: ansic: 6,251; makefile: 609; sh: 15
file content (97 lines) | stat: -rwxr-xr-x 2,175 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

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/X11R6/bin
	install -d debian/tmp/usr/lib/menu
#  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

#  Install programs
#
	install -s small.spider round.spider debian/tmp/usr/X11R6/bin
#  Link large card program as default
#
	ln -s /usr/X11R6/bin/round.spider debian/tmp/usr/X11R6/bin/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/*
#  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
#  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