packages: move zaptel to telephony feed

zaptel and zaptel-1.4.x belong to telephony, so move them to the
proper feed.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/packages@39842 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jogo 2014-03-08 11:11:04 +00:00
parent 65125b588a
commit 30a944610f
15 changed files with 0 additions and 528 deletions

View File

@ -1,176 +0,0 @@
#
# Copyright (C) 2006-2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=zaptel
PKG_VERSION:=1.4.12.1
PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://downloads.asterisk.org/pub/telephony/zaptel/releases/ \
http://ftp.digium.com/pub/zaptel/releases/
PKG_MD5SUM:=71e83a020b020fa60905edecf70e95a3
include $(INCLUDE_DIR)/package.mk
define Package/zaptel14/Default
TITLE:=Zaptel
URL:=http://ftp.digium.com/pub/zaptel/releases
DEPENDS:=
endef
define KernelPackage/zaptel14/Default
TITLE:=Zaptel (kernel module)
SUBMENU:=Voice over IP
DEPENDS:=
endef
define KernelPackage/zaptel14
$(call KernelPackage/zaptel14/Default)
TITLE:=Zaptel (kernel module)
FILES:=$(PKG_BUILD_DIR)/kernel/zaptel.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoLoad,70,zaptel)
endef
define KernelPackage/zaptel14/description
This package contains the Zaptel core module. No longer includes ztdummy
because it is not needed in all cases (and is in fact broken on x86).
endef
define KernelPackage/zaptel14-dummy
$(call KernelPackage/zaptel14/Default)
TITLE:=Zaptel Dummy (timer; kernel module)
DEPENDS += +kmod-zaptel14
FILES:=$(PKG_BUILD_DIR)/kernel/ztdummy.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoLoad,71,ztdummy)
endef
define KernelPackage/zaptel14/description
This package contains the Zaptel ztdummy driver. Broken on x86 due to lack
of RTC on some hardware.
endef
define KernelPackage/zaptel14-wcusb
$(call KernelPackage/zaptel14/Default)
DEPENDS += +kmod-zaptel14
FILES:=$(PKG_BUILD_DIR)/kernel/wcusb.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoLoad,72,wcusb)
endef
define KernelPackage/zaptel14-wcusb/description
This package contains the Zaptel S100U usb driver.
endef
define KernelPackage/zaptel14-wctdm
$(call KernelPackage/zaptel14/Default)
DEPENDS += +kmod-zaptel14
FILES:=$(PKG_BUILD_DIR)/kernel/wctdm.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoLoad,72,wctdm)
endef
define KernelPackage/zaptel14-wctdm/description
This package contains the Zaptel wctdm driver.
endef
define Package/zaptel14-util
$(call Package/zaptel14/Default)
SECTION:=utils
CATEGORY:=Utilities
TITLE+= utils
DEPENDS += +kmod-zaptel14 +zaptel14-libtonezone +libnewt
endef
define Package/zaptel14-util/description
This package contains the zaptel utils.
endef
define Package/zaptel14-libtonezone
$(call Package/zaptel14/Default)
SECTION:=libs
CATEGORY:=Libraries
TITLE+= libtonezone (library)
DEPENDS += +kmod-zaptel14
endef
define Package/zaptel14-libtonezone/description
This package contains the libraries for accessing zaptel/dummy drivers.
endef
CONFIGURE_VARS += \
LDFLAGS="$$$$LDFLAGS -Wl,-rpath-link $(STAGING_DIR)/usr/lib"
CONFIGURE_ARGS += \
--with-newt="$(STAGING_DIR)/usr" \
--without-curses \
--without-ncurses
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 wcusb wctdm" \
SUBDIR_MODULES=""
define Build/Compile/kmod
$(MAKE) -C $(PKG_BUILD_DIR) \
$(MAKE_FLAGS) \
modules
endef
define Build/Compile/user
$(MAKE) -C $(PKG_BUILD_DIR) \
ARCH="$(LINUX_KARCH)" \
DESTDIR="$(PKG_INSTALL_DIR)" \
AR="$(TARGET_CROSS)ar" \
RANLIB="$(TARGET_CROSS)ranlib" \
install-libs install-include zttest ztcfg zttool ztdiag fxotune ztmonitor ztscan ztspeed fxstest
endef
define Build/Compile
$(call Build/Compile/kmod)
$(call Build/Compile/user)
endef
define Build/InstallDev
$(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
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/zttest $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ztcfg $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/zttool $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ztdiag $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fxotune $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fxstest $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ztmonitor $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ztscan $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ztspeed $(1)/usr/bin/
$(INSTALL_DIR) $(1)/etc/hotplug.d/zaptel
$(INSTALL_DATA) ./files/10-create-device-node $(1)/etc/hotplug.d/zaptel/
endef
define Package/zaptel14-libtonezone/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtonezone.so.* $(1)/usr/lib/
endef
$(eval $(call KernelPackage,zaptel14))
$(eval $(call KernelPackage,zaptel14-dummy))
$(eval $(call KernelPackage,zaptel14-wcusb))
$(eval $(call KernelPackage,zaptel14-wctdm))
$(eval $(call BuildPackage,zaptel14-util))
$(eval $(call BuildPackage,zaptel14-libtonezone))

View File

@ -1,9 +0,0 @@
#!/bin/sh
case "$ACTION" in
add)
/bin/mkdir -p /dev/zap
/bin/mknod -m 0644 /dev/zap/${DEVICENAME#zap} c $MAJOR $MINOR
;;
esac

View File

@ -1,52 +0,0 @@
---
kernel/ztdummy.c | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
--- a/kernel/ztdummy.c
+++ b/kernel/ztdummy.c
@@ -54,7 +54,7 @@
* the #define USE_RTC should be commented out.
*/
#if defined(__i386__) || defined(__x86_64__)
-#if LINUX_VERSION_CODE >= VERSION_CODE(2,6,13)
+#if LINUX_VERSION_CODE >= VERSION_CODE(2,6,15)
/* The symbol hrtimer_forward is only exported as of 2.6.22: */
#if defined(CONFIG_HIGH_RES_TIMERS) && LINUX_VERSION_CODE >= VERSION_CODE(2,6,22)
#define USE_HIGHRESTIMER
@@ -90,6 +90,18 @@
#endif
#include "ztdummy.h"
+#if defined(USE_HIGHRESTIMER) && ( LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) )
+/* compatibility with new hrtimer interface */
+static inline ktime_t hrtimer_get_expires(const struct hrtimer *timer)
+{
+ return timer->expires;
+}
+
+static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time)
+{
+ timer->expires = time;
+}
+#endif
static struct ztdummy *ztd;
@@ -199,7 +211,7 @@ static enum hrtimer_restart ztdummy_hr_i
* expired.
* We should worry if overrun is 2 or more; then we really missed
* a tick */
- overrun = hrtimer_forward(&zaptimer, htmr->expires,
+ overrun = hrtimer_forward(&zaptimer, hrtimer_get_expires(htmr),
ktime_set(0, ZAPTEL_TIME_NS));
if(overrun > 1) {
if(printk_ratelimit())
@@ -222,7 +234,7 @@ static enum hrtimer_restart ztdummy_hr_i
/* use kernel system tick timer if PC architecture RTC is not available */
static void ztdummy_timer(unsigned long param)
{
- timer.expires = jiffies + 1;
+ hrtimer_set_expires(timer, jiffies + 1);
add_timer(&timer);
ztd->counter += ZAPTEL_TIME;

View File

@ -1,22 +0,0 @@
---
kernel/ztdummy.c | 2 --
1 file changed, 2 deletions(-)
--- a/kernel/ztdummy.c
+++ b/kernel/ztdummy.c
@@ -53,7 +53,6 @@
* If using an i386 architecture without a PC real-time clock,
* the #define USE_RTC should be commented out.
*/
-#if defined(__i386__) || defined(__x86_64__)
#if LINUX_VERSION_CODE >= VERSION_CODE(2,6,15)
/* The symbol hrtimer_forward is only exported as of 2.6.22: */
#if defined(CONFIG_HIGH_RES_TIMERS) && LINUX_VERSION_CODE >= VERSION_CODE(2,6,22)
@@ -66,7 +65,6 @@
#define USE_RTC
#endif
#endif
-#endif
#include <linux/kernel.h>
#include <linux/errno.h>

View File

@ -1,14 +0,0 @@
---
Makefile | 1 +
1 file changed, 1 insertion(+)
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,7 @@ ifeq ($(MAKELEVEL),0)
PWD:=$(shell pwd)
export PWD
endif
+PWD:=`pwd`
ifeq ($(ARCH),)
ARCH:=$(shell uname -m | sed -e s/i.86/i386/)

View File

@ -1,15 +0,0 @@
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/Makefile
+++ b/Makefile
@@ -25,7 +25,7 @@ ARCH:=$(shell uname -m | sed -e s/i.86/i
endif
ifeq ($(DEB_HOST_GNU_TYPE),)
-UNAME_M:=$(shell uname -m)
+UNAME_M:=$(ARCH)
else
UNAME_M:=$(DEB_HOST_GNU_TYPE)
endif

View File

@ -1,16 +0,0 @@
---
kernel/zaptel-base.c | 3 +++
1 file changed, 3 insertions(+)
--- a/kernel/zaptel-base.c
+++ b/kernel/zaptel-base.c
@@ -59,6 +59,9 @@
#include <linux/if_ppp.h>
#endif
#include <asm/atomic.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
+#include <linux/sched.h>
+#endif
#ifndef CONFIG_OLD_HDLC_API
#define NEW_HDLC_INTERFACE

View File

@ -1,11 +0,0 @@
--- a/kernel/zconfig.h
+++ b/kernel/zconfig.h
@@ -22,6 +22,8 @@
#include <linux/version.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
#include <linux/config.h>
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33))
+#include <generated/autoconf.h>
#else
#include <linux/autoconf.h>
#endif

View File

@ -1,31 +0,0 @@
--- a/kernel/wctdm.c
+++ b/kernel/wctdm.c
@@ -30,6 +30,8 @@
#include <linux/errno.h>
#include <linux/pci.h>
#include <linux/interrupt.h>
+#include <linux/slab.h>
+#include <linux/sched.h>
#include <asm/io.h>
#include "proslic.h"
#include "wctdm.h"
--- a/kernel/wcusb.c
+++ b/kernel/wcusb.c
@@ -37,6 +37,7 @@
#include <linux/init.h>
#include <linux/usb.h>
#include <linux/errno.h>
+#include <linux/slab.h>
#include <linux/version.h>
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,19)
--- a/kernel/ztdummy.c
+++ b/kernel/ztdummy.c
@@ -38,6 +38,7 @@
*/
#include <linux/version.h>
+#include <linux/slab.h>
#ifndef VERSION_CODE
# define VERSION_CODE(vers,rel,seq) ( ((vers)<<16) | ((rel)<<8) | (seq) )

View File

@ -1,39 +0,0 @@
---
kernel/zaptel-base.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
--- a/kernel/zaptel-base.c
+++ b/kernel/zaptel-base.c
@@ -5181,6 +5181,20 @@ static int zt_ioctl(struct inode *inode,
return zt_chan_ioctl(inode, file, cmd, data, unit);
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
+#include <linux/smp_lock.h>
+static long zt_ioctl_unlocked(struct file *file, unsigned int cmd, unsigned long data)
+{
+ int ret;
+
+ lock_kernel();
+ ret = zt_ioctl(file->f_path.dentry->d_inode, file, cmd, data);
+ unlock_kernel();
+
+ return ret;
+}
+#endif
+
int zt_register(struct zt_span *span, int prefmaster)
{
int x;
@@ -7632,7 +7646,11 @@ static struct file_operations zt_fops =
llseek: NULL,
open: zt_open,
release: zt_release,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
+ unlocked_ioctl: zt_ioctl_unlocked,
+#else
ioctl: zt_ioctl,
+#endif
read: zt_read,
write: zt_write,
poll: zt_poll,

View File

@ -1,23 +0,0 @@
--- a/kernel/zaptel-base.c
+++ b/kernel/zaptel-base.c
@@ -5182,14 +5182,20 @@ static int zt_ioctl(struct inode *inode,
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
+#ifdef CONFIG_BKL
#include <linux/smp_lock.h>
+#endif
static long zt_ioctl_unlocked(struct file *file, unsigned int cmd, unsigned long data)
{
int ret;
+#ifdef CONFIG_BKL
lock_kernel();
+#endif
ret = zt_ioctl(file->f_path.dentry->d_inode, file, cmd, data);
+#ifdef CONFIG_BKL
unlock_kernel();
+#endif
return ret;
}

View File

@ -1,23 +0,0 @@
--- a/Makefile
+++ b/Makefile
@@ -30,6 +30,9 @@ else
UNAME_M:=$(DEB_HOST_GNU_TYPE)
endif
+AR ?= ar
+RANLIB ?= ranlib
+
# If you want to build for a kernel other than the current kernel, set KVERS
ifndef KVERS
KVERS:=$(shell uname -r)
@@ -352,8 +355,8 @@ ztspeed: CFLAGS=
sethdlc-new: CFLAGS+=-I$(KINCLUDES)
$(LTZ_A): $(LTZ_A_OBJS)
- ar rcs $@ $^
- ranlib $@
+ $(AR) rcs $@ $^
+ $(RANLIB) $@
$(LTZ_SO): $(LTZ_SO_OBJS)
$(CC) $(CFLAGS) -shared -Wl,-soname,$(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER) -o $@ $^ $(LDFLAGS) $(LDLIBS) -lm

View File

@ -1,19 +0,0 @@
--- a/kernel/ztdummy.c
+++ b/kernel/ztdummy.c
@@ -79,6 +79,7 @@
#include <asm/io.h>
#endif
#ifdef LINUX26
+#include <linux/spinlock.h>
#ifdef USE_HIGHRESTIMER
#include <linux/hrtimer.h>
#endif
@@ -328,7 +329,7 @@ int init_module(void)
#ifdef LINUX26
ztd->counter = 0;
#ifdef USE_RTC
- ztd->rtclock = SPIN_LOCK_UNLOCKED;
+ spin_lock_init(&ztd->rtclock);
ztd->rtc_task.func = ztdummy_rtc_interrupt;
ztd->rtc_task.private_data = ztd;
err = rtc_register(&ztd->rtc_task);

View File

@ -1,59 +0,0 @@
#
# Copyright (C) 2006-2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=zaptel
PKG_VERSION:=1.2.27
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://downloads.asterisk.org/pub/telephony/zaptel/releases/
PKG_MD5SUM:=6e0ccf2a2a805054123b35bf8eb10ae9
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/kernel.mk
define Package/zaptel-libtonezone
SECTION:=libs
CATEGORY:=Libraries
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Zaptel tonezone library.
URL:=http://downloads.asterisk.org/pub/telephony/zaptel/
endef
define Build/Configure
endef
TARGET_CFLAGS += $(FPIC)
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) \
HOSTCC="$(HOSTCC)" \
CFLAGS="$(TARGET_CFLAGS) -I. -DBUILDING_TONEZONE" \
KSRC="$(LINUX_DIR)" \
KVERS="$(LINUX_VERSION)" \
DESTDIR="$(PKG_INSTALL_DIR)" \
install-tonezone
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/linux
$(CP) $(PKG_INSTALL_DIR)/usr/include/linux/zaptel.h $(1)/usr/include/linux/
$(CP) $(PKG_INSTALL_DIR)/usr/include/tonezone.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtonezone.so* $(1)/usr/lib/
endef
define Package/zaptel-libtonezone/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtonezone.so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,zaptel-libtonezone))

View File

@ -1,19 +0,0 @@
--- a/Makefile
+++ b/Makefile
@@ -501,6 +501,16 @@ install-include: zaptel.h torisa.h
install -d $(DESTDIR)$(INCLUDE_DIR)/linux
install -m 644 zaptel.h torisa.h $(DESTDIR)$(INCLUDE_DIR)/linux/
+install-tonezone: $(LIBTONEZONE_SO)
+ install -D -m 755 $(LIBTONEZONE_SO) $(DESTDIR)/usr/lib/$(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER)
+ rm -f $(DESTDIR)/usr/lib/$(LIBTONEZONE_SO)
+ ln -sf $(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER) \
+ $(DESTDIR)/usr/lib/$(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER)
+ ln -sf $(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER) \
+ $(DESTDIR)/usr/lib/$(LIBTONEZONE_SO)
+ install -D -m 644 zaptel.h $(DESTDIR)/usr/include/linux/zaptel.h
+ install -D -m 644 tonezone.h $(DESTDIR)/usr/include/tonezone.h
+
install-udev: devices
# FIRMWARE_DIR also implies HOTPLUG_FIRMWARE, unless set manually.