File: rules

package info (click to toggle)
iputils 3%3A20161105-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,060 kB
  • ctags: 1,282
  • sloc: ansic: 11,706; perl: 585; makefile: 344; sh: 277
file content (109 lines) | stat: -rwxr-xr-x 2,812 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
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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode. 
#export DH_VERBOSE=1

export CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
export CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
export DEBIAN_LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)

# This has to be exported to make some magic below work.
export DH_OPTIONS

TARGETS=ping tracepath traceroute6 clockdiff arping

configure:
	dh_testdir

build-arch: configure
	dh_testdir
	$(MAKE) $(TARGETS)

build-indep: configure
	dh_testdir
	$(MAKE) -C doc man

build: build-arch build-indep

clean:
	dh_testdir
	dh_testroot

	$(MAKE) clean
	dh_clean

install: DH_OPTIONS=
install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs -piputils-tracepath usr/bin
	dh_installdirs -piputils-ping bin
	dh_installdirs -piputils-arping usr/bin
	dh_installdirs -piputils-clockdiff usr/bin

	install -m 4755 -o root -g root ping debian/iputils-ping/bin/
	ln -s ping debian/iputils-ping/bin/ping6
	ln -s ping debian/iputils-ping/bin/ping4
	install -m 4755 -o root -g root traceroute6 \
		debian/iputils-tracepath/usr/bin/traceroute6.iputils
	install -m 0755 -o root -g root tracepath \
		debian/iputils-tracepath/usr/bin/
	install -m 0755 -o root -g root arping debian/iputils-arping/usr/bin/
	install -m 0755 -o root -g root clockdiff \
		debian/iputils-clockdiff/usr/bin/

# Build architecture-independent files here.
# Pass -i to all debhelper commands in this target to reduce clutter.
binary-indep: DH_OPTIONS=
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installexamples
	dh_installmenu
	dh_installchangelogs 
	dh_link
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# Build architecture-dependent files here.
# Pass -a to all debhelper commands in this target to reduce clutter.
binary-arch: DH_OPTIONS=
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installexamples
	dh_installmenu
	dh_lintian
	dh_installcron
	dh_installman -piputils-ping
	dh_installman -piputils-tracepath
	mv debian/iputils-tracepath/usr/share/man/man8/traceroute6.8 \
		debian/iputils-tracepath/usr/share/man/man8/traceroute6.iputils.8
	dh_installman -piputils-arping
	dh_installman -piputils-clockdiff
	dh_installchangelogs 
	dh_strip
	dh_link
	dh_compress
	dh_fixperms
	chmod 755 debian/iputils-ping/bin/ping
	chmod 755 debian/iputils-tracepath/usr/bin/traceroute6.iputils
	chmod 755 debian/iputils-arping/usr/bin/arping
	chmod 755 debian/iputils-clockdiff/usr/bin/clockdiff
	ln -sf ping.8.gz debian/iputils-ping/usr/share/man/man8/ping6.8.gz
	ln -sf ping.8.gz debian/iputils-ping/usr/share/man/man8/ping4.8.gz
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-arch # no binary-indep
.PHONY: build configure clean binary-indep binary-arch binary install