[packages] olsrd: allow pipe signs for service descriptions in olsr init script;...
[openwrt/svn-archive/archive.git] / net / olsrd / Makefile
index 3c7581b..802c548 100644 (file)
 # 
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2008 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-# $Id$
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=olsrd
-PKG_VERSION:=0.5.2
-PKG_RELEASE:=1
+PKG_VERSION:=0.5.6-r5
+PKG_RELEASE:=2
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.olsr.org/releases/0.5
-PKG_MD5SUM:=a61029e11c001be2997c1e088576d0f5
-PKG_CAT:=bzcat
-
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+PKG_MD5SUM:=57a365750457e13e2e1a5c7963b1d344
 
 include $(INCLUDE_DIR)/package.mk
 
-define Package/olsrd
+TARGET_CFLAGS += $(FPIC)
+
+define Package/olsrd/template
   SECTION:=net
   CATEGORY:=Network
   TITLE:=OLSR (Optimized Link State Routing) daemon
   URL:=http://www.olsr.org/
+endef
+
+define Package/olsrd
+  $(call Package/olsrd/template)
   MENU:=1
+  DEPENDS:=+libpthread
 endef
 
 define Package/olsrd/conffiles
-/etc/olsrd.conf
+/etc/config/olsrd
+endef
+
+define Package/olsrd-mod-arprefresh
+  $(call Package/olsrd/template)
+  DEPENDS:=olsrd
+  TITLE:=Kernel ARP cache refresh plugin
 endef
 
 define Package/olsrd-mod-dot-draw
-  $(call Package/olsrd)
+  $(call Package/olsrd/template)
   DEPENDS:=olsrd
   TITLE:=Dot topology information plugin
-  MENU:=0
 endef
 
 define Package/olsrd-mod-bmf
-  $(call Package/olsrd)
-  DEPENDS:=olsrd +libpthread +kmod-tun
+  $(call Package/olsrd/template)
+  DEPENDS:=olsrd +kmod-tun
   TITLE:=Basic multicast forwarding plugin
-  MENU:=0
 endef
 
 define Package/olsrd-mod-dyn-gw
-  $(call Package/olsrd)
-  DEPENDS:=olsrd +libpthread
+  $(call Package/olsrd/template)
+  DEPENDS:=olsrd
   TITLE:=Dynamic internet gateway plugin
-  MENU:=0
+endef
+
+define Package/olsrd-mod-dyn-gw-plain
+  $(call Package/olsrd/template)
+  DEPENDS:=olsrd
+  TITLE:=Dynamic internet gateway plain plugin
 endef
 
 define Package/olsrd-mod-httpinfo
-  $(call Package/olsrd)
+  $(call Package/olsrd/template)
   DEPENDS:=olsrd
   TITLE:=Small informative web server plugin
-  MENU:=0
 endef
 
 define Package/olsrd-mod-nameservice
-  $(call Package/olsrd)
+  $(call Package/olsrd/template)
   DEPENDS:=olsrd
   TITLE:=Lightweight hostname resolver plugin
-  MENU:=0
+endef
+
+define Package/olsrd-mod-quagga
+  $(call Package/olsrd/template)
+  DEPENDS:=olsrd
+  TITLE:=Quagga plugin
 endef
 
 define Package/olsrd-mod-secure
-  $(call Package/olsrd)
+  $(call Package/olsrd/template)
   DEPENDS:=olsrd
   TITLE:=Message signing plugin to secure routing domain
-  MENU:=0
 endef
 
-define Package/olsrd-mod-secure/conffiles
-/etc/olsrd.d/olsrd_secure_key
+define Package/olsrd-mod-txtinfo
+  $(call Package/olsrd/template)
+  DEPENDS:=olsrd
+  TITLE:=Small informative web server plugin
 endef
 
-define Package/olsrd-mod-tas
-  $(call Package/olsrd)
+define Package/olsrd-mod-watchdog
+  $(call Package/olsrd/template)
   DEPENDS:=olsrd
-  TITLE:=Tiny Application Server (TAS) plugin
-  MENU:=0
+  TITLE:=Watchdog plugin
+endef
+
+define Package/olsrd-mod-secure/conffiles
+/etc/olsrd.d/olsrd_secure_key
 endef
 
 define Build/Configure
@@ -96,69 +115,94 @@ define Build/Compile
        $(MAKE) -C "$(PKG_BUILD_DIR)" \
                $(TARGET_CONFIGURE_OPTS) \
                NODEBUG=1 \
