olsr: bump to version 0.6.8
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Wed, 21 Jan 2015 13:35:21 +0000 (10:35 -0300)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 25 Jan 2015 13:58:37 +0000 (14:58 +0100)
Also:

* Add hash file
* Rename patch to new naming convention
* Revamp/cleanup initscript
* Install sample config to the correct location

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/olsr/0001-configurable-ldconfig.patch [new file with mode: 0644]
package/olsr/S50olsr
package/olsr/olsr-configurable-ldconfig.patch [deleted file]
package/olsr/olsr.hash [new file with mode: 0644]
package/olsr/olsr.mk

diff --git a/package/olsr/0001-configurable-ldconfig.patch b/package/olsr/0001-configurable-ldconfig.patch
new file mode 100644 (file)
index 0000000..73fff7e
--- /dev/null
@@ -0,0 +1,33 @@
+Make ldconfig configurable
+
+In a cross-compilation set up, running /sbin/ldconfig is useless, so
+we make the path to ldconfig configurable through the environment/make
+command line. This allows to pass LDCONFIG=/bin/true when doing
+cross-compilation.
+
+[Gustavo: update patch for olsr 0.6.4]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+diff -Nura olsrd-0.6.4.orig/make/Makefile.linux olsrd-0.6.4/make/Makefile.linux
+--- olsrd-0.6.4.orig/make/Makefile.linux       2013-01-29 09:00:18.041356389 -0300
++++ olsrd-0.6.4/make/Makefile.linux    2013-01-29 09:01:51.598226624 -0300
+@@ -3,6 +3,7 @@
+ #
+ ARCH := $(shell uname -m)
++LDCONFIG ?= /sbin/ldconfig
+ DESTDIR ?=
+ prefix ?= /usr/local
+@@ -26,9 +27,9 @@
+ PLUGIN_SONAME ?= lib$(PLUGIN_NAME).so
+ PLUGIN_FULLNAME ?= $(PLUGIN_NAME).so.$(PLUGIN_VER)
+ INSTALL_LIB = install -D -m 755 $(PLUGIN_FULLNAME) $(LIBDIR)/$(PLUGIN_FULLNAME); \
+-              /sbin/ldconfig -n $(LIBDIR)
++              $(LDCONFIG) -n $(LIBDIR)
+ UNINSTALL_LIB =       rm -f $(LIBDIR)/$(PLUGIN_FULLNAME); \
+-              /sbin/ldconfig -n $(LIBDIR)
++              $(LDCONFIG) -n $(LIBDIR)
+ ifdef OLSRD_PLUGIN
+ GENERATE_PIC = true
index 9f052da53ef4e9687e189e0578648d90ecad3457..b79aa794930ce60ef161303b5066ba32feec0966 100755 (executable)
@@ -1,21 +1,23 @@
 #!/bin/sh
-#
-# Starts OLSRD daemon
-#
 
 case "$1" in
   start)
-       echo "Starting OLSRd daemon: "
-       /usr/sbin/olsrd -d 0
-       ;;
+    echo -n "Starting oslrd daemon: "
+    start-stop-daemon -S -q -x /usr/sbin/olsrd -- -d 0 -pidfile /run/olsrd.pid
+    [ $? = 0 ] && echo "OK" || echo "FAIL"
+    ;;
   stop)
-       echo "Stopping OLSRd daemon: "
-       killall olsrd
-       ;;
+    echo -n "Stopping olsrd daemon: "
+    start-stop-daemon -K -q -p /run/olsrd.pid
+    [ $? = 0 ] && echo "OK" || echo "FAIL"
+    ;;
+  restart)
+    $0 stop
+    $0 start
+    ;;
   *)
-       echo "Usage: $0 {start|stop}"
-       exit 1
+    echo "Usage: $0 {start|stop|restart}"
+    exit 1
 esac
 
 exit $?
