File: rules

package info (click to toggle)
xphoon 18sep91-4
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 476 kB
  • ctags: 447
  • sloc: ansic: 955; makefile: 449; sh: 4
file content (50 lines) | stat: -rwxr-xr-x 1,586 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
#!/usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.

package=$(shell sed -n -e 's/Package: *\([a-z]\)/\1/p' debian/control)

build:
	xmkmf && make CCOPTIONS="-O2 -g -Wall" && touch build

clean:
	-rm -f build
	-make clean
	-rm -f `find . -name "*~"` Makefile
	-rm -rf debian/tmp debian/files* core debian/substvars

binary-indep:	build
# There are no architecture-independent files to be uploaded
# generated by this package.  If there were any they would be
# made here.

binary-arch:	build
	-rm -rf debian/tmp
	install -d debian/tmp -d debian/tmp/usr/games \
	  -d debian/tmp/usr/man/man6 \
	  -d debian/tmp/usr/doc/$(package) -d debian/tmp/usr/lib/menu
	install -s -m 755 $(package) debian/tmp/usr/games
	install    -m 644 $(package).man \
	  debian/tmp/usr/man/man6/$(package).6x
	cp debian/changelog debian/tmp/usr/doc/$(package)/changelog.Debian
	cp debian/menu debian/tmp/usr/lib/menu/$(package)
	-gzip -9f debian/tmp/usr/man/man6/$(package).6x \
		  debian/tmp/usr/doc/$(package)/*
	cp debian/copyright debian/tmp/usr/doc/$(package)/copyright
	dpkg-shlibdeps $(package)
	chmod a+x debian/postinst
	install -d debian/tmp/DEBIAN
	cd debian/tmp &&\
	  md5sum `find * -name DEBIAN -prune -o -type f -print`\
	   > DEBIAN/md5sums
	cp debian/postinst debian/tmp/DEBIAN
	dpkg-gencontrol
	chown -R root.root debian/tmp
	chmod -R go=rX debian/tmp
	dpkg --build debian/tmp ..

# Below here is fairly generic really

binary:		binary-indep binary-arch

.PHONY: binary binary-arch binary-indep clean