-               OFLAGS="$(TARGET_CFLAGS)" \
+               CFLAGS="$(TARGET_CFLAGS)" \
                OS="linux" \
                INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
                LIBDIR="$(PKG_INSTALL_DIR)/usr/lib" \
                SBINDIR="$(PKG_INSTALL_DIR)/usr/sbin/" \
                ETCDIR="$(PKG_INSTALL_DIR)/etc" \
                MANDIR="$(PKG_INSTALL_DIR)/usr/share/man" \
-               STRIP="/bin/true" \
+               STRIP="true" \
+               INSTALL_LIB="true" \
+               SUBDIRS="arprefresh bmf dot_draw dyn_gw dyn_gw_plain httpinfo nameservice quagga secure txtinfo watchdog" \
                all libs install install_libs
 endef
 
 define Package/olsrd/install
-       $(INSTALL_DIR) $(1)/etc
-       $(CP) $(PKG_INSTALL_DIR)/etc/olsrd.conf $(1)/etc/
+       $(INSTALL_DIR) $(1)/etc/config
+       $(INSTALL_DATA) ./files/olsrd.config $(1)/etc/config/olsrd
        $(INSTALL_DIR) $(1)/usr/sbin
-       $(CP) $(PKG_INSTALL_DIR)/usr/sbin/olsrd $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/olsrd $(1)/usr/sbin/
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_BIN) ./files/olsrd.init $(1)/etc/init.d/olsrd
 endef
 
+define Package/olsrd-mod-arprefresh/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/arprefresh/olsrd_arprefresh.so.* $(1)/usr/lib/
+endef
+
 define Package/olsrd-mod-dot-draw/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/olsrd_dot_draw.so.* $(1)/usr/lib/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/dot_draw/olsrd_dot_draw.so.* $(1)/usr/lib/
 endef
 
 define Package/olsrd-mod-bmf/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/olsrd_bmf.so.* $(1)/usr/lib/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmf/olsrd_bmf.so.* $(1)/usr/lib/
 endef
 
 define Package/olsrd-mod-dyn-gw/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/olsrd_dyn_gw.so.* $(1)/usr/lib/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/dyn_gw/olsrd_dyn_gw.so.* $(1)/usr/lib/
+endef
+
+define Package/olsrd-mod-dyn-gw-plain/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/dyn_gw_plain/olsrd_dyn_gw_plain.so.* $(1)/usr/lib/
 endef
 
 define Package/olsrd-mod-httpinfo/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/olsrd_httpinfo.so.* $(1)/usr/lib/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/httpinfo/olsrd_httpinfo.so.* $(1)/usr/lib/
 endef
 
 define Package/olsrd-mod-nameservice/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/olsrd_nameservice.so.* $(1)/usr/lib/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/nameservice/olsrd_nameservice.so.* $(1)/usr/lib/
+endef
+
+define Package/olsrd-mod-quagga/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/quagga/olsrd_quagga.so.* $(1)/usr/lib/
 endef
 
 define Package/olsrd-mod-secure/install
        $(INSTALL_DIR) $(1)/etc/olsrd.d
        $(CP) ./files/olsrd_secure_key $(1)/etc/olsrd.d/
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/olsrd_secure.so.* $(1)/usr/lib/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/secure/olsrd_secure.so.* $(1)/usr/lib/
 endef
 
-define Package/olsrd-mod-tas/install
+define Package/olsrd-mod-txtinfo/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/olsrd_tas.so.* $(1)/usr/lib/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/txtinfo/olsrd_txtinfo.so.* $(1)/usr/lib/
 endef
 
+define Package/olsrd-mod-watchdog/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/watchdog/olsrd_watchdog.so.* $(1)/usr/lib/
+endef
 
 $(eval $(call BuildPackage,olsrd))
+$(eval $(call BuildPackage,olsrd-mod-arprefresh))
 $(eval $(call BuildPackage,olsrd-mod-dot-draw))
 $(eval $(call BuildPackage,olsrd-mod-bmf))
 $(eval $(call BuildPackage,olsrd-mod-dyn-gw))
+$(eval $(call BuildPackage,olsrd-mod-dyn-gw-plain))
 $(eval $(call BuildPackage,olsrd-mod-httpinfo))
 $(eval $(call BuildPackage,olsrd-mod-nameservice))
+$(eval $(call BuildPackage,olsrd-mod-quagga))
 $(eval $(call BuildPackage,olsrd-mod-secure))
-$(eval $(call BuildPackage,olsrd-mod-tas))
+$(eval $(call BuildPackage,olsrd-mod-txtinfo))
+$(eval $(call BuildPackage,olsrd-mod-watchdog))