batman: cleanup and honor copts, updated to 0.2-rv478 as well
[packages.git] / net / batman / 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$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=batmand
12 PKG_VERSION:=0.2-rv478
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)_sources
16 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION)_sources.tgz
17 PKG_SOURCE_URL:=http://downloads.open-mesh.net/batman/stable/sources/
18 PKG_MD5SUM:=b00ad9603e32c85224d5b19f99126ddf
19 PKG_CAT:=zcat
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 MAKE_FLAGS += \
37         CFLAGS="$(TARGET_CFLAGS)" \
38         CCFLAGS="$(TARGET_CFLAGS)" \
39         OFLAGS="$(TARGET_CFLAGS)" \
40         NODEBUG=1 \
41         UNAME="Linux" \
42         INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
43         STRIP="/bin/true" \
44         batmand install
45
46 define Package/batman/install
47         $(INSTALL_DIR) $(1)/usr/sbin
48         $(CP) $(PKG_INSTALL_DIR)/usr/sbin/batmand $(1)/usr/sbin/
49         $(CP) -a ./files/* $(1)/
50         chmod -R 755 $(1)/etc/init.d/batman
51 endef
52
53
54 $(eval $(call BuildPackage,batman))