File: rules

package info (click to toggle)
rbootd 2.0-6
  • links: PTS
  • area: main
  • in suites: woody
  • size: 196 kB
  • ctags: 237
  • sloc: ansic: 1,634; sh: 70; makefile: 63
file content (94 lines) | stat: -rwxr-xr-x 2,812 bytes parent folder | download | duplicates (3)
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/usr/bin/make -f
# Sample debian.rules file - for GNU Hello (1.3).
# Copyright 1994,1995 by Ian Jackson.

# Modified to be rules for rbootd by Alan Bain 1998

# I hereby give you perpetual unlimited permission to copy,
# modify and relicense this file, provided that you do not remove
# my name from the file itself.  (I assert my moral right of
# paternity under the Copyright, Designs and Patents Act 1988.)
# This file may have to be extensively modified

package=rbootd

ARCH  := $(shell dpkg --print-architecture)


export BASEDIR=$(shell pwd)/debian/tmp

## Note must use the special makefile to avoid needing BSD make

build:
	$(checkdir)
	$(MAKE) -f Makefile.linux CFLAGS="-O2 -g -Wall" rbootd
	touch build

clean:
	$(checkdir)
	$(MAKE) -f Makefile.linux clean
	-rm -f build
	-rm -rf debian/tmp debian/files* core debian/substvars

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

# Install and strip rather than strip binary left here

binary-arch:	checkroot build
	$(checkdir)
	rm -rf debian/tmp
	install -d debian/tmp
	cd debian/tmp;install -d `cat ../dirs`
	install -d ${BASEDIR}/DEBIAN
	install -o root -g root -m 0755 -s rbootd ${BASEDIR}/usr/sbin
	install -o root -g root -m 0755 debian/rbootd.init.d ${BASEDIR}/etc/init.d/rbootd
	install -o root -g root -m 0644 etc-rbootd/* ${BASEDIR}/etc
	install -o root -g root -m 0644 rbootd.8 ${BASEDIR}/usr/share/man/man8
	@if [ -f ${BASEDIR}/usr/share/man/man8/rbootd.8 ]; then \
	  gzip -9v ${BASEDIR}/usr/share/man/man8/rbootd.8 ; \
	fi

	install -o root -g root -m 0644 README \
	  ${BASEDIR}/usr/share/doc/rbootd/README
	@if [ -f ${BASEDIR}/usr/share/doc/rbootd/README ]; then \
	  gzip -9v ${BASEDIR}/usr/share/doc/rbootd/README ;\
	fi
	install -o root -g root -m 0644 debian/copyright \
	  ${BASEDIR}/usr/share/doc/rbootd/copyright
	install -o root -g root -m 0644 debian/changelog \
	  ${BASEDIR}/usr/share/doc/rbootd/changelog.Debian
       
	@if [ -f ${BASEDIR}/usr/share/doc/rbootd/changelog.Debian ]; then \
	  gzip -9v ${BASEDIR}/usr/share/doc/rbootd/changelog.Debian ; \
	fi
	install -o root -g root -m 0644 debian/conffiles \
	  ${BASEDIR}/DEBIAN
	install -o root -g root -m 0755 debian/{postinst,prerm,postrm} \
	  ${BASEDIR}/DEBIAN	
	install -d ${BASEDIR}/var/lib/rbootd
	dpkg-shlibdeps rbootd
	dpkg-gencontrol
	chown -R root.root debian/tmp
	chmod -R go-ws debian/tmp
	dpkg --build debian/tmp ..

define checkdir
	test -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