File: rules

package info (click to toggle)
bind 1%3A8.1.2-3
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 5,072 kB
  • ctags: 7,956
  • sloc: ansic: 54,480; sh: 6,937; makefile: 2,900; yacc: 1,223; perl: 315; lex: 221; awk: 45; sed: 15
file content (186 lines) | stat: -rwxr-xr-x 6,889 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
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
#!/usr/bin/make -f

# Sample debian.rules file - for GNU Hello (1.3).
# Copyright 1994,1995 by Ian Jackson.
# 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
#
# Modified to be a prototype for debmake by Christoph Lameter
# <clameter@debian.org>

package=bind
version=$(shell expr `pwd` : '.*-\([0-9.].*\)')
version_main=$(shell expr `pwd` : '.*-\([0-9]*.[0-9.]*\)')
include OLD/BSD/Makefile.maninc
moresed = -e s@/usr/share/misc/nslookup@/usr/lib/nslookup@g
rblcheck=rblcheck-1.4

SHELL=/bin/bash

build: stamp-build

stamp-build:
	$(checkdir)
	-$(MAKE) DST=target SRC=$$(pwd) links
	cp -avf port/linux/include/sys/* target/port/linux/include/sys
	touch target/port/linux/include/nlist.h
	cd target; $(MAKE) CC="$(CC) -I/usr/include/libelf" CDEBUG=""
	cd host; $(MAKE) CC="$(CC)" COPTS="-O2"
	cd $(rblcheck); $(MAKE) CC="$(CC)" LDFLAGS="-lresolv"
	install -d debian/tmp/usr/man/man{1,8}
	touch stamp-build


stamp-man:
	install -d debian/tmp/usr/man/man{1,3,5,7,8}
	for file in debian/{dig,dnsquery}.1 debian/{*.3,*.5,*.7,*.8}; do \
	    base=$$(basename $$file); \
	    ext=$$(echo $$file | sed -e "s/.*\(.\)$$/\1/"); \
	    ( $(EXT_SED_CMD) $(moresed) ) < $$file \
		> debian/tmp/usr/man/man$$ext/$${base}bind; \
	done;
	touch stamp-man


clean:
	$(checkdir)
	$(MAKE) clean
	cd host; $(MAKE) clean
	cd $(rblcheck); $(MAKE) clean
	rm -rf $$(find . -name "*~") $$(find debian/* -type d) stamp-*
	rm -rf target debian/files* target debian/*substvars* pgptemp*
	find .. -name $(package)*.asc -size 0 -maxdepth 1 -exec rm {} ";"
	chmod +x debian/{pre*,post*,bindconfig,dnsutils.p*,init.d,ppp.d}


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


dnsutils: stamp-build stamp-man
	$(checkdir)
	rm -rf debian/dnsutils && install -d debian/dnsutils/{DEBIAN,usr/bin}
	install -d debian/dnsutils/usr/{lib,doc/dnsutils,man/man{1,8}}
	install debian/dnsutils.preinst debian/dnsutils/DEBIAN/preinst
	install debian/dnsutils.postrm debian/dnsutils/DEBIAN/postrm
	cp host/RELEASE_NOTES debian/dnsutils/usr/doc/dnsutils/changelog
	cp debian/changelog debian/dnsutils/usr/doc/dnsutils/changelog.Debian
	install host/host debian/dnsutils/usr/bin/host
	cd debian/dnsutils; cat ../hosts | xargs -t -i sh -c \
		"ln -s host usr/bin/{}"
	cp host/host.1 debian/dnsutils/usr/man/man1/host.1
	cp debian/tmp/usr/man/man1/dig.1bind \
		debian/dnsutils/usr/man/man1/dig.1
	cp debian/tmp/usr/man/man8/nslookup.8bind \
		debian/dnsutils/usr/man/man8/nslookup.8
	ln -s ../man7/undocumented.7.gz \
		debian/dnsutils/usr/man/man1/mxlookup.1.gz
	ln -s ../man7/undocumented.7.gz \
		debian/dnsutils/usr/man/man1/rblcheck.1.gz
	ln -s ../man7/undocumented.7.gz \
		debian/dnsutils/usr/man/man1/addr.1.gz
	cd debian/dnsutils; cat ../hosts | xargs -t -i sh -c \
		"ln -s host.1.gz usr/man/man1/{}.1.gz"
	install target/bin/addr/addr debian/dnsutils/usr/bin
	install target/bin/dig/dig debian/dnsutils/usr/bin
	install target/bin/nslookup/nslookup debian/dnsutils/usr/bin
	install host/mxlookup debian/dnsutils/usr/bin/mxlookup
	install $(rblcheck)/rblcheck debian/dnsutils/usr/bin/rblcheck
	cp $(rblcheck)/README \
		debian/dnsutils/usr/doc/dnsutils/README.rblcheck
	cp bin/nslookup/nslookup.help debian/dnsutils/usr/lib/nslookup.help
	gzip -v9 debian/dnsutils/usr/{doc/dnsutils/*,man/*/*{1,8}}
	cp debian/copyright debian/dnsutils/usr/doc/dnsutils
	dh_shlibdeps -pdnsutils -Pdebian/dnsutils -v
	dpkg-gencontrol -pdnsutils -Pdebian/dnsutils
	dh_strip -v -pdnsutils -Pdebian/dnsutils
	chown -R root.root debian/dnsutils
	chmod -R go=rX debian/dnsutils
	dpkg --build debian/dnsutils ..
 

