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
|
#!/usr/bin/make -f
include /usr/share/quilt/quilt.make
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This has to be exported to make some magic below work.
export DH_OPTIONS
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
CROSS=CC=$(DEB_HOST_GNU_TYPE)-gcc
else
CROSS=
endif
COPTS := -D_GNU_SOURCE -Wall $(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
LOPTS := $(shell dpkg-buildflags --get LDFLAGS)
configure: configure-stamp
configure-stamp: $(QUILT_STAMPFN)
[ ! -f config.make ] || mv config.make debian/config.make.bk
cp -f debian/config.make config.make
[ ! -f config.h ] || mv config.h debian/config.h.bk
cp -f debian/config.h config.h
dh_testdir
touch $@
build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp: configure-stamp
dh_testdir
$(MAKE) $(CROSS) COPTS="$(COPTS)" LOPTS="$(LOPTS)" PROGS="ifconfig arp netstat route rarp slattach plipconfig \
nameif iptunnel ipmaddr mii-tool"
touch $@
clean: unpatch
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
[ ! -f Makefile ] || $(MAKE) clobber
[ ! -f debian/config.h.bk ] || \
mv debian/config.h.bk config.h
[ ! -f debian/config.make.bk ] || \
mv debian/config.make.bk config.make
dh_clean
MANPAGES = arp.8 ethers.5 ifconfig.8 mii-tool.8 nameif.8 netstat.8 \
plipconfig.8 rarp.8 route.8 slattach.8
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs bin sbin usr/sbin
dh_install
$(MAKE) -C po install BASEDIR=$(CURDIR)/debian/net-tools
dh_installman --language=de \
$(wildcard $(addprefix man/de_DE/,$(MANPAGES)))
dh_installman --language=C \
$(wildcard $(addprefix man/en_US/,$(MANPAGES)))
dh_installman --language=fr \
$(wildcard $(addprefix man/fr_FR/,$(MANPAGES)))
dh_installman --language=pt_BR \
$(wildcard $(addprefix man/pt_BR/,$(MANPAGES)))
binary-indep: build install
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs README README.ipv6 TODO
dh_link
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-arch binary-indep
.PHONY: build clean binary-indep binary-arch binary install install-indep \
install-arch
|