File: rules

package info (click to toggle)
multitee 3.0-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 136 kB
  • ctags: 243
  • sloc: ansic: 1,668; makefile: 31
file content (47 lines) | stat: -rwxr-xr-x 1,296 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
#!/usr/bin/make -f
#
# Copyright (C) 1998 Roberto Lumbreras <rover@debian.org>
# Copying: GPL

SHELL	=	/bin/bash
CC	=	gcc
CFLAGS	=	-O2 -g

# tee is provided by shellutils, so we don't have to build it
build:		checkdir multitee # tee
		touch build

multitee:	multitee.o sigdfl.o sigsched.o ralloc.o getopt.o fmt.o scan.o
tee:		tee.o getopt.o ralloc.o fmt.o

binary:         binary-indep binary-arch

binary-indep:

binary-arch:    build checkroot
		rm -rf debian/tmp
		install -d -m 0755 debian/tmp/{DEBIAN,usr/{bin,share/{man/man1,doc/multitee}}}
		install -s -m 0755 multitee debian/tmp/usr/bin/
		install -m 0644 multitee.1 debian/tmp/usr/share/man/man1/
		install -m 0644 debian/changelog debian/tmp/usr/share/doc/multitee/changelog.Debian
		gzip -9fr debian/tmp/usr/share/
		install -m 0644 debian/copyright debian/tmp/usr/share/doc/multitee/

		dpkg-shlibdeps multitee
		dpkg-gencontrol -isp
		chown -R root.root debian/tmp
		chmod -R go=rX debian/tmp
		dpkg --build debian/tmp ..

checkdir:
		@test -f debian/rules

checkroot:	checkdir
		@test 0 = `id -u` || { echo "Error: not super-user"; exit 1; }

clean:		checkdir
		rm -f build debian/files debian/substvars
		rm -f tee multitee *.o *.a *.0 *~ core
		rm -rf debian/tmp

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