File: rules

package info (click to toggle)
mgt 2.31-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 432 kB
  • ctags: 588
  • sloc: ansic: 4,862; sh: 411; pascal: 329; makefile: 122; csh: 3
file content (60 lines) | stat: -rwxr-xr-x 1,706 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
#!/usr/bin/make -f
#
# modified from sample debian.rules file for GNU Hello by Ian Jackson.
# updated to 2.3.0.1 standards by Martin Mitchell <martin@debian.org>

package=mgt
STRIP=strip

binfiles=mailgo mgt mgt2short wrapmgt
libfiles=Rules Sample.01 Sample.02
manfiles=mailgo.6 mgt.6 mgt2short.6 wrapmgt.6
docfiles=Prop.lst README Smart-Go.def Spec.io

# The next section may have to be extensively modified

build:
	$(checkdir)
	$(MAKE) LDFLAGS=-s
	touch build

clean:
	$(checkdir)
	-rm -f wrapmgt build
	-$(MAKE) -i clean
	-rm -rf debian/tmp *~
	-rm -f debian/files debian/substvars

binary-indep:	checkroot build

binary-arch:	checkroot build
	-rm -rf debian/tmp
	install -d debian/tmp/DEBIAN debian/tmp/usr/share/doc/mgt debian/tmp/usr/games debian/tmp/usr/lib/games/mgt debian/tmp/usr/share/man/man6
	install -m 0755 $(binfiles) debian/tmp/usr/games
	install -m 0644 $(libfiles) debian/tmp/usr/lib/games/mgt
	install -m 0644 *.6 debian/tmp/usr/share/man/man6
	gzip -9v debian/tmp/usr/share/man/man6/*
	install -m 0644 $(docfiles) debian/tmp/usr/share/doc/mgt
	cp debian/changelog debian/tmp/usr/share/doc/mgt/changelog.Debian
	gzip -9v debian/tmp/usr/share/doc/mgt/*
	cp debian/copyright debian/tmp/usr/share/doc/mgt
	$(STRIP) --remove-section=.note --remove-section=.comment debian/tmp/usr/games/mgt debian/tmp/usr/games/wrapmgt
	dpkg-shlibdeps debian/tmp/usr/games/*
	dpkg-gencontrol -isp
	chown -R root:root debian/tmp
	chmod -R g-ws debian/tmp
	dpkg --build debian/tmp ..

define checkdir
	test -f $(package).c
endef

# Below here is fairly generic really

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

binary:	binary-indep binary-arch

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