#!/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