Upgrade batman to rv502
[openwrt/svn-archive/archive.git] / net / batman / Makefile
index 3f074416cb079d84d93e89f3b9e9631e23748dbb..048df3850cabeab36c4505bd1884f0e95c1e66ab 100644 (file)
@@ -4,19 +4,20 @@
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-# $Id: Makefile 5624 2006-11-23 00:29:07Z nbd $
+# $Id$
 
 include $(TOPDIR)/rules.mk
 
-PKG_NAME:=batman-III
-PKG_VERSION:=0.2.0a
+PKG_NAME:=batmand
+PKG_VERSION:=0.2-rv502
 PKG_RELEASE:=1
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tbz2
-PKG_SOURCE_URL:=http://downloads.open-mesh.net/batman
-PKG_MD5SUM:=d5ac8329633590ed072a6b7ecccacf0b
-PKG_CAT:=bzcat
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)_sources
+PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION)_sources.tgz
+PKG_SOURCE_URL:=http://downloads.open-mesh.net/batman/stable/sources/ \
+       http://downloads.open-mesh.net/batman/stable/sources/old/
+PKG_MD5SUM:=cf1c92ef3455cfbfedf2c577e013b6c0
+PKG_CAT:=zcat
 
 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
 
@@ -33,25 +34,21 @@ endef
 define Build/Configure
 endef
 
-define Build/Compile
-       rm -rf $(PKG_INSTALL_DIR)
-       mkdir -p $(PKG_INSTALL_DIR)
-       $(MAKE) -C "$(PKG_BUILD_DIR)" \
-               $(TARGET_CONFIGURE_OPTS) \
-               NODEBUG=1 \
-               OFLAGS="$(TARGET_CFLAGS)" \
-               OS="linux" \
-               INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
-               STRIP="/bin/true" \
-               batmand install
-endef
+MAKE_FLAGS += \
+       CFLAGS="$(TARGET_CFLAGS)" \
+       CCFLAGS="$(TARGET_CFLAGS)" \
+       OFLAGS="$(TARGET_CFLAGS)" \
+       NODEBUG=1 \
+       UNAME="Linux" \
+       INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
+       STRIP="/bin/true" \
+       batmand install
 
 define Package/batman/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/batmand $(1)/usr/sbin/
-       $(CP) -a ./files/* $(1)/
-       chmod -R 755 $(1)/etc/init.d/batman
+       $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/batmand $(1)/usr/sbin/
+       $(INSTALL_BIN) ./files/etc/init.d/batman $(1)/etc/init.d
+       $(INSTALL_DATA) ./files/etc/config/batman $(1)/etc/config
 endef
 
-
 $(eval $(call BuildPackage,batman))