-
diff --git a/package/olsr/olsr-configurable-ldconfig.patch b/package/olsr/olsr-configurable-ldconfig.patch
deleted file mode 100644 (file)
index 73fff7e..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-Make ldconfig configurable
-
-In a cross-compilation set up, running /sbin/ldconfig is useless, so
-we make the path to ldconfig configurable through the environment/make
-command line. This allows to pass LDCONFIG=/bin/true when doing
-cross-compilation.
-
-[Gustavo: update patch for olsr 0.6.4]
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-diff -Nura olsrd-0.6.4.orig/make/Makefile.linux olsrd-0.6.4/make/Makefile.linux
---- olsrd-0.6.4.orig/make/Makefile.linux       2013-01-29 09:00:18.041356389 -0300
-+++ olsrd-0.6.4/make/Makefile.linux    2013-01-29 09:01:51.598226624 -0300
-@@ -3,6 +3,7 @@
- #
- ARCH := $(shell uname -m)
-+LDCONFIG ?= /sbin/ldconfig
- DESTDIR ?=
- prefix ?= /usr/local
-@@ -26,9 +27,9 @@
- PLUGIN_SONAME ?= lib$(PLUGIN_NAME).so
- PLUGIN_FULLNAME ?= $(PLUGIN_NAME).so.$(PLUGIN_VER)
- INSTALL_LIB = install -D -m 755 $(PLUGIN_FULLNAME) $(LIBDIR)/$(PLUGIN_FULLNAME); \
--              /sbin/ldconfig -n $(LIBDIR)
-+              $(LDCONFIG) -n $(LIBDIR)
- UNINSTALL_LIB =       rm -f $(LIBDIR)/$(PLUGIN_FULLNAME); \
--              /sbin/ldconfig -n $(LIBDIR)
-+              $(LDCONFIG) -n $(LIBDIR)
- ifdef OLSRD_PLUGIN
- GENERATE_PIC = true
diff --git a/package/olsr/olsr.hash b/package/olsr/olsr.hash
new file mode 100644 (file)
index 0000000..5b8abc7
--- /dev/null
@@ -0,0 +1,2 @@
+# From http://www.olsr.org/releases/0.6/SHA256SUM-0.6.8
+sha256 692de2eb144f0be2e1dfc5dc5275b6c61b80af080e8f733e0b26b6a860442d27        olsrd-0.6.8.tar.bz2
index 539386dbc29140a42ca1fb143a6a0a0093db8eb8..7e28b1e411cd224ef80b49611e3694275f2d1a18 100644 (file)
@@ -5,7 +5,7 @@
 ################################################################################
 
 OLSR_VERSION_MAJOR = 0.6
-OLSR_VERSION = $(OLSR_VERSION_MAJOR).6.2
+OLSR_VERSION = $(OLSR_VERSION_MAJOR).8
 OLSR_SOURCE = olsrd-$(OLSR_VERSION).tar.bz2
 OLSR_SITE = http://www.olsr.org/releases/$(OLSR_VERSION_MAJOR)
 OLSR_PLUGINS = arprefresh bmf dot_draw dyn_gw dyn_gw_plain httpinfo jsoninfo \
@@ -31,12 +31,13 @@ define OLSR_INSTALL_TARGET_CMDS
                        LDCONFIG=/bin/true DESTDIR=$(TARGET_DIR) \
                        prefix="/usr" install ; \
        done
-       test -r $(TARGET_DIR)/etc/olsrd.conf || \
-               $(INSTALL) -D -m 0644 $(@D)/files/olsrd.conf.default.lq $(TARGET_DIR)/etc/olsrd.conf
+       $(INSTALL) -D -m 0644 $(@D)/files/olsrd.conf.default.lq \
+               $(TARGET_DIR)/etc/olsrd/olsrd.conf
 endef
 
 define OLSR_INSTALL_INIT_SYSV
-       $(INSTALL) -D -m 0755 package/olsr/S50olsr $(TARGET_DIR)/etc/init.d/S50olsr
+       $(INSTALL) -D -m 0755 package/olsr/S50olsr \
+               $(TARGET_DIR)/etc/init.d/S50olsr
 endef
 
 $(eval $(generic-package))