Add uob-nomad, closes #540
authorFlorian Fainelli <florian@openwrt.org>
Mon, 9 Oct 2006 18:48:05 +0000 (18:48 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Mon, 9 Oct 2006 18:48:05 +0000 (18:48 +0000)
SVN-Revision: 5001

net/uob-nomad/Makefile [new file with mode: 0644]
net/uob-nomad/patches/001-inet_sr.patch [new file with mode: 0644]
net/uob-nomad/patches/002-hostname.patch [new file with mode: 0644]
net/uob-nomad/patches/003-conf.patch [new file with mode: 0644]

diff --git a/net/uob-nomad/Makefile b/net/uob-nomad/Makefile
new file mode 100644 (file)
index 0000000..b547078
--- /dev/null
@@ -0,0 +1,70 @@
+# Copyright (C) 2006 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:=uob-nomad
+PKG_VERSION:=0.11
+PKG_RELEASE:=1
+PKG_MD5SUM:=9c7445cefaf8d6160017aef606f2e558
+
+PKG_SOURCE_URL:=http://www.comnets.uni-bremen.de/~mab/openwrt/source/
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_CAT:=zcat
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/uob-nomad
+  SECTION:=net
+  CATEGORY:=Network
+  DEPENDS:=+kmod-ipip +libpthread
+  TITLE:=UoB Nomad
+  DESCRIPTION:=This is an implementation of NOMADv4 (Filters for\\\
+       Mobile IP, IETF Draft\\\
+       draft-mobileip-nomad-filters-05.txt) for Linux,\\\
+       based on the Sun Labs Mobile IP software. It is\\\
+       released under the Sun Public License (SPL).\\\
+       \\\
+       This version (0.11) has been modified to provide\\\
+       status information to the UoB-NOMAD-GUI (ver 0.1).
+  URL:=http://www.comnets.uni-bremen.de/~mab/openwrt/source/
+endef
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR)/Agent \
+               CC=$(TARGET_CC) \
+               $(TARGET_CONFIGURE_OPTS) \
+               mipagent
+       $(MAKE) -C $(PKG_BUILD_DIR)/Client/net-tools \
+               CC=$(TARGET_CC) \
+               $(TARGET_CONFIGURE_OPTS) \
+               clean
+       $(MAKE) -C $(PKG_BUILD_DIR)/Client/net-tools/lib \
+               CC=$(TARGET_CC) \
+               $(TARGET_CONFIGURE_OPTS) \
+               clean
+       $(MAKE) -C $(PKG_BUILD_DIR)/Client/net-tools \
+               CC=$(TARGET_CC) \
+               $(TARGET_CONFIGURE_OPTS) \
+               all
+       $(MAKE) -C $(PKG_BUILD_DIR)/Client \
+               CC=$(TARGET_CC) \
+               $(TARGET_CONFIGURE_OPTS) \
+               mipmn
+endef
+
+define Package/uob-nomad/install       
+       install -d -m0755 $(1)/usr/bin $(1)/usr/lib $(1)/etc/
+       $(CP) $(PKG_BUILD_DIR)/Agent/mipagent $(1)/usr/bin/
+       $(CP) $(PKG_BUILD_DIR)/Client/mipmn $(1)/usr/bin
+       $(CP) $(PKG_BUILD_DIR)/conf/mip{agent,mn,mn-filters}.conf $(1)/etc/
+endef
+
+$(eval $(call BuildPackage,uob-nomad))
diff --git a/net/uob-nomad/patches/001-inet_sr.patch b/net/uob-nomad/patches/001-inet_sr.patch
new file mode 100644 (file)
index 0000000..21c940b
--- /dev/null
@@ -0,0 +1,11 @@
+diff -urN uob-nomad-0.11/Client/net-tools/lib/inet_sr.c uob-nomad-0.11.new/Client/net-tools/lib/inet_sr.c
+--- uob-nomad-0.11/Client/net-tools/lib/inet_sr.c      2003-09-05 10:21:52.000000000 +0200
++++ uob-nomad-0.11.new/Client/net-tools/lib/inet_sr.c  2006-10-09 20:36:50.000000000 +0200
+@@ -105,6 +105,7 @@
+     case 2:
+        isnet = 0; break;
+     default:
++      break;
+     }
+     /* Fill in the other fields. */
diff --git a/net/uob-nomad/patches/002-hostname.patch b/net/uob-nomad/patches/002-hostname.patch
new file mode 100644 (file)
index 0000000..7882c15
--- /dev/null
@@ -0,0 +1,34 @@
+--- uob-nomad-0.11/Client/net-tools/hostname.c 2003-09-05 10:21:54.000000000 +0200
++++ uob-nomad-0.11.new/Client/net-tools/hostname.c     2006-10-09 20:38:25.000000000 +0200
+@@ -77,6 +77,7 @@
+             fprintf(stderr, _("%s: name too long\n"), program_name);
+             break;
+         default:
++          break;
+         }
+       exit(1);
+     }
+@@ -97,6 +98,7 @@
+           fprintf(stderr, _("%s: name too long\n"), program_name);
+           break;
+       default:
++          break;
+       }
+       exit(1);
+     };
+@@ -116,6 +118,7 @@
+           fprintf(stderr, _("%s: name too long\n"), program_name);
+           break;
+       default:
++          break;
+       }
+       exit(1);
+     };
+@@ -173,6 +176,7 @@
+       printf("%s\n", hp->h_name);
+       break;
+     default:
++      break;
+     }
+ }
diff --git a/net/uob-nomad/patches/003-conf.patch b/net/uob-nomad/patches/003-conf.patch
new file mode 100644 (file)
index 0000000..7927a05
--- /dev/null
@@ -0,0 +1,21 @@
+diff -ruN package/uobnomad.orig/patches/003-conf.patch package/uobnomad/patches/003-conf.patch
+--- package/uobnomad.orig/patches/003-conf.patch        1970-01-01 01:00:00.000000000 +0100
++++ package/uobnomad/patches/003-conf.patch     2006-05-08 16:54:36.000000000 +0200
+@@ -0,0 +1,17 @@
++--- uob-nomad-0.11-orig/Client/mobile.h        2003-10-20 16:07:09.000000000 +0200
+++++ uob-nomad-0.11/Client/mobile.h     2006-05-08 16:53:31.000000000 +0200
++@@ -83,10 +83,10 @@
++ /* Destination port for registration requests */
++ #define MIP_PORT                     434
++
++-//#define CONF_FILE_NAME               "/etc/mipmn.conf"
++-//#define FILTER_FILE_NAME             "/etc/mipmn-filters.conf"
++-#define CONF_FILE_NAME               "/home/adu/mipmn.conf"
++-#define FILTER_FILE_NAME             "/home/adu/mipmn-filters.conf"
+++#define CONF_FILE_NAME               "/etc/mipmn.conf"
+++#define FILTER_FILE_NAME             "/etc/mipmn-filters.conf"
+++//#define CONF_FILE_NAME               "/home/adu/mipmn.conf"
+++//#define FILTER_FILE_NAME             "/home/adu/mipmn-filters.conf"
++ #define ROUTE_PATH                     "/sbin/route"
++
++ /* Maximum number of mobility agents a MN keeps track of */