| b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2008-2011 OpenWrt.org |
| 3 | # |
| 4 | # This is free software, licensed under the GNU General Public License v2. |
| 5 | # See /LICENSE for more information. |
| 6 | # |
| 7 | |
| 8 | include $(TOPDIR)/rules.mk |
| 9 | |
| 10 | PKG_NAME:=batmand |
| 11 | |
| 12 | PKG_SOURCE_PROTO:=git |
| 13 | PKG_SOURCE_URL:=https://git.open-mesh.org/batmand.git |
| 14 | PKG_REV:=b67a7087b51d7a5e90d27ac39116d1f57257c86e |
| 15 | PKG_VERSION:=1440 |
| 16 | PKG_RELEASE:=1 |
| 17 | PKG_LICENSE:=GPL-2.0 |
| 18 | |
| 19 | PKG_SOURCE_VERSION:=$(PKG_REV) |
| 20 | PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) |
| 21 | PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz |
| 22 | PKG_MIRROR_HASH:=ceb8e0e399f79b1b663594fcf9642e1efc40e696a7604daf709c77da9b6ec52f |
| 23 | PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) |
| 24 | |
| 25 | include $(INCLUDE_DIR)/package.mk |
| 26 | |
| 27 | define Package/batmand |
| 28 | URL:=https://www.open-mesh.org/ |
| 29 | MAINTAINER:=Corinna "Elektra" Aichele <onelektra@gmx.net> |
| 30 | SECTION:=net |
| 31 | CATEGORY:=Network |
| 32 | SUBMENU:=Routing and Redirection |
| 33 | DEPENDS:=+libpthread +kmod-tun |
| 34 | TITLE:=B.A.T.M.A.N. layer 3 routing daemon |
| 35 | endef |
| 36 | |
| 37 | define Package/batmand/description |
| 38 | B.A.T.M.A.N. layer 3 routing daemon |
| 39 | endef |
| 40 | |
| 41 | MAKE_FLAGS += \ |
| 42 | EXTRA_CFLAGS='-DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA -DREVISION_VERSION=\"\ rv$(PKG_REV)\" -D_GNU_SOURCE' \ |
| 43 | REVISION="$(PKG_REV)" \ |
| 44 | CC="$(TARGET_CC)" \ |
| 45 | UNAME="Linux" \ |
| 46 | batmand |
| 47 | |
| 48 | define Package/batmand/install |
| 49 | $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d |
| 50 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/batmand $(1)/usr/sbin/ |
| 51 | $(INSTALL_BIN) ./files/etc/init.d/batmand $(1)/etc/init.d |
| 52 | $(INSTALL_DATA) ./files/etc/config/batmand $(1)/etc/config |
| 53 | endef |
| 54 | |
| 55 | define Package/batmand/conffiles |
| 56 | /etc/config/batmand |
| 57 | endef |
| 58 | |
| 59 | $(eval $(call BuildPackage,batmand)) |