aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--package/Config.in1
-rw-r--r--package/olsr/Config.in12
-rwxr-xr-xpackage/olsr/S50olsr21
-rw-r--r--package/olsr/olsr.mk63
4 files changed, 97 insertions, 0 deletions
diff --git a/package/Config.in b/package/Config.in
index 8da0caef1..14474afe7 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -161,6 +161,7 @@ source "package/netplug/Config.in"
source "package/netsnmp/Config.in"
source "package/nfs-utils/Config.in"
source "package/ntp/Config.in"
+source "package/olsr/Config.in"
source "package/openntpd/Config.in"
source "package/openssh/Config.in"
source "package/openssl/Config.in"
diff --git a/package/olsr/Config.in b/package/olsr/Config.in
new file mode 100644
index 000000000..cfdcba678
--- /dev/null
+++ b/package/olsr/Config.in
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_OLSR
+ bool "OLSR mesh networking Daemon"
+ default n
+ help
+ olsr
+
+ The Optimized Link State Routing protocol (OLSR) is a routing protocol that is optimised
+ for mobile ad-hoc networks, sometimes called wireless mesh networks. It is a proactive
+ link-state routing protocol that floods a full topology table to all nodes in the network
+ which then compute optimal forwarding paths locally.
+
+ http://www.olsr.org/
diff --git a/package/olsr/S50olsr b/package/olsr/S50olsr
new file mode 100755
index 000000000..96b851b56
--- /dev/null
+++ b/package/olsr/S50olsr
@@ -0,0 +1,21 @@
+#!/bin/sh
+#
+# Starts OLSRD daemon
+#
+
+case "$1" in
+ start)
+ echo "Starting OLSRd daemon: "
+ /usr/sbin/olsrd -d 0 -nofork &
+ ;;
+ stop)
+ echo "Stopping OLSRd daemon: "
+ killall olsrd
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop}"
+ exit 1
+esac
+
+exit $?
+
diff --git a/package/olsr/olsr.mk b/package/olsr/olsr.mk
new file mode 100644
index 000000000..a68da10e9
--- /dev/null
+++ b/package/olsr/olsr.mk
@@ -0,0 +1,63 @@
+#############################################################
+#
+# olsr
+#
+#############################################################
+
+OLSR_VERSION_MAJOR=0.5
+OLSR_VERSION_MINOR=3
+OLSR_VERSION:=$(OLSR_VERSION_MAJOR).$(OLSR_VERSION_MINOR)
+OLSR_SOURCE:=olsrd-$(OLSR_VERSION).tar.bz2
+OLSR_SITE:=http://www.olsr.org/releases/$(OLSR_VERSION_MAJOR)
+OLSR_DIR:=$(BUILD_DIR)/olsrd-$(OLSR_VERSION)
+OLSR_CAT:=$(BZCAT)
+OLSR_BINARY:=olsrd
+OLSR_TARGET_BINARY:=usr/bin/olsrd
+#OLSR_PLUGINS=httpinfo tas dot_draw nameservice dyn_gw dyn_gw_plain pgraph bmf quagga secure
+OLSR_PLUGINS=dot_draw dyn_gw secure
+OLSR_TARGET_PLUGIN=usr/lib/
+
+$(DL_DIR)/$(OLSR_SOURCE):
+ $(WGET) -P $(DL_DIR) $(OLSR_SITE)/$(OLSR_SOURCE)
+
+olsr-source: $(DL_DIR)/$(OLSR_SOURCE)
+
+olsr-unpacked: $(OLSR_DIR)/.unpacked
+$(OLSR_DIR)/.unpacked: $(DL_DIR)/$(OLSR_SOURCE)
+ $(OLSR_CAT) $(DL_DIR)/$(OLSR_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ touch $@
+
+$(OLSR_DIR)/$(OLSR_BINARY): $(OLSR_DIR)/.unpacked
+ $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(OLSR_DIR) olsrd $(OLSR_PLUGINS)
+
+$(TARGET_DIR)/$(OLSR_TARGET_BINARY): $(OLSR_DIR)/$(OLSR_BINARY)
+ rm -f $(TARGET_DIR)/$(OLSR_TARGET_BINARY)
+ cp -dpf $(OLSR_DIR)/$(OLSR_BINARY) $(TARGET_DIR)/$(OLSR_TARGET_BINARY)
+ cp -R $(OLSR_DIR)/lib/*/olsrd_*.so* $(TARGET_DIR)/$(OLSR_TARGET_PLUGIN)
+ mkdir -p $(TARGET_DIR)/etc/init.d
+ cp -dpf package/olsr/S50olsr $(TARGET_DIR)/etc/init.d/
+ test -r $(TARGET_DIR)/etc/olsrd.conf || \
+ cp -dpf $(OLSR_DIR)/files/olsrd.conf.default.lq $(TARGET_DIR)/etc/olsrd.conf
+ -$(STRIP) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/$(OLSR_TARGET_PLUGIN)/olsrd_*.so*
+ $(STRIP) $(STRIP_STRIP_ALL) $@
+
+olsr: uclibc $(TARGET_DIR)/$(OLSR_TARGET_BINARY)
+
+olsr-clean:
+ rm -f $(TARGET_DIR)/$(OLSR_TARGET_BINARY) \
+ $(TARGET_DIR)/$(OLSR_TARGET_PLUGIN)/olsrd_*.so* \
+ $(TARGET_DIR)/etc/init.d/S50olsr \
+ $(TARGET_DIR)/etc/olsrd.conf
+ -$(MAKE) -C $(OLSR_DIR) clean
+
+olsr-dirclean:
+ rm -rf $(OLSR_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_OLSR)),y)
+TARGETS+=olsr $(OLSR_PLUGINS)
+endif