mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-27 21:34:04 +02:00
Convert olsrd to new packaging style, put plugins into sub-packages
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@936 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
f30ab83a1d
commit
8f4b79da58
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
$(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
|
||||
include $(TOPDIR)/package/rules.mk
|
||||
|
||||
$(PKG_BUILD_DIR)/$(PKG_NAME): $(PKG_BUILD_DIR)/.unpacked
|
||||
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
|
||||
|
||||
$(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)))
|
||||
|
||||
$(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
|
||||
install install_libs
|
||||
touch $(PKG_BUILD_DIR)/.built
|
||||
|
||||
$(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_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_STATE_DIR)/info/$(PKG_NAME).list: $(PKG_IPK)
|
||||
$(IPKG) install $(PKG_IPK)
|
||||
$(IPKG_OLSRD_MOD_SECURE): $(IDIR_OLSRD_MOD_SECURE)/etc/olsrd.d/olsrd_secure_key
|
||||
|
||||
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)
|
||||
$(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/
|
||||
|
15
package/olsrd/files/olsrd.init
Normal file
15
package/olsrd/files/olsrd.init
Normal file
@ -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 $?
|
1
package/olsrd/files/olsrd_secure_key
Normal file
1
package/olsrd/files/olsrd_secure_key
Normal file
@ -0,0 +1 @@
|
||||
1234567890123456
|
9
package/olsrd/ipkg/olsrd-mod-dot-draw.control
Normal file
9
package/olsrd/ipkg/olsrd-mod-dot-draw.control
Normal file
@ -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
|
9
package/olsrd/ipkg/olsrd-mod-dyn-gw.control
Normal file
9
package/olsrd/ipkg/olsrd-mod-dyn-gw.control
Normal file
@ -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
|
9
package/olsrd/ipkg/olsrd-mod-httpinfo.control
Normal file
9
package/olsrd/ipkg/olsrd-mod-httpinfo.control
Normal file
@ -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
|
9
package/olsrd/ipkg/olsrd-mod-nameservice.control
Normal file
9
package/olsrd/ipkg/olsrd-mod-nameservice.control
Normal file
@ -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
|
9
package/olsrd/ipkg/olsrd-mod-power.control
Normal file
9
package/olsrd/ipkg/olsrd-mod-power.control
Normal file
@ -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
|
1
package/olsrd/ipkg/olsrd-mod-secure.conffiles
Normal file
1
package/olsrd/ipkg/olsrd-mod-secure.conffiles
Normal file
@ -0,0 +1 @@
|
||||
/etc/olsrd.d/olsrd_secure_key
|
9
package/olsrd/ipkg/olsrd-mod-secure.control
Normal file
9
package/olsrd/ipkg/olsrd-mod-secure.control
Normal file
@ -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
|
1
package/olsrd/ipkg/olsrd.conffiles
Normal file
1
package/olsrd/ipkg/olsrd.conffiles
Normal file
@ -0,0 +1 @@
|
||||
/etc/olsrd.conf
|
10
package/olsrd/ipkg/olsrd.control
Normal file
10
package/olsrd/ipkg/olsrd.control
Normal file
@ -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.
|
13
package/olsrd/patches/olsrd-0.4.9-opt-flags.diff
Normal file
13
package/olsrd/patches/olsrd-0.4.9-opt-flags.diff
Normal file
@ -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
|
||||
|
12
package/olsrd/patches/olsrd-0.4.9-secure-key-path.path
Normal file
12
package/olsrd/patches/olsrd-0.4.9-secure-key-path.path
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user