summaryrefslogtreecommitdiff
path: root/openwrt/package/olsrd
diff options
context:
space:
mode:
authorNicolas Thill <nico@openwrt.org>2005-05-18 14:53:00 +0000
committerNicolas Thill <nico@openwrt.org>2005-05-18 14:53:00 +0000
commit92e1586bec3083edb189ff1ee3440081e243c10a (patch)
treea3c7927db214bac0beb7b14a66d9999ab95d6e73 /openwrt/package/olsrd
parentaa3c1b36deb5584a14798c430fd6e6686e6551fc (diff)
downloadmtk-20170518-92e1586bec3083edb189ff1ee3440081e243c10a.zip
mtk-20170518-92e1586bec3083edb189ff1ee3440081e243c10a.tar.gz
mtk-20170518-92e1586bec3083edb189ff1ee3440081e243c10a.tar.bz2
Convert olsrd to new packaging style, put plugins into sub-packages
SVN-Revision: 936
Diffstat (limited to 'openwrt/package/olsrd')
-rw-r--r--openwrt/package/olsrd/Config.in44
-rw-r--r--openwrt/package/olsrd/Makefile97
-rw-r--r--openwrt/package/olsrd/files/olsrd.init15
-rw-r--r--openwrt/package/olsrd/files/olsrd_secure_key1
-rw-r--r--openwrt/package/olsrd/ipkg/olsrd-mod-dot-draw.control9
-rw-r--r--openwrt/package/olsrd/ipkg/olsrd-mod-dyn-gw.control9
-rw-r--r--openwrt/package/olsrd/ipkg/olsrd-mod-httpinfo.control9
-rw-r--r--openwrt/package/olsrd/ipkg/olsrd-mod-nameservice.control9
-rw-r--r--openwrt/package/olsrd/ipkg/olsrd-mod-power.control9
-rw-r--r--openwrt/package/olsrd/ipkg/olsrd-mod-secure.conffiles1
-rw-r--r--openwrt/package/olsrd/ipkg/olsrd-mod-secure.control9
-rw-r--r--openwrt/package/olsrd/ipkg/olsrd.conffiles1
-rw-r--r--openwrt/package/olsrd/ipkg/olsrd.control10
-rw-r--r--openwrt/package/olsrd/patches/olsrd-0.4.9-opt-flags.diff13
-rw-r--r--openwrt/package/olsrd/patches/olsrd-0.4.9-secure-key-path.path12
15 files changed, 205 insertions, 43 deletions
diff --git a/openwrt/package/olsrd/Config.in b/openwrt/package/olsrd/Config.in
index e598c2c..9bef83f 100644
--- a/openwrt/package/olsrd/Config.in
+++ b/openwrt/package/olsrd/Config.in
@@ -1,5 +1,45 @@
config BR2_PACKAGE_OLSRD
- tristate "olsrd"
+ tristate "olsrd - OLSR (Optimized Link State Routing) daemon"
default m if CONFIG_DEVEL
help
- The Optimized Link State Routing daemon
+ The Optimized Link State Routing daemon
+
+ http://www.olsr.org/
+
+
+config BR2_PACKAGE_OLSRD_MOD_DOT_DRAW
+ depends BR2_PACKAGE_OLSRD
+ prompt "mod-dot-draw - a dot topology information plugin"
+ tristate
+ default m if CONFIG_DEVEL
+
+config BR2_PACKAGE_OLSRD_MOD_DYN_GW
+ depends BR2_PACKAGE_OLSRD
+ prompt "mod-dyn-gw - a dynamic internet gateway plugin"
+ tristate
+ default m if CONFIG_DEVEL
+
+config BR2_PACKAGE_OLSRD_MOD_HTTPINFO
+ depends BR2_PACKAGE_OLSRD
+ prompt "mod-httpinfo - a small informative web server plugin"
+ tristate
+ default m if CONFIG_DEVEL
+
+config BR2_PACKAGE_OLSRD_MOD_NAMESERVICE
+ depends BR2_PACKAGE_OLSRD
+ prompt "mod-nameservice - a lightweight hostname resolver plugin"
+ tristate
+ default m if CONFIG_DEVEL
+
+config BR2_PACKAGE_OLSRD_MOD_POWER
+ depends BR2_PACKAGE_OLSRD
+ prompt "mod-power - a power status plugin"
+ tristate
+ default m if CONFIG_DEVEL
+
+config BR2_PACKAGE_OLSRD_MOD_SECURE
+ depends BR2_PACKAGE_OLSRD
+ prompt "mod-secure - a message signing plugin to secure olsrd routing domain"
+ tristate
+ default m if CONFIG_DEVEL
+
diff --git a/openwrt/package/olsrd/Makefile b/openwrt/package/olsrd/Makefile
index 9317d55..0060fd9 100644
--- a/openwrt/package/olsrd/Makefile
+++ b/openwrt/package/olsrd/Makefile
@@ -9,52 +9,67 @@ PKG_MD5SUM:=593c0861fa10d2a8d0e7d8617479c5cf
PKG_SOURCE_URL:=http://www.olsr.org/releases/0.4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_CAT:=bzcat
-PKG_IPK:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
-PKG_IPK_DIR:=$(PKG_BUILD_DIR)/ipkg
-$(DL_DIR)/$(PKG_SOURCE):
- $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+
+include $(TOPDIR)/package/rules.mk
+
+define PKG_mod_template
+
+$$(IPKG_$(1)):
+ install -d -m0755 $$(IDIR_$(1))/usr/lib
+ install -m0755 $(PKG_INSTALL_DIR)/usr/lib/olsrd_$(2).so.* $$(IDIR_$(1))/usr/lib/
+ $(RSTRIP) $$(IDIR_$(1))
+ $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
+
+endef
-$(PKG_BUILD_DIR)/.unpacked: $(DL_DIR)/$(PKG_SOURCE)
- $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- touch $(PKG_BUILD_DIR)/.unpacked
+$(eval $(call PKG_template,OLSRD,olsrd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,OLSRD_MOD_DOT_DRAW,olsrd-mod-dot-draw,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,OLSRD_MOD_DYN_GW,olsrd-mod-dyn-gw,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,OLSRD_MOD_HTTPINFO,olsrd-mod-httpinfo,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,OLSRD_MOD_NAMESERVICE,olsrd-mod-nameservice,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,OLSRD_MOD_POWER,olsrd-mod-power,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,OLSRD_MOD_SECURE,olsrd-mod-secure,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
-$(PKG_BUILD_DIR)/$(PKG_NAME): $(PKG_BUILD_DIR)/.unpacked
+$(eval $(call PKG_mod_template,OLSRD_MOD_DOT_DRAW,dot_draw))
+$(eval $(call PKG_mod_template,OLSRD_MOD_DYN_GW,dyn_gw))
+$(eval $(call PKG_mod_template,OLSRD_MOD_HTTPINFO,httpinfo))
+$(eval $(call PKG_mod_template,OLSRD_MOD_NAMESERVICE,nameservice))
+$(eval $(call PKG_mod_template,OLSRD_MOD_POWER,power))
+$(eval $(call PKG_mod_template,OLSRD_MOD_SECURE,secure))
+
+$(PKG_BUILD_DIR)/.configured:
+ touch $(PKG_BUILD_DIR)/.configured
+
+$(PKG_BUILD_DIR)/.built:
$(MAKE) -C "$(PKG_BUILD_DIR)" \
+ $(TARGET_CONFIGURE_OPTS) \
+ OFLAGS="$(TARGET_CFLAGS)" \
OS="linux" \
- CC="$(TARGET_CC)" \
- CFLAGS="$(TARGET_CFLAGS) -DOLSR_PLUGIN -I. -Isrc -Dlinux -I../../src -DNODEBUG" \
- libs
+ all libs
+ rm -rf $(PKG_INSTALL_DIR)
+ mkdir -p $(PKG_INSTALL_DIR)
$(MAKE) -C "$(PKG_BUILD_DIR)" \
+ INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
OS="linux" \
- CC="$(TARGET_CC)" \
- CFLAGS="$(TARGET_CFLAGS) -I. -Isrc -Dlinux -I../../src -DNODEBUG" \
- all
-
-$(PKG_IPK): $(PKG_BUILD_DIR)/$(PKG_NAME)
- $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
- mkdir -p $(PKG_IPK_DIR)/usr/sbin
- mkdir -p $(PKG_IPK_DIR)/usr/lib
- cp $(PKG_BUILD_DIR)/$(PKG_NAME) $(PKG_IPK_DIR)/usr/sbin/
- cp $(PKG_BUILD_DIR)/lib/dyn_gw/olsrd_dyn_gw.so.0.3 $(PKG_IPK_DIR)/usr/lib/
- cp $(PKG_BUILD_DIR)/lib/nameservice/olsrd_nameservice.so.0.2 $(PKG_IPK_DIR)/usr/lib/
- cp $(PKG_BUILD_DIR)/lib/httpinfo/olsrd_httpinfo.so.0.1 $(PKG_IPK_DIR)/usr/lib/
- cp $(PKG_BUILD_DIR)/lib/secure/olsrd_secure.so.0.5 $(PKG_IPK_DIR)/usr/lib/
- $(STRIP) $(PKG_IPK_DIR)/usr/sbin/*
- $(STRIP) $(PKG_IPK_DIR)/usr/lib/*
- mkdir -p $(PACKAGE_DIR)
- $(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR)
-
-$(IPKG_STATE_DIR)/info/$(PKG_NAME).list: $(PKG_IPK)
- $(IPKG) install $(PKG_IPK)
-
-source: $(DL_DIR)/$(PKG_SOURCE)
-prepare: $(PKG_BUILD_DIR)/.unpacked
-compile: $(PKG_IPK)
-install: $(IPKG_STATE_DIR)/info/$(PKG_NAME).list
-
-clean:
- rm -rf $(PKG_BUILD_DIR)
- rm -f $(PKG_IPK)
+ install install_libs
+ touch $(PKG_BUILD_DIR)/.built
+
+$(IPKG_OLSRD):
+ install -d -m0755 $(IDIR_OLSRD)/etc
+ cp -fpR $(PKG_INSTALL_DIR)/etc/olsrd.conf $(IDIR_OLSRD)/etc/
+ install -d -m0755 $(IDIR_OLSRD)/usr/sbin
+ cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/olsrd $(IDIR_OLSRD)/usr/sbin/
+ install -d -m0755 $(IDIR_OLSRD)/etc/init.d
+ cp -fpR ./files/olsrd.init $(IDIR_OLSRD)/etc/init.d/olsrd
+ $(RSTRIP) $(IDIR_OLSRD)
+ $(IPKG_BUILD) $(IDIR_OLSRD) $(PACKAGE_DIR)
+
+$(IPKG_OLSRD_MOD_SECURE): $(IDIR_OLSRD_MOD_SECURE)/etc/olsrd.d/olsrd_secure_key
+
+$(IDIR_OLSRD_MOD_SECURE)/etc/olsrd.d/olsrd_secure_key:
+ install -d -m0755 $(IDIR_OLSRD_MOD_SECURE)/etc/olsrd.d
+ cp -fpR ./files/olsrd_secure_key $(IDIR_OLSRD_MOD_SECURE)/etc/olsrd.d/
diff --git a/openwrt/package/olsrd/files/olsrd.init b/openwrt/package/olsrd/files/olsrd.init
new file mode 100644
index 0000000..1f1fdb9
--- /dev/null
+++ b/openwrt/package/olsrd/files/olsrd.init
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+DEFAULT=/etc/default/olsrd
+[ -f $DEFAULT ] && . $DEFAULT
+
+case $1 in
+ start)
+ olsrd $OPTIONS
+ ;;
+ *)
+ echo "usage: $0 (start)"
+ exit 1
+esac
+
+exit $?
diff --git a/openwrt/package/olsrd/files/olsrd_secure_key b/openwrt/package/olsrd/files/olsrd_secure_key
new file mode 100644
index 0000000..4a7d725
--- /dev/null
+++ b/openwrt/package/olsrd/files/olsrd_secure_key
@@ -0,0 +1 @@
+1234567890123456 \ No newline at end of file
diff --git a/openwrt/package/olsrd/ipkg/olsrd-mod-dot-draw.control b/openwrt/package/olsrd/ipkg/olsrd-mod-dot-draw.control
new file mode 100644
index 0000000..0cea9d6
--- /dev/null
+++ b/openwrt/package/olsrd/ipkg/olsrd-mod-dot-draw.control
@@ -0,0 +1,9 @@
+Package: olsrd-mod-dot-draw
+Priority: optional
+Section: net
+Version: [TBDL]
+Architecture: [TBDL]
+Maintainer: Nico <nthill@free.fr>
+Source: http://nthill.free.fr/openwrt/sources/olsrd/
+Description: a dot topology information plugin for olsrd
+Depends: olsrd
diff --git a/openwrt/package/olsrd/ipkg/olsrd-mod-dyn-gw.control b/openwrt/package/olsrd/ipkg/olsrd-mod-dyn-gw.control
new file mode 100644
index 0000000..32767ab
--- /dev/null
+++ b/openwrt/package/olsrd/ipkg/olsrd-mod-dyn-gw.control
@@ -0,0 +1,9 @@
+Package: olsrd-mod-dyn-gw
+Priority: optional
+Section: net
+Version: [TBDL]
+Architecture: [TBDL]
+Maintainer: Nico <nthill@free.fr>
+Source: http://nthill.free.fr/openwrt/sources/olsrd/
+Description: a dynamic internet gateway plugin for olsrd
+Depends: olsrd
diff --git a/openwrt/package/olsrd/ipkg/olsrd-mod-httpinfo.control b/openwrt/package/olsrd/ipkg/olsrd-mod-httpinfo.control
new file mode 100644
index 0000000..c42cf3a
--- /dev/null
+++ b/openwrt/package/olsrd/ipkg/olsrd-mod-httpinfo.control
@@ -0,0 +1,9 @@
+Package: olsrd-mod-httpinfo
+Priority: optional
+Section: net
+Version: [TBDL]
+Architecture: [TBDL]
+Maintainer: Nico <nthill@free.fr>
+Source: http://nthill.free.fr/openwrt/sources/olsrd/
+Description: a small informative web server plugin for olsrd
+Depends: olsrd
diff --git a/openwrt/package/olsrd/ipkg/olsrd-mod-nameservice.control b/openwrt/package/olsrd/ipkg/olsrd-mod-nameservice.control
new file mode 100644
index 0000000..4db6638
--- /dev/null
+++ b/openwrt/package/olsrd/ipkg/olsrd-mod-nameservice.control
@@ -0,0 +1,9 @@
+Package: olsrd-mod-nameservice
+Priority: optional
+Section: net
+Version: [TBDL]
+Architecture: [TBDL]
+Maintainer: Nico <nthill@free.fr>
+Source: http://nthill.free.fr/openwrt/sources/olsrd/
+Description: a lightweight hostname resolver plugin for olsrd
+Depends: olsrd
diff --git a/openwrt/package/olsrd/ipkg/olsrd-mod-power.control b/openwrt/package/olsrd/ipkg/olsrd-mod-power.control
new file mode 100644
index 0000000..4f3ba6f
--- /dev/null
+++ b/openwrt/package/olsrd/ipkg/olsrd-mod-power.control
@@ -0,0 +1,9 @@
+Package: olsrd-mod-power
+Priority: optional
+Section: net
+Version: [TBDL]
+Architecture: [TBDL]
+Maintainer: Nico <nthill@free.fr>
+Source: http://nthill.free.fr/openwrt/sources/olsrd/
+Description: a power status plugin for olsrd
+Depends: olsrd
diff --git a/openwrt/package/olsrd/ipkg/olsrd-mod-secure.conffiles b/openwrt/package/olsrd/ipkg/olsrd-mod-secure.conffiles
new file mode 100644
index 0000000..34e90b8
--- /dev/null
+++ b/openwrt/package/olsrd/ipkg/olsrd-mod-secure.conffiles
@@ -0,0 +1 @@
+/etc/olsrd.d/olsrd_secure_key
diff --git a/openwrt/package/olsrd/ipkg/olsrd-mod-secure.control b/openwrt/package/olsrd/ipkg/olsrd-mod-secure.control
new file mode 100644
index 0000000..de15409
--- /dev/null
+++ b/openwrt/package/olsrd/ipkg/olsrd-mod-secure.control
@@ -0,0 +1,9 @@
+Package: olsrd-mod-secure
+Priority: optional
+Section: net
+Version: [TBDL]
+Architecture: [TBDL]
+Maintainer: Nico <nthill@free.fr>
+Source: http://nthill.free.fr/openwrt/sources/olsrd/
+Description: a message signing plugin to secure olsrd routing domain
+Depends: olsrd
diff --git a/openwrt/package/olsrd/ipkg/olsrd.conffiles b/openwrt/package/olsrd/ipkg/olsrd.conffiles
new file mode 100644
index 0000000..a0b5e8e
--- /dev/null
+++ b/openwrt/package/olsrd/ipkg/olsrd.conffiles
@@ -0,0 +1 @@
+/etc/olsrd.conf
diff --git a/openwrt/package/olsrd/ipkg/olsrd.control b/openwrt/package/olsrd/ipkg/olsrd.control
new file mode 100644
index 0000000..0d2a2bc
--- /dev/null
+++ b/openwrt/package/olsrd/ipkg/olsrd.control
@@ -0,0 +1,10 @@
+Package: olsrd
+Priority: optional
+Section: net
+Maintainer: Felix Fietkau <nbd@vd-s.ath.cx>
+Source: buildroot internal
+Description: The olsr.org OLSR daemon
+ olsrd is an implementation of the Optimized Link State Routing protocol.
+ OLSR is a routing protocol for mobile ad-hoc networks. The protocol is
+ pro-active, table driven and utilizes a technique called multipoint
+ relaying for message flooding.
diff --git a/openwrt/package/olsrd/patches/olsrd-0.4.9-opt-flags.diff b/openwrt/package/olsrd/patches/olsrd-0.4.9-opt-flags.diff
new file mode 100644
index 0000000..c601ae0
--- /dev/null
+++ b/openwrt/package/olsrd/patches/olsrd-0.4.9-opt-flags.diff
@@ -0,0 +1,13 @@
+diff -ruN olsrd-0.4.9-orig/Makefile olsrd-0.4.9-1/Makefile
+--- olsrd-0.4.9-orig/Makefile 2005-03-31 20:39:24.000000000 +0200
++++ olsrd-0.4.9-1/Makefile 2005-04-05 02:14:48.000000000 +0200
+@@ -72,7 +72,8 @@
+ SRCS += $(wildcard src/linux/*.c) $(wildcard src/unix/*.c)
+ HDRS += $(wildcard src/linux/*.h) $(wildcard src/unix/*.h)
+ DEFINES = -Dlinux
+-CFLAGS ?= $(CCWARNINGS) -O2 -g #-DDEBUG #-pg #-march=i686
++OFLAGS ?= -O2 -g
++CFLAGS ?= $(CCWARNINGS) $(OFLAGS) #-DDEBUG #-pg #-march=i686
+ LIBS = -lm -ldl #-pg
+ MAKEDEPEND = makedepend -f $(DEPFILE) $(DEFINES) -Y $(INCLUDES) $(SRCS) >/dev/null 2>&1
+
diff --git a/openwrt/package/olsrd/patches/olsrd-0.4.9-secure-key-path.path b/openwrt/package/olsrd/patches/olsrd-0.4.9-secure-key-path.path
new file mode 100644
index 0000000..fcae759
--- /dev/null
+++ b/openwrt/package/olsrd/patches/olsrd-0.4.9-secure-key-path.path
@@ -0,0 +1,12 @@
+diff -ruN olsrd-0.4.9-orig/lib/secure/src/olsrd_secure.h olsrd-0.4.9-1/lib/secure/src/olsrd_secure.h
+--- olsrd-0.4.9-orig/lib/secure/src/olsrd_secure.h 2005-03-10 20:57:48.000000000 +0100
++++ olsrd-0.4.9-1/lib/secure/src/olsrd_secure.h 2005-04-05 00:51:40.000000000 +0200
+@@ -43,7 +43,7 @@
+
+ #include "olsrd_plugin.h"
+
+-#define KEYFILE "/root/.olsr/olsrd_secure_key"
++#define KEYFILE "/etc/olsrd.d/olsrd_secure_key"
+
+ /* Schemes */
+ #define ONE_CHECKSUM 1