fix aodv-uu build on 2.6.19, Makefile cleanup
[openwrt/svn-archive/archive.git] / net / aodv-uu / Makefile
index 9d5d7bc61cb78b8f61ad6f01a3ae4a808f9da4e1..773053b4a310a1860040f6494bc178d4eb1ad049 100644 (file)
@@ -13,32 +13,41 @@ PKG_NAME:=aodv-uu
 PKG_VERSION:=0.9.3
 PKG_RELEASE:=1
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://core.it.uu.se/core/files/
 PKG_MD5SUM:=05460543054449cb4b170252a7168c65
 PKG_CAT:=zcat
 
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
 
-define Package/aodv-uu
-  SECTION:=base
-  CATEGORY:=Network
+define Package/aodv-uu/Default
   TITLE:=Ad-hoc On-demand Distance Vector Routing
   DESCRIPTION:=\
-       Ad-hoc On-demand Distance Vector Routing
-  URL:=http://core.it.uu.se/adhoc/AodvUUImpl
+       AODV is the Ad-hoc On-demand Distance Vector routing protocol \\\
+       implementation created at Uppsala University.
+  URL:=http://core.it.uu.se/core/index.php/AODV-UU
+endef
+
+define Package/aodv-uu
+  $(call Package/aodv-uu/Default)
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE+= (daemon)
+  DESCRIPTION+=\\\
+       \\\
+       This package contains the AODV userland daemon.
 endef
 
 define Package/kmod-aodv-uu
+  $(call Package/aodv-uu/Default)
   SECTION:=kernel
   CATEGORY=Kernel drivers
-  TITLE:=kernel module for Ad-hoc On-demand Distance Vector Routing
-  DESCRIPTION:=\
-       Ad-hoc On-demand Distance Vector Routing
-  URL:=http://core.it.uu.se/adhoc/AodvUUImpl
+  TITLE+= (kernel module)
+  DESCRIPTION+=\\\
+       \\\
+       This package contains the AODV kernel module.
 endef
 
 ifeq ($(CONFIG_LINUX_2_6),y)
@@ -55,9 +64,10 @@ else
   # We assume 2.4 builds are only for brcm-2.4 yet
   define Build/Compile/linux24-brcm
        $(call Build/Compile/Default,\
-               KERNEL_DIR="$(LINUX_DIR)/" \
+               KERNEL_DIR="$(LINUX_DIR)" \
                KCC="$(TARGET_CC)" \
-               CFLAGS="$(TARGET_CFLAGS)" kaodv-mips \
+               CFLAGS="$(TARGET_CFLAGS)" \
+               kaodv-mips \
        )
        cp $(PKG_BUILD_DIR)/lnx/kaodv-mips.$(LINUX_KMOD_SUFFIX) $(PKG_BUILD_DIR)/lnx/kaodv.$(LINUX_KMOD_SUFFIX)
   endef
@@ -67,9 +77,10 @@ define Build/Compile
        $(call Build/Compile/linux26)
        $(call Build/Compile/linux24-brcm)
        $(call Build/Compile/Default,\
-               KERNEL_DIR="$(LINUX_DIR)/" \
-                KCC="$(TARGET_CC)" \
-                CFLAGS="$(TARGET_CFLAGS)" aodvd \
+               KERNEL_DIR="$(LINUX_DIR)" \
+               KCC="$(TARGET_CC)" \
+               CFLAGS="$(TARGET_CFLAGS)" \
+               aodvd \
        )
 endef
 
@@ -79,7 +90,7 @@ define Package/aodv-uu/install
 endef
 
 define Package/kmod-aodv-uu/install
-       mkdir -p $(1)/etc/modules.d
+       $(INSTALL_DIR) $(1)/etc/modules.d
        $(INSTALL_DATA) ./files/aodv-uu.modules $(1)/etc/modules.d/80-aodv-uu
        $(INSTALL_DIR) $(1)/lib/modules/$(LINUX_VERSION)
        $(CP) $(PKG_BUILD_DIR)/lnx/kaodv.$(LINUX_KMOD_SUFFIX) $(1)/lib/modules/$(LINUX_VERSION)/