|
| 1 | +include $(TOPDIR)/rules.mk |
| 2 | + |
| 3 | +PKG_NAME:=libteam |
| 4 | +PKG_VERSION:=1.32 |
| 5 | +PKG_RELEASE:=1 |
| 6 | + |
| 7 | +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz |
| 8 | +PKG_SOURCE_URL:=https://codeload.github.com/jpirko/libteam/tar.gz/refs/tags/v$(PKG_VERSION)? |
| 9 | +PKG_HASH:=7ad90555db8aecdcaf002f543d330408501600edf7065e0ca398fce9b1e64820 |
| 10 | + |
| 11 | +PKG_FIXUP:=autoreconf |
| 12 | +PKG_INSTALL:=1 |
| 13 | +PKG_BUILD_PARALLEL:=1 |
| 14 | +PKG_BUILD_FLAGS:=lto |
| 15 | + |
| 16 | +PKG_MAINTAINER:=Qingfang Deng <dqfext@gmail.com> |
| 17 | +PKG_LICENSE:=LGPL-2.1-only |
| 18 | +PKG_LICENSE_FILES:=COPYING |
| 19 | + |
| 20 | +include $(INCLUDE_DIR)/package.mk |
| 21 | + |
| 22 | +CONFIGURE_ARGS+=--disable-static |
| 23 | + |
| 24 | +define Package/libteam/default |
| 25 | + SECTION:=libs |
| 26 | + CATEGORY:=Libraries |
| 27 | + URL:=https://github.com/jpirko/libteam |
| 28 | +endef |
| 29 | + |
| 30 | +define Package/libteam |
| 31 | + $(call Package/libteam/default) |
| 32 | + TITLE:=Team common library |
| 33 | + DEPENDS:=+kmod-team +libnl-cli \ |
| 34 | + +kmod-team-mode-activebackup \ |
| 35 | + +kmod-team-mode-broadcast \ |
| 36 | + +kmod-team-mode-loadbalance \ |
| 37 | + +kmod-team-mode-random \ |
| 38 | + +kmod-team-mode-roundrobin |
| 39 | + ABI_VERSION:=5 |
| 40 | +endef |
| 41 | + |
| 42 | +define Package/libteam/description |
| 43 | + Libteam lib is a userspace wrapper of Team Netlink communication. |
| 44 | +endef |
| 45 | + |
| 46 | +define Package/libteamdctl |
| 47 | + $(call Package/libteam/default) |
| 48 | + TITLE:=Team daemon control library |
| 49 | + ABI_VERSION:=0 |
| 50 | +endef |
| 51 | + |
| 52 | +define Package/libteamdctl/description |
| 53 | + Common library for teamdctl. |
| 54 | +endef |
| 55 | + |
| 56 | +define Package/teamd/default |
| 57 | + SECTION:=net |
| 58 | + CATEGORY:=Network |
| 59 | + URL:=https://github.com/jpirko/libteam |
| 60 | +endef |
| 61 | + |
| 62 | +define Package/teamd |
| 63 | + $(call Package/teamd/default) |
| 64 | + TITLE:=Team daemon |
| 65 | + DEPENDS:=+libteam +libdaemon +jansson |
| 66 | +endef |
| 67 | + |
| 68 | +define Package/teamd/description |
| 69 | + teamd is a daemon to control a given team network device, during runtime, |
| 70 | + as a puppeteer controls a puppet. It uses libteam to communicate with the |
| 71 | + kernel team device instance via Netlink sockets. The behaviour depends on |
| 72 | + the selected runner and its configuration. |
| 73 | +endef |
| 74 | + |
| 75 | +define Package/teamdctl |
| 76 | + $(call Package/teamd/default) |
| 77 | + TITLE:=Team daemon control tool |
| 78 | + DEPENDS:=+teamd +libteamdctl |
| 79 | +endef |
| 80 | + |
| 81 | +define Package/teamdctl/description |
| 82 | + teamdctl is a tool that allows a user to interact with a running teamd instance. |
| 83 | +endef |
| 84 | + |
| 85 | +define Package/teamnl |
| 86 | + $(call Package/teamd/default) |
| 87 | + TITLE:=Team Netlink interface tool |
| 88 | + DEPENDS:=+libteam |
| 89 | +endef |
| 90 | + |
| 91 | +define Package/teamnl/description |
| 92 | + teamnl is a tool enabling interaction with a team device via the team driver |
| 93 | + Netlink interface. This tools serves mainly for debugging purposes. Note that |
| 94 | + it makes no sense to use this tool to change options on team device controlled |
| 95 | + by a teamd instance. |
| 96 | +endef |
| 97 | + |
| 98 | +define Build/InstallDev |
| 99 | + $(INSTALL_DIR) $(1)/usr |
| 100 | + $(CP) $(PKG_INSTALL_DIR)/usr/include $(1)/usr |
| 101 | + $(CP) $(PKG_INSTALL_DIR)/usr/lib $(1)/usr |
| 102 | +endef |
| 103 | + |
| 104 | +define Package/libteam/install |
| 105 | + $(INSTALL_DIR) $(1)/usr/lib |
| 106 | + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libteam.so.$(ABI_VERSION)* $(1)/usr/lib/ |
| 107 | +endef |
| 108 | + |
| 109 | +define Package/libteamdctl/install |
| 110 | + $(INSTALL_DIR) $(1)/usr/lib |
| 111 | + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libteamdctl.so.$(ABI_VERSION)* $(1)/usr/lib/ |
| 112 | +endef |
| 113 | + |
| 114 | +define Package/teamd/install |
| 115 | + $(INSTALL_DIR) $(1)/usr/bin |
| 116 | + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/teamd $(1)/usr/bin/ |
| 117 | +endef |
| 118 | + |
| 119 | +define Package/teamdctl/install |
| 120 | + $(INSTALL_DIR) $(1)/usr/bin |
| 121 | + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/teamdctl $(1)/usr/bin/ |
| 122 | +endef |
| 123 | + |
| 124 | +define Package/teamnl/install |
| 125 | + $(INSTALL_DIR) $(1)/usr/bin |
| 126 | + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/teamnl $(1)/usr/bin/ |
| 127 | +endef |
| 128 | + |
| 129 | +$(eval $(call BuildPackage,libteam)) |
| 130 | +$(eval $(call BuildPackage,libteamdctl)) |
| 131 | +$(eval $(call BuildPackage,teamd)) |
| 132 | +$(eval $(call BuildPackage,teamdctl)) |
| 133 | +$(eval $(call BuildPackage,teamnl)) |
0 commit comments