Fix the tun device path (#1491)
[lede-routing/.git] / Makefile
1
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id: Makefile 5624 2006-11-23 00:29:07Z nbd $
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=batman-III
12 PKG_VERSION:=0.2.0a
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tbz2
17 PKG_SOURCE_URL:=http://downloads.open-mesh.net/batman
18 PKG_MD5SUM:=d5ac8329633590ed072a6b7ecccacf0b
19 PKG_CAT:=bzcat
20
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/batman
26   SECTION:=net
27   CATEGORY:=Network
28   DEPENDS:=+libpthread +kmod-tun
29   TITLE:=B.A.T.M.A.N. Better Approach To Mobile Ad-hoc Networking
30   URL:=https://www.open-mesh.net/
31 endef
32
33 define Build/Configure
34 endef
35
36 define Build/Compile
37         rm -rf $(PKG_INSTALL_DIR)
38         mkdir -p $(PKG_INSTALL_DIR)
39         $(MAKE) -C "$(PKG_BUILD_DIR)" \
40                 $(TARGET_CONFIGURE_OPTS) \
41                 NODEBUG=1 \
42                 OFLAGS="$(TARGET_CFLAGS)" \
43                 OS="linux" \
44                 INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
45                 STRIP="/bin/true" \
46                 batmand install
47 endef
48
49 define Package/batman/install
50         $(INSTALL_DIR) $(1)/usr/sbin
51         $(CP) $(PKG_INSTALL_DIR)/usr/sbin/batmand $(1)/usr/sbin/
52         $(CP) -a ./files/* $(1)/
53         chmod -R 755 $(1)/etc/init.d/batman
54 endef
55
56
57 $(eval $(call BuildPackage,batman))