iproute2: add ip-tiny, ip-full as alternatives of /sbin/ip master
authorYousong Zhou <yszhou4tech@gmail.com>
Sat, 4 Mar 2017 11:37:43 +0000 (19:37 +0800)
committerYousong Zhou <yszhou4tech@gmail.com>
Sun, 5 Mar 2017 09:23:47 +0000 (17:23 +0800)
They will not be in conflict anymore ;)

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
package/network/utils/iproute2/Makefile

index af8e64c242a66b9809ce6ea9e5759ca108444cf3..efc60518f155f9fa67e577fd1a4e5e19fdc524a6 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=iproute2
 PKG_VERSION:=4.4.0
 
 PKG_NAME:=iproute2
 PKG_VERSION:=4.4.0
-PKG_RELEASE:=8
+PKG_RELEASE:=9
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2
@@ -22,23 +22,29 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSI
 include $(INCLUDE_DIR)/package.mk
 
 define Package/iproute2/Default
 include $(INCLUDE_DIR)/package.mk
 
 define Package/iproute2/Default
-  TITLE:=Routing control utility ($(2))
   SECTION:=net
   CATEGORY:=Network
   URL:=http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2
   SUBMENU:=Routing and Redirection
   MAINTAINER:=Russell Senior <russell@personaltelco.net>
   DEPENDS:= +libnl-tiny
   SECTION:=net
   CATEGORY:=Network
   URL:=http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2
   SUBMENU:=Routing and Redirection
   MAINTAINER:=Russell Senior <russell@personaltelco.net>
   DEPENDS:= +libnl-tiny
-  VARIANT:=$(1)
-  PROVIDES:=$(3)
 endef
 
 define Package/ip-tiny
 endef
 
 define Package/ip-tiny
-$(call Package/iproute2/Default,tiny,Minimal,ip)
-  CONFLICTS:=ip-full
+$(call Package/iproute2/Default)
+ TITLE:=Routing control utility (Minimal)
+ VARIANT:=tiny
+ PROVIDES:=ip
+ ALTERNATIVES:=200:/sbin/ip:/sbin/ip-tiny
 endef
 
 endef
 
-Package/ip-full:=$(call Package/iproute2/Default,full,Full,ip)
+define Package/ip-full
+$(call Package/iproute2/Default)
+ TITLE:=Routing control utility (Full)
+ VARIANT:=full
+ PROVIDES:=ip
+ ALTERNATIVES:=300:/sbin/ip:/sbin/ip-full
+endef
 
 define Package/tc
 $(call Package/iproute2/Default)
 
 define Package/tc
 $(call Package/iproute2/Default)
@@ -103,13 +109,13 @@ define Build/InstallDev
 endef
 
 define Package/ip-tiny/install
 endef
 
 define Package/ip-tiny/install
-       $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/ip/ip $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/ip/ip $(1)/sbin/ip-tiny
 endef
 
 define Package/ip-full/install
 endef
 
 define Package/ip-full/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/ip/ip $(1)/usr/sbin/
+       $(INSTALL_DIR) $(1)/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/ip/ip $(1)/sbin/ip-full
 endef
 
 define Package/tc/install
 endef
 
 define Package/tc/install