2
## This is the debian.rules file for the package
3
## ratfor, by Emilio C. Lopes <ecl@finpe.if.usp.br>.
4
## updated by Alan Bain <afrb2@cam.ac.uk>.
6
## updated based on f2c's files and hello package
10
arch = $(shell dpkg --print-architecture)
15
## Builds the binary package.
20
## Undoes the effect of `make -f debian.rules build'.
21
make -f Makefile clean
22
rm -f stamp-build debian/files debian/substvars
25
binary-indep: checkroot build
28
binary-arch: checkroot build
30
## Makes a binary package.
31
test -f stamp-build || make -f debian/rules build
32
rm -rf debian/tmp >& /dev/null
33
install -d -o root -g root -m 755 debian/tmp
35
install -d -o root -g root -m 755 debian/tmp/usr/bin
36
install -s -o root -g root -m 755 ratfor debian/tmp/usr/bin
37
install -d -o root -g root -m 755 debian/tmp/usr/share/man/man1
38
install -o root -g root -m 644 ratfor.1 debian/tmp/usr/share/man/man1
39
gzip -9f debian/tmp/usr/share/man/man1/ratfor.1
40
install -d -o root -g root -m 755 debian/tmp/usr/share/doc/$(package)
41
install -o root -g root -m 644 BUGS\
42
debian/tmp/usr/share/doc/$(package)
43
## do package copyright
44
install -d -o root -g root -m 755 debian/tmp/usr/share/doc/$(package)
45
install -o root -g root -m 644 debian/copyright \
46
debian/tmp/usr/share/doc/$(package)/copyright
47
install -d -o root -g root -m 755 debian/tmp/usr/share/doc/$(package)/examples
48
install -o root -g root -m 644 *.r \
49
debian/tmp/usr/share/doc/$(package)/examples
50
gzip -9f debian/tmp/usr/share/doc/$(package)/examples/*.r
51
install -d -o root -g root -m 755 debian/tmp/DEBIAN
52
install -m 755 debian/postinst \
53
debian/tmp/DEBIAN/postinst
54
install -m 755 debian/prerm \
55
debian/tmp/DEBIAN/prerm
57
install -c -m 0644 debian/changelog \
58
debian/tmp/usr/share/doc/$(package)/changelog.Debian
59
gzip -9 debian/tmp/usr/share/doc/$(package)/changelog.Debian
60
dpkg-shlibdeps ./ratfor
62
chown -R root.root debian/tmp
63
chmod -R go-ws debian/tmp
64
dpkg --build debian/tmp ..
67
test -f rat4.c -a -f debian/rules
70
## Below Here is Generic
72
binary: binary-indep binary-arch
75
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
77
dist: binary source diff changes
81
test root = "`whoami`"
82
.PHONY: binary binary-arch binary-indep clean checkroot