2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
13 PKG_VERSION
:=r
$(PKG_REV
)
18 PKG_SOURCE_VERSION
:=$(PKG_REV
)
19 PKG_SOURCE_SUBDIR
:=$(PKG_BRANCH
)d-
$(PKG_VERSION
)
20 PKG_SOURCE_URL
:=https
://dev.open-mesh.net
/svn
/batman
/trunk
/$(PKG_BRANCH
)
21 PKG_SOURCE
:=$(PKG_SOURCE_SUBDIR
).
tar.gz
22 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_SOURCE_SUBDIR
)
23 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
25 PKG_KMOD_BUILD_DIR
:=$(PKG_BUILD_DIR
)/linux
/modules
27 include $(INCLUDE_DIR
)/package.mk
28 include $(INCLUDE_DIR
)/kernel.mk
30 define Package
/batmand
/Default
33 URL
:=https
://www.open-mesh.net
/
34 MAINTAINER
:=Marek Lindner
<lindner_marek@yahoo.de
>
37 define Package
/batmand
38 $(call Package
/batmand
/Default
)
39 DEPENDS
:=+libpthread
+kmod-tun
40 TITLE
:=B.A.T.M.A.N. Better Approach To Mobile Ad-hoc Networking
43 define Package
/batmand
/description
44 B.A.T.M.A.N. layer
3 routing daemon
48 $(call Package
/batmand
/Default
)
50 TITLE
:=B.A.T.M.A.N. gateway module
51 FILES
:=$(PKG_KMOD_BUILD_DIR
)/batgat.
$(LINUX_KMOD_SUFFIX
)
54 define Package
/batgat
/description
55 Kernel gateway module for B.A.T.M.A.N.
59 CFLAGS
="$(TARGET_CFLAGS)" \
60 CCFLAGS
="$(TARGET_CFLAGS)" \
61 OFLAGS
="$(TARGET_CFLAGS)" \
65 INSTALL_PREFIX
="$(PKG_INSTALL_DIR)" \
69 define Build
/Configure
73 $(MAKE
) -C
$(PKG_BUILD_DIR
) $(MAKE_ARGS
)
74 $(shell [ -e
$(PKG_KMOD_BUILD_DIR
)/Makefile.kbuild
] && mv
$(PKG_KMOD_BUILD_DIR
)/Makefile.kbuild
$(PKG_KMOD_BUILD_DIR
)/Makefile
)
75 $(MAKE
) -C
"$(LINUX_DIR)" \
76 CROSS_COMPILE
="$(TARGET_CROSS)" \
77 ARCH
="$(LINUX_KARCH)" \
78 PATH
="$(TARGET_PATH)" \
79 SUBDIRS
="$(PKG_KMOD_BUILD_DIR)" \
80 LINUX_VERSION
="$(LINUX_VERSION)" \
81 REVISION
="$(PKG_REV)" modules
84 define Package
/batmand
/install
85 $(INSTALL_DIR
) $(1)/usr
/sbin
$(1)/etc
/config
$(1)/etc
/init.d
86 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/batmand
$(1)/usr
/sbin
/
87 $(INSTALL_BIN
) .
/files
/etc
/init.d
/batmand
$(1)/etc
/init.d
88 $(INSTALL_DATA
) .
/files
/etc
/config
/batmand
$(1)/etc
/config
91 $(eval
$(call BuildPackage
,batmand
))
92 $(eval
$(call BuildPackage
,batgat
))