mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2024-12-22 06:41:17 +00:00
iproute2: use tc package variant to limit other package sizes
Replace the old 'tc' with a singleton package variant which will be used to enable additional functionality and limit it only to tc. Non-variant packages will only be installed during 'tiny' variant builds, hence will be configured without extra features, thus preserving previously limited functionality and reduced package sizes. Also set ip-tiny as the default variant, and install 'tiny' versions of development libraries. Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
This commit is contained in:
parent
bc86da377c
commit
e6d84fa886
@ -37,6 +37,7 @@ define Package/ip-tiny
|
|||||||
$(call Package/iproute2/Default)
|
$(call Package/iproute2/Default)
|
||||||
TITLE:=Routing control utility (Minimal)
|
TITLE:=Routing control utility (Minimal)
|
||||||
VARIANT:=tiny
|
VARIANT:=tiny
|
||||||
|
DEFAULT_VARIANT:=1
|
||||||
PROVIDES:=ip
|
PROVIDES:=ip
|
||||||
ALTERNATIVES:=200:/sbin/ip:/usr/libexec/ip-tiny
|
ALTERNATIVES:=200:/sbin/ip:/usr/libexec/ip-tiny
|
||||||
DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl
|
DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl
|
||||||
@ -54,6 +55,8 @@ endef
|
|||||||
define Package/tc
|
define Package/tc
|
||||||
$(call Package/iproute2/Default)
|
$(call Package/iproute2/Default)
|
||||||
TITLE:=Traffic control utility
|
TITLE:=Traffic control utility
|
||||||
|
VARIANT:=tc
|
||||||
|
PROVIDES:=tc
|
||||||
DEPENDS:=+kmod-sched-core +libxtables +libelf +(PACKAGE_devlink||PACKAGE_rdma):libmnl
|
DEPENDS:=+kmod-sched-core +libxtables +libelf +(PACKAGE_devlink||PACKAGE_rdma):libmnl
|
||||||
endef
|
endef
|
||||||
|
|
||||||
@ -127,12 +130,15 @@ define Build/Compile
|
|||||||
+$(MAKE_VARS) $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS)
|
+$(MAKE_VARS) $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
# use minimal functionality for dev libraries
|
||||||
|
ifeq ($(BUILD_VARIANT),tiny)
|
||||||
define Build/InstallDev
|
define Build/InstallDev
|
||||||
$(INSTALL_DIR) $(1)/usr/include
|
$(INSTALL_DIR) $(1)/usr/include
|
||||||
$(CP) $(PKG_BUILD_DIR)/include/{libgenl,libnetlink}.h $(1)/usr/include/
|
$(CP) $(PKG_BUILD_DIR)/include/{libgenl,libnetlink}.h $(1)/usr/include/
|
||||||
$(INSTALL_DIR) $(1)/usr/lib
|
$(INSTALL_DIR) $(1)/usr/lib
|
||||||
$(CP) $(PKG_BUILD_DIR)/lib/libnetlink.a $(1)/usr/lib/
|
$(CP) $(PKG_BUILD_DIR)/lib/libnetlink.a $(1)/usr/lib/
|
||||||
endef
|
endef
|
||||||
|
endif
|
||||||
|
|
||||||
define Package/ip-tiny/install
|
define Package/ip-tiny/install
|
||||||
$(INSTALL_DIR) $(1)/usr/libexec
|
$(INSTALL_DIR) $(1)/usr/libexec
|
||||||
@ -151,6 +157,8 @@ define Package/tc/install
|
|||||||
$(INSTALL_BIN) ./files/15-teql $(1)/etc/hotplug.d/iface/
|
$(INSTALL_BIN) ./files/15-teql $(1)/etc/hotplug.d/iface/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
# ensure other packages are only saved during 'tiny' builds.
|
||||||
|
ifeq ($(BUILD_VARIANT),tiny)
|
||||||
define Package/genl/install
|
define Package/genl/install
|
||||||
$(INSTALL_DIR) $(1)/usr/sbin
|
$(INSTALL_DIR) $(1)/usr/sbin
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/genl/genl $(1)/usr/sbin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/genl/genl $(1)/usr/sbin/
|
||||||
@ -180,6 +188,7 @@ define Package/rdma/install
|
|||||||
$(INSTALL_DIR) $(1)/usr/sbin
|
$(INSTALL_DIR) $(1)/usr/sbin
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/rdma/rdma $(1)/usr/sbin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/rdma/rdma $(1)/usr/sbin/
|
||||||
endef
|
endef
|
||||||
|
endif
|
||||||
|
|
||||||
$(eval $(call BuildPackage,ip-tiny))
|
$(eval $(call BuildPackage,ip-tiny))
|
||||||
$(eval $(call BuildPackage,ip-full))
|
$(eval $(call BuildPackage,ip-full))
|
||||||
|
Loading…
Reference in New Issue
Block a user