This patch adds another package for most common network binary tools
like ping, ping6, etc.

Signed-off-by: Alexander Aring <alex.ar...@gmail.com>
---
v2:
 - Add missing ALLYES

 rules/iputils.in   | 118 ++++++++++++++++++++++++++++++++++++++++++++
 rules/iputils.make | 141 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 259 insertions(+)
 create mode 100644 rules/iputils.in
 create mode 100644 rules/iputils.make

diff --git a/rules/iputils.in b/rules/iputils.in
new file mode 100644
index 0000000..a83fa5a
--- /dev/null
+++ b/rules/iputils.in
@@ -0,0 +1,118 @@
+## SECTION=networking
+
+menuconfig IPUTILS
+       tristate
+       prompt "iputils                       "
+       select LIBC_RESOLV      if IPUTILS_PING6
+       select LIBCAP           if IPUTILS_ARPING || IPUTILS_PING || 
IPUTILS_PING6 || IPUTILS_TRACEROUTE6
+       select GNUTLS           if IPUTILS_PING6
+       select GNUTLS_OPENSSL   if IPUTILS_PING6
+       help
+         The iputils package is set of small useful utilities for Linux
+         networking.
+
+if IPUTILS
+
+config IPUTILS_ARPING
+       bool
+       depends on !BUSYBOX_ARPING || ALLYES
+       prompt "arping"
+       help
+         Ping destination on device interface by ARP packets, using source
+         address source.
+
+comment "BusyBox' arping is selected!"
+        depends on BUSYBOX_ARPING
+
+config IPUTILS_CLOCKDIFF
+       bool
+       prompt "clockdiff"
+       help
+         Measures clock difference between us and destination with 1 msec
+         resolution.
+
+config IPUTILS_PING
+       bool
+       depends on !INETUTILS_PING || ALLYES
+       prompt "ping"
+       help
+         The ping command uses the ICMP protocol's mandatory ECHO_REQUEST 
datagram
+         to elicit an ICMP ECHO_RESPONSE from a host or gateway. ECHO_REQUEST
+         datagrams pings have an IP and ICMP header, followed by a struct
+         timeval and then an arbitrary number of pad bytes used to fill out
+         the packet.
+
+comment "BusyBox' ping is selected!"
+        depends on BUSYBOX_PING
+
+comment "inetutils' ping is selected!"
+        depends on INETUTILS_PING
+
+config IPUTILS_PING6
+       bool
+       depends on !INETUTILS_PING6 || ALLYES
+       prompt "ping6"
+       depends on GLOBAL_IPV6
+       help
+         The ping6 command is IPv6 version of ping, and can also send Node
+         Information Queries (RFC4620). Intermediate hops may not be allowed,
+         because IPv6 source routing was deprecated (RFC5095).
+
+comment "BusyBox' ping6 is selected!"
+        depends on BUSYBOX_PING6
+
+comment "inetutils' ping6 is selected!"
+        depends on INETUTILS_PING6
+
+config IPUTILS_RARPD
+       bool
+       prompt "rarpd"
+       help
+         Listens RARP (http://tools.ietf.org/rfc/rfc903.txt) requests from
+         clients. Provided MAC address of client is found in /etc/ethers
+         database and obtained host name is resolvable to an IP address
+         appropriate for attached network, rarpd answers to client with
+         RARPD reply carrying an IP address.
+
+config IPUTILS_RDISC
+       bool
+       prompt "rdisc"
+       help
+         The rdisc command implements client side of the ICMP router discover
+         protocol. rdisc is invoked at boot time to populate the network
+         routing tables with default routes.
+
+config IPUTILS_TFTPD
+       bool
+       depends on !INETUTILS_TFTPD || ALLYES
+       prompt "tftpd"
+       help
+
+comment "BusyBox' tftpd is selected!"
+        depends on BUSYBOX_TFTPD
+
+comment "inetutils' tftpd is selected!"
+        depends on INETUTILS_TFTPD
+
+config IPUTILS_TRACEPATH
+       bool
+       prompt "tracepath"
+       help
+
+config IPUTILS_TRACEPATH6
+       bool
+       prompt "tracepath6"
+       depends on GLOBAL_IPV6
+       help
+
+config IPUTILS_TRACEROUTE6
+       bool
+       depends on !BUSYBOX_TRACEROUTE6 || ALLYES
+       prompt "traceroute6"
+       depends on GLOBAL_IPV6
+       help
+
+comment "BusyBox' traceroute6 is selected!"
+        depends on BUSYBOX_TRACEROUTE6
+
+endif
diff --git a/rules/iputils.make b/rules/iputils.make
new file mode 100644
index 0000000..9685370
--- /dev/null
+++ b/rules/iputils.make
@@ -0,0 +1,141 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2014 by Alexander Aring <a...@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_IPUTILS) += iputils
+
+#
+# Paths and names
+#
+IPUTILS_VERSION        := s20121221
+IPUTILS_MD5    := 6072aef64205720dd1893b375e184171
+IPUTILS                := iputils-$(IPUTILS_VERSION)
+IPUTILS_SUFFIX := tar.bz2
+IPUTILS_URL    := http://www.skbuff.net/iputils/$(IPUTILS).$(IPUTILS_SUFFIX)
+IPUTILS_SOURCE := $(SRCDIR)/$(IPUTILS).$(IPUTILS_SUFFIX)
+IPUTILS_DIR    := $(BUILDDIR)/$(IPUTILS)
+IPUTILS_LICENSE        := GPLv2
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+IPUTILS_CONF_TOOL      := NO
+IPUTILS_MAKEVARS       := $(CROSS_ENV)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/iputils.install:
+       @$(call targetinfo)
+       mkdir -p $(IPUTILS_PKGDIR)/usr/bin
+
+ifdef PTXCONF_IPUTILS_ARPING
+       install -m0755 $(IPUTILS_DIR)/arping $(IPUTILS_PKGDIR)/usr/bin
+endif
+
+ifdef PTXCONF_IPUTILS_CLOCKDIFF
+       install -m0755 $(IPUTILS_DIR)/clockdiff $(IPUTILS_PKGDIR)/usr/bin
+endif
+
+ifdef PTXCONF_IPUTILS_PING
+       install -m0755 $(IPUTILS_DIR)/ping $(IPUTILS_PKGDIR)/usr/bin
+endif
+
+ifdef PTXCONF_IPUTILS_PING6
+       install -m0755 $(IPUTILS_DIR)/ping6 $(IPUTILS_PKGDIR)/usr/bin
+endif
+       @$(call touch)
+
+ifdef PTXCONF_IPUTILS_RARPD
+       install -m0755 $(IPUTILS_DIR)/rarpd $(IPUTILS_PKGDIR)/usr/bin
+endif
+
+ifdef PTXCONF_IPUTILS_RDISC
+       install -m0755 $(IPUTILS_DIR)/rdisc $(IPUTILS_PKGDIR)/usr/bin
+endif
+
+ifdef PTXCONF_IPUTILS_TFTPD
+       install -m0755 $(IPUTILS_DIR)/tftpd $(IPUTILS_PKGDIR)/usr/bin
+endif
+
+ifdef PTXCONF_IPUTILS_TRACEPATH
+       install -m0755 $(IPUTILS_DIR)/tracepath $(IPUTILS_PKGDIR)/usr/bin
+endif
+
+ifdef PTXCONF_IPUTILS_TRACEPATH6
+       install -m0755 $(IPUTILS_DIR)/tracepath6 $(IPUTILS_PKGDIR)/usr/bin
+endif
+
+ifdef PTXCONF_IPUTILS_TRACEROUTE6
+       install -m0755 $(IPUTILS_DIR)/traceroute6 $(IPUTILS_PKGDIR)/usr/bin
+endif
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/iputils.targetinstall:
+       @$(call targetinfo)
+
+       @$(call install_init, iputils)
+       @$(call install_fixup, iputils,PRIORITY,optional)
+       @$(call install_fixup, iputils,SECTION,base)
+       @$(call install_fixup, iputils,AUTHOR,"Alexander Aring 
<a...@pengutronix.de>")
+       @$(call install_fixup, iputils,DESCRIPTION,missing)
+
+ifdef PTXCONF_IPUTILS_ARPING
+       @$(call install_copy, iputils, 0, 0, 0755, -, /usr/bin/arping)
+endif
+
+ifdef PTXCONF_IPUTILS_CLOCKDIFF
+       @$(call install_copy, iputils, 0, 0, 0755, -, /usr/bin/clockdiff)
+endif
+
+ifdef PTXCONF_IPUTILS_PING
+       @$(call install_copy, iputils, 0, 0, 0755, -, /usr/bin/ping)
+endif
+
+ifdef PTXCONF_IPUTILS_PING6
+       @$(call install_copy, iputils, 0, 0, 0755, -, /usr/bin/ping6)
+endif
+
+ifdef PTXCONF_IPUTILS_RARPD
+       @$(call install_copy, iputils, 0, 0, 0755, -, /usr/bin/rarpd)
+endif
+
+ifdef PTXCONF_IPUTILS_RDISC
+       @$(call install_copy, iputils, 0, 0, 0755, -, /usr/bin/rdisc)
+endif
+
+ifdef PTXCONF_IPUTILS_TFTPD
+       @$(call install_copy, iputils, 0, 0, 0755, -, /usr/bin/tftpd)
+endif
+
+ifdef PTXCONF_IPUTILS_TRACEPATH
+       @$(call install_copy, iputils, 0, 0, 0755, -, /usr/bin/tracepath)
+endif
+
+ifdef PTXCONF_IPUTILS_TRACEPATH6
+       @$(call install_copy, iputils, 0, 0, 0755, -, /usr/bin/tracepath6)
+endif
+
+ifdef PTXCONF_IPUTILS_TRACEROUTE6
+       @$(call install_copy, iputils, 0, 0, 0755, -, /usr/bin/traceroute6)
+endif
+
+       @$(call install_finish, iputils)
+
+       @$(call touch)
+
+# vim: syntax=make
-- 
1.8.5.3


-- 
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to