net-tools: add route utility 10835/head
authorMartin Schiller <ms@dev.tdt.de>
Thu, 19 Dec 2019 08:02:20 +0000 (09:02 +0100)
committerMartin Schiller <ms@dev.tdt.de>
Tue, 7 Jan 2020 09:27:34 +0000 (10:27 +0100)
Extend (and rename) the existing mii-tool package to also support
the net-tools route command.

This may be needed if you want to support other address families than
inet/inet6 like x.25.

Also bump to version 2018-11-03.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
net/mii-tool/Makefile [deleted file]
net/mii-tool/patches/001-mii-tool-4.9-compatibility.patch [deleted file]
net/net-tools/Makefile [new file with mode: 0644]

diff --git a/net/mii-tool/Makefile b/net/mii-tool/Makefile
deleted file mode 100644 (file)
index 5aac0c4..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# Copyright (C) 2006-2010 OpenWrt.org
-# Copyright (C) 2016 Stijn Segers
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=mii-tool
-PKG_SOURCE_DATE:=2016-10-06
-PKG_SOURCE_VERSION:=115f1af2494ded1fcd21c8419d5e289bc4df380f
-PKG_RELEASE:=3
-
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://git.code.sf.net/p/net-tools/code
-PKG_MIRROR_HASH:=43d9d042ffe2db784256de5df8e77d688f0808f2b890351a21b902c798fa6310
-
-PKG_MAINTAINER:=Stijn Segers <borromini.reg@protonmail.com>
-PKG_LICENSE:=GPL-2.0-or-later
-PKG_LICENSE_FILES:=COPYING
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/mii-tool
-  SECTION:=net
-  CATEGORY:=Network
-  TITLE:=configure media type using MII commands
-  URL:=http://net-tools.sourceforge.net/
-endef
-
-define Package/mii-tool/description
-       The mii-tool command allows you to set or autodetect the media type
-       or mii chipset-based ethernet devices. It traditionally had been
-       distributed in the net-tools package. This is a single distribution
-       optimized for embedded systems and fully automated cross/-sysroot-builds
-endef
-
-define Build/Configure
-       # Failed configure.sh leaves stub config.h around.
-       rm -f $(PKG_BUILD_DIR)/config.h
-       ( cd $(PKG_BUILD_DIR); yes $$$$'\n' | ./configure.sh config.in )
-endef
-
-define Package/mii-tool/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/mii-tool $(1)/usr/sbin/
-endef
-
-$(eval $(call BuildPackage,mii-tool))
diff --git a/net/mii-tool/patches/001-mii-tool-4.9-compatibility.patch b/net/mii-tool/patches/001-mii-tool-4.9-compatibility.patch
deleted file mode 100644 (file)
index 2472b1c..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/iptunnel.c       2016-07-10 20:15:29.000000000 +0200
-+++ b/iptunnel.c       2017-10-19 19:51:09.172782821 +0200
-@@ -26,7 +26,6 @@
- #include <sys/socket.h>
- #include <sys/ioctl.h>
- #include <netinet/in.h>
--#include <netinet/ip.h>
- #include <arpa/inet.h>
- #include <net/if.h>
- #include <net/if_arp.h>
diff --git a/net/net-tools/Makefile b/net/net-tools/Makefile
new file mode 100644 (file)
index 0000000..5290451
--- /dev/null
@@ -0,0 +1,73 @@
+#
+# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2016 Stijn Segers
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=net-tools
+PKG_SOURCE_DATE:=2018-11-03
+PKG_SOURCE_VERSION:=0eebece8c964e3cfa8a018f42b2e7e751a7009a0
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://git.code.sf.net/p/net-tools/code
+PKG_MIRROR_HASH:=9d978b9f8ccae4af623a299155c62d9b3d31213182c785f925bf8704d48a04c9
+
+PKG_MAINTAINER:=Stijn Segers <borromini.reg@protonmail.com>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/mii-tool
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=configure media type using MII commands
+  URL:=http://net-tools.sourceforge.net/
+endef
+
+define Package/mii-tool/description
+       The mii-tool command allows you to set or autodetect the media type
+       or mii chipset-based ethernet devices. It traditionally had been
+       distributed in the net-tools package. This is a single distribution
+       optimized for embedded systems and fully automated cross/-sysroot-builds
+endef
+
+define Package/net-tools-route
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=net-tools - route utility
+  URL:=http://net-tools.sourceforge.net/
+  PROVIDES:=route
+  ALTERNATIVES:=300:/sbin/route:/usr/libexec/net-tools-route
+endef
+
+define Package/net-tools-route/description
+       Replace busybox version of the route command with the full net-tools
+       version. This is normally not needed as busybox is smaller and provides
+       sufficient functionality, but some users may want or need the full
+       functionality of the net-tools variant (e.g. AF_X25).
+endef
+
+define Build/Configure
+       # Failed configure.sh leaves stub config.h around.
+       rm -f $(PKG_BUILD_DIR)/config.h
+       ( cd $(PKG_BUILD_DIR); yes $$$$'\n' | ./configure.sh config.in )
+endef
+
+define Package/mii-tool/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/mii-tool $(1)/usr/sbin/
+endef
+
+define Package/net-tools-route/install
+       $(INSTALL_DIR) $(1)/usr/libexec
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/route $(1)/usr/libexec/net-tools-route
+endef
+
+$(eval $(call BuildPackage,mii-tool))
+$(eval $(call BuildPackage,net-tools-route))