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