From 6dc4f5960d684080614b2fa45a1369ec2ebe4137 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Tue, 25 Jul 2006 14:05:35 +0000 Subject: [PATCH] Add aodv-uu userspace daemon, kernel module needs makefile rewriting SVN-Revision: 4277 --- net/aodv-uu/Makefile | 44 ++++++++++++++++++ net/aodv-uu/patches/001-normalize.patch | 62 +++++++++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 net/aodv-uu/Makefile create mode 100644 net/aodv-uu/patches/001-normalize.patch diff --git a/net/aodv-uu/Makefile b/net/aodv-uu/Makefile new file mode 100644 index 000000000..baa36207d --- /dev/null +++ b/net/aodv-uu/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id: Makefile 4091 2006-06-27 00:35:46Z mbm $ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=aodv-uu +PKG_VERSION:=0.9.1 +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.comnets.uni-bremen.de/~mua/ +PKG_MD5SUM:=ec23502d63664231f573557ddce38a82 +PKG_CAT:=zcat + +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install + +include $(INCLUDE_DIR)/package.mk + +define Package/aodv-uu +SECTION:=base +CATEGORY:=Network +TITLE:=Ad-hoc On-demand Distance Vector Routing +DESCRIPTION:=Ad-hoc On-demand Distance Vector Routing +URL:=http://core.it.uu.se/adhoc/AodvUUImpl +endef + +define Build/Compile + $(call Build/Compile/Default,CC="$(TARGET_CC)" \ +KERNEL_DIR="$(LINUX_DIR)/" KCC="$(TARGET_CC)" LD="$(TARGET_CROSS)ld" \ +CFLAGS="$(TARGET_CFLAGS)" aodvd) +endef + +define Package/aodv-uu/install + install -m0755 -d $(1)/usr/sbin + install -m0755 $(PKG_BUILD_DIR)/aodvd $(1)/usr/sbin +endef + +$(eval $(call BuildPackage,aodv-uu)) diff --git a/net/aodv-uu/patches/001-normalize.patch b/net/aodv-uu/patches/001-normalize.patch new file mode 100644 index 000000000..3c76700fb --- /dev/null +++ b/net/aodv-uu/patches/001-normalize.patch @@ -0,0 +1,62 @@ +diff -urN aodv-uu-0.9.1/lnx/Makefile aodv-uu-0.9.1.new/lnx/Makefile +--- aodv-uu-0.9.1/lnx/Makefile 2005-03-17 22:37:59.000000000 +0100 ++++ aodv-uu-0.9.1.new/lnx/Makefile 2006-07-25 15:46:02.000000000 +0200 +@@ -30,7 +30,7 @@ + KCFLAGS=-Wall -Wno-strict-aliasing -O2 $(KDEFS) $(KINC) $(XDEFS) + KCFLAGS_ARM=-Wall -O2 -D__KERNEL__ -DMODULE -nostdinc $(shell $(ARM_CC) -print-search-dirs | sed -ne 's/install: \(.*\)/-I \1include/gp') -I$(KERNEL_INC) + KCFLAGS_MIPS=-Wall -mips2 -O2 -fno-pic -mno-abicalls -mlong-calls -G0 -msoft-float -D__KERNEL__ -DMODULE -nostdinc $(shell $(MIPS_CC) -print-search-dirs | sed -ne 's/install: \(.*\)/-I \1include/gp') -I$(KERNEL_INC) $(XDEFS) +- ++endif + .PHONY: clean clean-2.4 clean-2.6 indent default + + # Check for kernel version +@@ -87,5 +87,3 @@ + + indent: + indent -kr -i8 -ts8 -sob -l80 -ss -ncs *.c *.h +-endif +- +diff -urN aodv-uu-0.9.1/Makefile aodv-uu-0.9.1.new/Makefile +--- aodv-uu-0.9.1/Makefile 2006-07-25 15:03:49.000000000 +0200 ++++ aodv-uu-0.9.1.new/Makefile 2006-07-25 15:03:59.000000000 +0200 +@@ -87,7 +87,7 @@ + mips: aodvd-mips kaodv-mips + + endian.h: +- $(CC) $(CFLAGS) -o endian endian.c ++ gcc -o endian endian.c + ./endian > endian.h + + $(OBJS): %.o: %.c Makefile +@@ -138,19 +138,18 @@ + @makedepend -Y./ -- $(DEFS) -- $(SRC) &>/dev/null + @makedepend -a -Y./ -- $(KDEFS) kaodv.c &>/dev/null + +-install: default +- install -s -m 755 aodvd /usr/sbin/aodvd +- @if [ ! -d /lib/modules/$(KERNEL)/aodv ]; then \ +- mkdir /lib/modules/$(KERNEL)/aodv; \ +- fi +- +- @echo "Installing kernel module in /lib/modules/$(KERNEL)/aodv/"; +- @if [ -f ./kaodv.ko ]; then \ +- install -m 644 kaodv.ko /lib/modules/$(KERNEL)/aodv/kaodv.ko; \ +- else \ +- install -m 644 kaodv.o /lib/modules/$(KERNEL)/aodv/kaodv.o; \ +- fi +- /sbin/depmod -a ++install: install-aodvd install-kaodv ++ ++install-aodvd: ++ @echo "Installing aodv in $(DESTDIR)/usr/sbin"; ++ install -d -m0755 $(DESTDIR)/usr/sbin/ ++ install -m0755 aodvd $(DESTDIR)/usr/sbin/aodvd ++ ++install-kaodv: ++ @echo "Installing kernel module in $(DESTDIR)/lib/modules/$(KERNEL)/"; ++ install -d -m0644 $(DESTDIR)/lib/modules/$(KERNEL)/ ++ install -m 644 lnx/kaodv.$(KMOD_SUFFIX) $(DESTDIR)/lib/modules/$(KERNEL)/kaodv.$(KMOD_SUFFIX); ++ + uninstall: + rm -f /usr/sbin/aodvd + rm -rf /lib/modules/$(KERNEL)/aodv -- 2.30.2