File: rules

package info (click to toggle)
maplay 1.2b-3
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 432 kB
  • ctags: 441
  • sloc: cpp: 5,417; sh: 97; makefile: 86
file content (71 lines) | stat: -rwxr-xr-x 1,741 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# -*- makefile -*-
# debian/rules file - for maplay
# Copyright 1996 by Brian Mays
# Patterned after the hello package by Ian Jackson.

package=maplay

build:
	$(checkdir)
	sh -f configuration.sh ULAWFLAG=-DULAW
#	mv maplay maplay-ulaw
#	$(MAKE) clean
#	sh -f configuration.sh ULAWFLAG=
	touch build

clean:
	$(checkdir)
	$(RM) build
	$(MAKE) clean
	$(RM) maplay-ulaw
	$(RM) -r *~ debian/tmp debian/*~ debian/files*

binary-indep:	checkroot build
	$(checkdir)

binary-arch:	checkroot build
	$(chechdir)
	$(RM) -r debian/tmp
	install -d debian/tmp debian/tmp/DEBIAN
	install -d debian/tmp/usr/doc/$(package)
# Install directories
	install -d debian/tmp/usr/{bin,man/man1}
# Install files
	cp maplay debian/tmp/usr/bin
#	cp maplay-ulaw debian/tmp/usr/bin
# Strip binaries
	strip debian/tmp/usr/bin/*
# Install documentation
	cp README* debian/tmp/usr/doc/$(package)/.
	cp maplay.1 debian/tmp/usr/man/man1
# Install changelog & copyright
	cp debian/changelog debian/tmp/usr/doc/$(package)/changelog.Debian
	gzip -9v debian/tmp/usr/doc/$(package)/*
	gzip -9v debian/tmp/usr/man/*/*
#	ln -sf maplay.1.gz debian/tmp/usr/man/man1/maplay-ulaw.1.gz
	cp debian/copyright debian/tmp/usr/doc/$(package)/.
# Determine shared library dependencies
	dpkg-shlibdeps maplay # maplay-ulaw
# Genereate deb file
	dpkg-gencontrol
	chown -R root.root debian/tmp
	chmod -R g-ws debian/tmp
	dpkg --build debian/tmp ..

define checkdir
	test -f $(package).cc -a -f debian/rules
endef

# Below here is fairly generic really

binary:		binary-indep binary-arch

source diff:
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

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

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