merge r14352, r14391 & r14425 to 8.09
authorNicolas Thill <nico@openwrt.org>
Fri, 10 Apr 2009 14:49:38 +0000 (14:49 +0000)
committerNicolas Thill <nico@openwrt.org>
Fri, 10 Apr 2009 14:49:38 +0000 (14:49 +0000)
SVN-Revision: 15206

libs/zaptel-1.4.x/Makefile
libs/zaptel-1.4.x/patches/330-uname_m.patch [new file with mode: 0644]

index 6ebefa8a1be541447a34ea75234f873e3b9980df..bd920e0e536c03b83ea806dd707e06f9a20361ce 100644 (file)
@@ -1,17 +1,17 @@
 # 
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2009 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-# $Id: Makefile 5624 2006-11-23 00:29:07Z nbd $
+# $Id$
 
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=zaptel
 PKG_VERSION:=1.4.9.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://ftp.digium.com/pub/zaptel/releases/
@@ -25,17 +25,16 @@ define Package/zaptel14/Default
 endef
 
 define KernelPackage/zaptel14
-  SUBMENU:=Other modules
   $(call Package/zaptel14/Default)
+  SUBMENU:=Other modules
   TITLE+= (kernel module)
-  VERSION:=$(LINUX_VERSION)-$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
   FILES:=$(PKG_BUILD_DIR)/kernel/zaptel.$(LINUX_KMOD_SUFFIX) \
        $(PKG_BUILD_DIR)/kernel/ztdummy.$(LINUX_KMOD_SUFFIX)
   AUTOLOAD:=$(call AutoLoad,70,zaptel ztdummy)
 endef
 
 define KernelPackage/zaptel14/description
 This package contains the Zaptel core module and ztdummy driver.
+ This package contains the Zaptel core module and ztdummy driver.
 endef
 
 define Package/zaptel14-util
@@ -47,7 +46,7 @@ define Package/zaptel14-util
 endef
 
 define Package/zaptel14-util/description
 This package contains the zttest program
+ This package contains the zttest program
 endef
 
 define Package/zaptel14-libtonezone
@@ -59,50 +58,42 @@ define Package/zaptel14-libtonezone
 endef
 
 define Package/zaptel14-libtonezone/description
      This package contains the libraries for accessing zaptel/dummy drivers.
+ This package contains the libraries for accessing zaptel/dummy drivers.
 endef
 
-define Build/Compile/zaptel14-template
+MAKE_FLAGS:= \
+       ARCH="$(LINUX_KARCH)" \
+       CC="$(TARGET_CC) $(TARGET_CFLAGS)" \
+       LD="$(TARGET_CROSS)ld" \
+       CROSS_COMPILE="$(TARGET_CROSS)" \
+       KVERS="$(LINUX_VERSION)" \
+       KSRC="$(LINUX_DIR)" \
+       TOPDIR_MODULES="zaptel ztdummy" \
+       SUBDIR_MODULES=""
+
+define Build/Compile/kmod
        $(MAKE) -C $(PKG_BUILD_DIR) \
-               DESTDIR="$(PKG_INSTALL_DIR)" \
-               ARCH="$(LINUX_KARCH)" \
-               LD="$(TARGET_CROSS)ld" \
-               AR="$(TARGET_CROSS)ar" \
-               HOSTCC="$(HOSTCC)" \
-               DEB_HOST_GNU_TYPE="$(ARCH)" \
-               KVERS="$(LINUX_VERSION)" \
-               KSRC="$(LINUX_DIR)" \
-               $(1)
+               $(MAKE_FLAGS) \
+               modules
 endef
 
-define Build/Compile/zaptel14
-       $(call Build/Compile/zaptel14-template, \
-               CC="$(KERNEL_CC)" \
-               KFLAGS_PPC="-G 0 -mno-abicalls -fno-pic -pipe -finline-limit=100000 -mabi=32 $(TARGET_CFLAGS) -mlong-calls -fno-common -nostdinc -iwithprefix include" \
-               TOPDIR_MODULES="zaptel ztdummy" \
-               SUBDIR_MODULES="" \
-               modules zttest \
-       )
-endef
-
-define Build/Compile/zaptel14-libtonezone
-       $(call Build/Compile/zaptel14-template, \
-               CC="$(TARGET_CC)" \
-               install-libs install-include \
-       )
+define Build/Compile/user
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               ARCH="$(LINUX_KARCH)" \
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               install-libs install-include zttest
 endef
 
 define Build/Compile
-       $(call Build/Compile/zaptel14)
-       $(call Build/Compile/zaptel14-libtonezone)
+       $(call Build/Compile/kmod)
+       $(call Build/Compile/user)
 endef
 
 define Build/InstallDev
-       $(INSTALL_DIR)  $(STAGING_DIR)/usr/include/zaptel/
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/zaptel/zaptel.h $(STAGING_DIR)/usr/include/zaptel/
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/zaptel/tonezone.h $(STAGING_DIR)/usr/include/zaptel/
-       $(INSTALL_DIR)  $(STAGING_DIR)/usr/lib/
-       $(INSTALL_DATA)  $(PKG_INSTALL_DIR)/usr/lib/libtonezone* $(STAGING_DIR)/usr/lib/
+       $(INSTALL_DIR)  $(STAGING_DIR)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/zaptel $(STAGING_DIR)/usr/include/
+       $(INSTALL_DIR)  $(STAGING_DIR)/usr/lib
+       $(CP)  $(PKG_INSTALL_DIR)/usr/lib/libtonezone.* $(STAGING_DIR)/usr/lib/
 endef
 
 define Package/zaptel14-util/install
@@ -112,7 +103,7 @@ endef
 
 define Package/zaptel14-libtonezone/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libtonezone.so.* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtonezone.so.* $(1)/usr/lib/
 endef
 
 $(eval $(call KernelPackage,zaptel14))
diff --git a/libs/zaptel-1.4.x/patches/330-uname_m.patch b/libs/zaptel-1.4.x/patches/330-uname_m.patch
new file mode 100644 (file)
index 0000000..cf25934
--- /dev/null
@@ -0,0 +1,12 @@
+diff -urN zaptel-1.4.9.2/Makefile zaptel-1.4.9.2.new/Makefile
+--- zaptel-1.4.9.2/Makefile    2008-02-22 01:31:47.000000000 +0100
++++ zaptel-1.4.9.2.new/Makefile        2009-02-03 15:24:16.000000000 +0100
+@@ -21,7 +21,7 @@
+ ARCH:=$(shell uname -m | sed -e s/i.86/i386/)
+ ifeq ($(DEB_HOST_GNU_TYPE),)
+-UNAME_M:=$(shell uname -m)
++UNAME_M:=$(ARCH)
+ else
+ UNAME_M:=$(DEB_HOST_GNU_TYPE)
+ endif