bind: stamp-build stamp-man
	$(checkdir)
	rm -rf debian/bind && install -d debian/bind/{DEBIAN,usr/{bin,sbin}}
	install -d debian/bind/{/usr/{lib,doc/bind,man/man{1,8}},var/named}
#	install -d debian/bind/etc/{ppp/ip-up.d,ppp/ip-down.d,init.d}
	install -d debian/bind/etc/init.d
	cp -p debian/{pre*,post*,conffiles} debian/bind/DEBIAN
	install debian/init.d debian/bind/etc/init.d/bind
	cp debian/changelog debian/bind/usr/doc/bind/changelog.Debian
	cp CHANGES debian/bind/usr/doc/bind/changelog
	cp INSTALL debian/bind/usr/doc/bind
#	install debian/ppp.d debian/bind/etc/ppp/ip-up.d/bind
#	install debian/ppp.d debian/bind/etc/ppp/ip-down.d/bind
	install -d debian/bind/usr/{lib,doc/bind,man/man{1,8}}
	install debian/{bindconfig,named-bootconf} debian/bind/usr/sbin
	install target/bin/named/named debian/bind/usr/sbin
	install target/bin/named-xfer/named-xfer debian/bind/usr/sbin
	sed "s/ps -p/ps p/g" target/bin/ndc/ndc > debian/bind/usr/sbin/ndc \
	    && chmod 755 debian/bind/usr/sbin/ndc
	install target/bin/nsupdate/nsupdate debian/bind/usr/sbin
	install target/bin/dnsquery/dnsquery debian/bind/usr/bin
	cp -a debian/tmp/usr/man debian/bind/usr
	rm -r debian/bind/usr/man/man3
	ln -s ../man7/undocumented.7.gz \
		debian/bind/usr/man/man8/named-bootconf.8bind.gz
	ln -s ../man7/undocumented.7.gz \
		debian/bind/usr/man/man8/bindconfig.8bind.gz
	ln -s ../man7/undocumented.7.gz \
		debian/bind/usr/man/man8/nsupdate.8bind.gz
	ln -s ../man7/undocumented.7.gz \
		debian/bind/usr/man/man8/named-bootconf.pl.8bind.gz
	rm debian/bind/usr/man/man{1/dig.1bind,8/nslookup.8bind}
	gzip -v9 debian/bind/usr/{doc/bind/*,man/*/*bind}
	cp debian/copyright debian/bind/usr/doc/bind
	cp README TODO debian/bind/usr/doc/bind
	cp bin/named/named-bootconf.pl debian/bind/usr/sbin
	cp debian/named.{l*,r*} debian/bind/var/named
	dh_shlibdeps -pbind -Pdebian/bind -v
	dpkg-gencontrol -pbind -Pdebian/bind
	dh_strip -v -pbind -Pdebian/bind
	$(MAKE) -f debian/rules buildinfo
	chown -R root.root debian/bind
	chmod -R go=rX debian/bind
	dpkg --build debian/bind ..


buildinfo:
	@echo; dpkg -l gcc "libc*" binutils ldso make dpkg-dev $(BUILDINFO) \
		| awk '$$1 == "ii" { printf("%s-%s\n", $$2, $$3) }' \
		| tee debian/bind/usr/doc/$(package)/buildinfo.Debian; echo
	cd debian/bind && md5sum $$(find * -type f -not -regex "DEBIAN/.*") \
		> DEBIAN/md5sums
#	-cd debian/bind && pgp -sat +clearsig=on DEBIAN/md5sums -o files.sig \
#		&& mv -v files.sig usr/doc/$(package)/checksums.txt
#	rm -f debian/bind/files.sig
	cd debian/bind && md5sum $$(find * -type f -not -regex "DEBIAN/.*") \
		> DEBIAN/md5sums


 
binary-arch: checkroot dnsutils bind


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: build binary binary-arch binary-indep clean checkroot