60ff0fb2da50c7f35f2ae1346e4542e59ad828d1
[feed/packages.git] / net / net-tools / Makefile
1 #
2 # Copyright (C) 2006-2010 OpenWrt.org
3 # Copyright (C) 2016 Stijn Segers
4 #
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
7 #
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=net-tools
12 PKG_VERSION:=2.10
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
16 PKG_SOURCE_URL:=https://sourceforge.net/projects/net-tools/files/
17 PKG_HASH:=b262435a5241e89bfa51c3cabd5133753952f7a7b7b93f32e08cb9d96f580d69
18
19 PKG_MAINTAINER:=Stijn Segers <borromini.reg@protonmail.com>
20 PKG_LICENSE:=GPL-2.0-or-later
21 PKG_LICENSE_FILES:=COPYING
22 PKG_CPE_ID:=cpe:/a:net-tools_project:net-tools
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/mii-tool
27 SECTION:=net
28 CATEGORY:=Network
29 TITLE:=configure media type using MII commands
30 URL:=http://net-tools.sourceforge.net/
31 endef
32
33 define Package/mii-tool/description
34 The mii-tool command allows you to set or autodetect the media type
35 or mii chipset-based ethernet devices. It traditionally had been
36 distributed in the net-tools package. This is a single distribution
37 optimized for embedded systems and fully automated cross/-sysroot-builds
38 endef
39
40 define Package/net-tools-route
41 SECTION:=net
42 CATEGORY:=Network
43 TITLE:=net-tools - route utility
44 URL:=http://net-tools.sourceforge.net/
45 PROVIDES:=route
46 ALTERNATIVES:=300:/sbin/route:/usr/libexec/net-tools-route
47 endef
48
49 define Package/net-tools-route/description
50 Replace busybox version of the route command with the full net-tools
51 version. This is normally not needed as busybox is smaller and provides
52 sufficient functionality, but some users may want or need the full
53 functionality of the net-tools variant (e.g. AF_X25).
54 endef
55
56 define Package/net-tools-netstat
57 SECTION:=net
58 CATEGORY:=Network
59 TITLE:=net-tools - netstat utility
60 URL:=http://net-tools.sourceforge.net/
61 PROVIDES:=route
62 ALTERNATIVES:=300:/bin/netstat:/usr/libexec/net-tools-netstat
63 endef
64
65 define Package/net-tools-netstat/description
66 Replace busybox version of the netstat command with the full net-tools
67 version. This is normally not needed as busybox is smaller and provides
68 sufficient functionality, but some users may want or need the full
69 functionality of the net-tools variant.
70 endef
71
72 define Build/Configure
73 # Failed configure.sh leaves stub config.h around.
74 rm -f $(PKG_BUILD_DIR)/config.h
75 ( cd $(PKG_BUILD_DIR); yes $$$$'\n' | ./configure.sh config.in )
76 endef
77
78 define Package/mii-tool/install
79 $(INSTALL_DIR) $(1)/usr/sbin
80 $(INSTALL_BIN) $(PKG_BUILD_DIR)/mii-tool $(1)/usr/sbin/
81 endef
82
83 define Package/net-tools-route/install
84 $(INSTALL_DIR) $(1)/usr/libexec
85 $(INSTALL_BIN) $(PKG_BUILD_DIR)/route $(1)/usr/libexec/net-tools-route
86 endef
87
88 define Package/net-tools-netstat/install
89 $(INSTALL_DIR) $(1)/usr/libexec
90 $(INSTALL_BIN) $(PKG_BUILD_DIR)/netstat $(1)/usr/libexec/net-tools-netstat
91 endef
92
93 $(eval $(call BuildPackage,mii-tool))
94 $(eval $(call BuildPackage,net-tools-route))
95 $(eval $(call BuildPackage,net-tools-netstat))