File: rules

package info (click to toggle)
dnsmasq 2.35-1%2Betch4
  • links: PTS
  • area: main
  • in suites: etch
  • size: 1,292 kB
  • ctags: 833
  • sloc: ansic: 10,148; perl: 643; sh: 420; makefile: 108
file content (82 lines) | stat: -rwxr-xr-x 2,971 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
72
73
74
75
76
77
78
79
80
81
82
#!/usr/bin/make -f
# debian/rules file - for dnsmasq.
# Copyright 2001 by Simon Kelley
# Based on the sample in the debian hello package which carries the following:
# 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

# Pay no attention to the man behind the curtain......
DBUS ?= -DHAVE_DBUS

package=dnsmasq

clean:
	$(checkdir)
	rm -rf debian/tmp debian/*~ debian/files debian/substvars
	make clean

binary-arch:	checkroot 
	$(checkdir)
	rm -rf debian/tmp
	install -d debian/tmp/DEBIAN\
	        -d debian/tmp/usr/share/doc/$(package)\
	        -d debian/tmp/etc/init.d\
	        -d debian/tmp/etc/resolvconf/update.d\
	        -d debian/tmp/etc/default\
		-d debian/tmp/etc/dbus-1/system.d\
	        -d debian/tmp/var/run\
	        -d debian/tmp/var/lib/misc
	install -m 644 debian/conffiles debian/tmp/DEBIAN
	install -m 755 debian/postinst debian/postrm debian/prerm debian/tmp/DEBIAN
	install -m 755 debian/init debian/tmp/etc/init.d/dnsmasq
	install -m 755 debian/resolvconf debian/tmp/etc/resolvconf/update.d/dnsmasq
	install -m 644 debian/default debian/tmp/etc/default/dnsmasq
	install -m 644 dnsmasq.conf.example debian/tmp/etc/dnsmasq.conf
	install -m 644 dbus/dnsmasq.conf debian/tmp/etc/dbus-1/system.d/dnsmasq.conf
	make install-i18n PREFIX=/usr DESTDIR=`pwd`/debian/tmp COPTS=$(DBUS)
	cp doc.html debian/tmp/usr/share/doc/$(package)/.
	cp setup.html debian/tmp/usr/share/doc/$(package)/.
	cp FAQ debian/tmp/usr/share/doc/$(package)/.
	gzip -9 debian/tmp/usr/share/doc/$(package)/FAQ
	cp CHANGELOG debian/tmp/usr/share/doc/$(package)/changelog
	gzip -9 debian/tmp/usr/share/doc/$(package)/changelog
	cp dbus/DBus-interface debian/tmp/usr/share/doc/$(package)/.
	gzip -9 debian/tmp/usr/share/doc/$(package)/DBus-interface	
	cp debian/changelog debian/tmp/usr/share/doc/$(package)/changelog.Debian
	gzip -9 debian/tmp/usr/share/doc/$(package)/changelog.Debian
	cp debian/readme debian/tmp/usr/share/doc/$(package)/README.Debian
	cp debian/copyright debian/tmp/usr/share/doc/$(package)/copyright
	gzip -9 debian/tmp/usr/share/man/man8/dnsmasq.8
	for f in debian/tmp/usr/share/man/*; do \
		if [ -f $$f/man8/dnsmasq.8 ]; then \
                       gzip -9 $$f/man8/dnsmasq.8 ; \
                fi \
	done
	strip -R .note -R .comment debian/tmp/usr/sbin/dnsmasq
	dpkg-shlibdeps debian/tmp/usr/sbin/dnsmasq
	dpkg-gencontrol -isp
	chown -R root.root debian/tmp
	chmod -R g-ws debian/tmp
	dpkg --build debian/tmp ..

define checkdir
	test -f FAQ -a -f debian/rules
endef

# Below here is fairly generic really

binary:		binary-arch
build:		
binary-indep:
          
checkroot:
	$(checkdir)
	test root = "`whoami`"

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