source: packages/net/batman/Makefile @ 30557

Last change on this file since 30557 was 30557, checked in by nbd, 4 years ago

batman: mark the gateway module as broken, it does not compile with any recent kernels

File size: 3.9 KB
Line 
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
8include $(TOPDIR)/rules.mk
9include $(INCLUDE_DIR)/kernel.mk
10
11PKG_NAME:=batmand
12PKG_REV:=1439
13PKG_VERSION:=r$(PKG_REV)
14PKG_RELEASE:=2
15PKG_EXTRA_CFLAGS=-DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA -DREVISION_VERSION=\"\ rv$(PKG_REV)\"
16
17PKG_SOURCE_PROTO:=svn
18PKG_SOURCE_VERSION:=$(PKG_REV)
19PKG_SOURCE_SUBDIR:=$(if $(PKG_BRANCH),$(PKG_BRANCH),$(PKG_NAME))-$(PKG_VERSION)
20PKG_SOURCE_URL:=http://downloads.open-mesh.org/svn/batman/trunk/
21PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
22PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
23
24PKG_KMOD_BUILD_DIR:=$(PKG_BUILD_DIR)/batman/linux/modules
25
26include $(INCLUDE_DIR)/package.mk
27
28define Package/batmand/Default
29  URL:=http://www.open-mesh.org/
30  MAINTAINER:=Marek Lindner <lindner_marek@yahoo.de>
31endef
32
33define Package/batmand
34$(call Package/batmand/Default)
35  SECTION:=net
36  CATEGORY:=Network
37  SUBMENU:=Routing and Redirection
38  DEPENDS:=+libpthread +kmod-tun
39  TITLE:=B.A.T.M.A.N. layer 3 routing daemon
40endef
41
42define Package/batmand/description
43B.A.T.M.A.N. layer 3 routing daemon
44endef
45
46define Package/vis
47$(call Package/batmand/Default)
48  SECTION:=net
49  CATEGORY:=Network
50  SUBMENU:=Routing and Redirection
51  DEPENDS:=+libpthread
52  TITLE:=visualization server for B.A.T.M.A.N. layer 3
53endef
54       
55define Package/vis/description
56visualization server for B.A.T.M.A.N. layer 3
57endef
58
59define KernelPackage/batgat
60$(call Package/batmand/Default)
61  SUBMENU:=Network Support
62  DEPENDS:=+batmand @BROKEN
63  TITLE:=B.A.T.M.A.N. gateway module
64  FILES:=$(PKG_KMOD_BUILD_DIR)/batgat.$(LINUX_KMOD_SUFFIX)
65  AUTOLOAD:=$(call AutoLoad,50,batgat)
66endef
67
68
69define KernelPackage/batgat/description
70Kernel gateway module for B.A.T.M.A.N. for better tunnel performance
71endef
72
73MAKE_BATMAND_ARGS += \
74        EXTRA_CFLAGS='$(TARGET_CFLAGS) $(PKG_EXTRA_CFLAGS)' \
75        CCFLAGS="$(TARGET_CFLAGS)" \
76        OFLAGS="$(TARGET_CFLAGS)" \
77        REVISION="$(PKG_REV)" \
78        CC="$(TARGET_CC)" \
79        NODEBUG=1 \
80        UNAME="Linux" \
81        INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
82        STRIP="/bin/true" \
83        batmand install
84       
85MAKE_VIS_ARGS += \
86        EXTRA_CFLAGS='$(TARGET_CFLAGS) $(PKG_EXTRA_CFLAGS)' \
87        CCFLAGS="$(TARGET_CFLAGS)" \
88        OFLAGS="$(TARGET_CFLAGS)" \
89        REVISION="$(PKG_REV)" \
90        CC="$(TARGET_CC)" \
91        NODEBUG=1 \
92        UNAME="Linux" \
93        INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
94        STRIP="/bin/true" \
95        vis install
96
97MAKE_BATGAT_ARGS += \
98        CROSS_COMPILE="$(TARGET_CROSS)" \
99        ARCH="$(LINUX_KARCH)" \
100        PATH="$(TARGET_PATH)" \
101        SUBDIRS="$(PKG_KMOD_BUILD_DIR)" \
102        LINUX_VERSION="$(LINUX_VERSION)" \
103        REVISION="$(PKG_REV)" modules   
104
105
106define Build/Configure
107endef
108
109ifneq ($(DEVELOPER)$(CONFIG_PACKAGE_batmand),)
110        BUILD_BATMAND := $(MAKE) -C $(PKG_BUILD_DIR)/batman $(MAKE_BATMAND_ARGS)
111endif
112
113ifneq ($(DEVELOPER)$(CONFIG_PACKAGE_vis),)
114        BUILD_VIS := $(MAKE) -C $(PKG_BUILD_DIR)/vis $(MAKE_VIS_ARGS)
115endif
116       
117ifneq ($(DEVELOPER)$(CONFIG_PACKAGE_kmod-batgat),)
118        BUILD_BATGAT := $(MAKE) -C "$(LINUX_DIR)" $(MAKE_BATGAT_ARGS)
119endif
120               
121define Build/Compile
122        $(BUILD_BATMAND)
123        $(BUILD_VIS)
124        cp $(PKG_KMOD_BUILD_DIR)/Makefile.kbuild $(PKG_KMOD_BUILD_DIR)/Makefile
125        $(BUILD_BATGAT)
126endef
127
128define Package/batmand/install
129        $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d
130        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/batmand $(1)/usr/sbin/
131        $(INSTALL_BIN) ./files/etc/init.d/batmand $(1)/etc/init.d
132        $(INSTALL_DATA) ./files/etc/config/batmand $(1)/etc/config
133endef
134
135define Package/batmand/conffiles
136/etc/config/batmand
137endef
138
139define Package/vis/install
140        $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d
141        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/vis $(1)/usr/sbin/
142        $(INSTALL_BIN) ./files/etc/init.d/vis $(1)/etc/init.d
143        $(INSTALL_DATA) ./files/etc/config/vis $(1)/etc/config
144endef
145
146define Package/vis/conffiles
147/etc/config/vis
148endef
149
150$(eval $(call BuildPackage,batmand))
151$(eval $(call BuildPackage,vis))
152$(eval $(call KernelPackage,batgat))
Note: See TracBrowser for help on using the repository browser.