summaryrefslogtreecommitdiffstats
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules53
1 files changed, 53 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..032a03a
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,53 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+SHELL := sh -e
+
+include /usr/share/dpkg/architecture.mk
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+override_dh_auto_build:
+ dh_auto_build -- CROSS=$(DEB_HOST_GNU_TYPE)-
+
+override_dh_auto_install:
+ install -D -m 0755 traceroute/traceroute debian/traceroute/usr/bin/traceroute.db
+ install -D -m 0644 traceroute/traceroute.8 debian/traceroute/usr/share/man/man1/traceroute.db.1
+
+ install -D -m 0755 wrappers/traceroute-nanog debian/traceroute/usr/bin/traceroute-nanog
+ ln -s traceroute.db.1.gz debian/traceroute/usr/share/man/man1/traceroute-nanog.1.gz
+
+ install -D -m 0644 libsupp/libsupp.a debian/traceroute/usr/lib/libsupp.a
+ install -D -m 0644 libsupp/clif.h debian/traceroute/usr/include/clif.h
+
+ # Installing symlinks
+ mkdir -p debian/traceroute/usr/share/man/man1
+
+ for _ALTERNATIVE in traceroute6; \
+ do \
+ ln -s traceroute.db debian/traceroute/usr/bin/$${_ALTERNATIVE}.db; \
+ ln -s traceroute.db.1.gz debian/traceroute/usr/share/man/man1/$${_ALTERNATIVE}.db.1.gz; \
+ done
+
+ # Installing wrappers
+ for _WRAPPER in lft traceproto; \
+ do \
+ install -D -m 0755 wrappers/$${_WRAPPER} debian/traceroute/usr/bin/$${_WRAPPER}.db; \
+ ln -s traceroute.db.1.gz debian/traceroute/usr/share/man/man1/$${_WRAPPER}.db.1.gz; \
+ done
+
+ mkdir -p debian/traceroute/usr/share/man/man8
+
+ for _WRAPPER in tcptraceroute; \
+ do \
+ install -D -m 0755 wrappers/$${_WRAPPER} debian/traceroute/usr/sbin/$${_WRAPPER}.db; \
+ ln -s ../man1/traceroute.db.1.gz debian/traceroute/usr/share/man/man8/$${_WRAPPER}.db.8.gz; \
+ done
+
+%:
+ dh ${@}
+
+.PHONY: override_dh_auto_build override_dh_auto_install