aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorDavid Bauer <mail@david-bauer.net>2021-03-04 00:11:31 +0100
committerDavid Bauer <mail@david-bauer.net>2021-08-05 01:47:00 +0200
commitd8583664415179488dd7b5db5d5813a19b219a55 (patch)
tree7845e80cacf97bbe52865d0906eee1b7462fdc1d /package
parent91a52f22a13d768f5b16a2fd0e1d74ffe36f9cb1 (diff)
downloadupstream-d8583664415179488dd7b5db5d5813a19b219a55.tar.gz
upstream-d8583664415179488dd7b5db5d5813a19b219a55.tar.bz2
upstream-d8583664415179488dd7b5db5d5813a19b219a55.zip
ethtool: introduce ethtool-full build variant
Netlink support is required for using the virtual cable tester functionality. Remove the pretty print build option and instead create a second package variant ethtool-full. This allows users to install the full ethtool featureset using opkg. Signed-off-by: David Bauer <mail@david-bauer.net>
Diffstat (limited to 'package')
-rw-r--r--package/network/utils/ethtool/Makefile31
1 files changed, 18 insertions, 13 deletions
diff --git a/package/network/utils/ethtool/Makefile b/package/network/utils/ethtool/Makefile
index d645cf9bbb..dde8ff077c 100644
--- a/package/network/utils/ethtool/Makefile
+++ b/package/network/utils/ethtool/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=ethtool
PKG_VERSION:=5.12
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
@@ -23,8 +23,6 @@ PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
-PKG_CONFIG_DEPENDS:=CONFIG_ETHTOOL_PRETTY_DUMP
-
include $(INCLUDE_DIR)/package.mk
define Package/ethtool
@@ -32,6 +30,16 @@ define Package/ethtool
CATEGORY:=Network
TITLE:=Display or change ethernet card settings
URL:=http://www.kernel.org/pub/software/network/ethtool/
+ VARIANT:=tiny
+endef
+
+define Package/ethtool-full
+ $(Package/ethtool)
+ TITLE += (full)
+ VARIANT:=full
+ PROVIDES:=ethtool
+ CONFLICTS:=ethtool
+ DEPENDS:=+libmnl
endef
define Package/ethtool/description
@@ -39,18 +47,12 @@ define Package/ethtool/description
network interface
endef
-define Package/ethtool/config
- config ETHTOOL_PRETTY_DUMP
- depends on PACKAGE_ethtool
- bool "Enable pretty printing"
-endef
-
-CONFIGURE_ARGS += --disable-netlink
+Package/ethtool-full/description:=$(Package/ethtool/description)
-ifeq ($(CONFIG_ETHTOOL_PRETTY_DUMP),y)
-CONFIGURE_ARGS += --enable-pretty-dump
+ifeq ($(BUILD_VARIANT),full)
+CONFIGURE_ARGS += --enable-netlink --enable-pretty-dump
else
-CONFIGURE_ARGS += --disable-pretty-dump
+CONFIGURE_ARGS += --disable-netlink --disable-pretty-dump
endif
define Package/ethtool/install
@@ -58,4 +60,7 @@ define Package/ethtool/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ethtool $(1)/usr/sbin
endef
+Package/ethtool-full/install=$(Package/ethtool/install)
+
$(eval $(call BuildPackage,ethtool))
+$(eval $(call BuildPackage,ethtool-full))