2 # Copyright (C) 2006-2009 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
9 include $(INCLUDE_DIR
)/kernel.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=http
://downloads.asterisk.org
/pub
/telephony
/zaptel
/releases
/ \
17 http
://ftp.digium.com
/pub
/zaptel
/releases
/
18 PKG_MD5SUM
:=71e83a020b020fa60905edecf70e95a3
20 include $(INCLUDE_DIR
)/package.mk
22 define Package
/zaptel14
/Default
24 URL
:=http
://ftp.digium.com
/pub
/zaptel
/releases
27 define KernelPackage
/zaptel14
/Default
28 TITLE
:=Zaptel
(kernel module
)
29 SUBMENU
:=Other modules
32 define KernelPackage
/zaptel14
33 $(call KernelPackage
/zaptel14
/Default
)
34 TITLE
:=Zaptel
(kernel module
)
35 FILES
:=$(PKG_BUILD_DIR
)/kernel
/zaptel.
$(LINUX_KMOD_SUFFIX
)
36 AUTOLOAD
:=$(call AutoLoad
,70,zaptel
)
39 define KernelPackage
/zaptel14
/description
40 This package contains the Zaptel core module. No longer includes ztdummy
41 because it is not needed in
all cases
(and is in fact broken on x86
).
45 define KernelPackage
/zaptel14-dummy
46 $(call KernelPackage
/zaptel14
/Default
)
47 TITLE
:=Zaptel Dummy
(timer
; kernel module
)
48 DEPENDS
+= +kmod-zaptel14 @TARGET_x86
:@BROKEN
49 FILES
:=$(PKG_BUILD_DIR
)/kernel
/ztdummy.
$(LINUX_KMOD_SUFFIX
)
50 AUTOLOAD
:=$(call AutoLoad
,71,ztdummy
)
53 define KernelPackage
/zaptel14
/description
54 This package contains the Zaptel ztdummy driver. Broken on x86 due to lack
55 of RTC on some hardware.
58 define KernelPackage
/zaptel14-wcusb
59 $(call KernelPackage
/zaptel14
/Default
)
60 DEPENDS
+= +kmod-zaptel14
61 FILES
:=$(PKG_BUILD_DIR
)/kernel
/wcusb.
$(LINUX_KMOD_SUFFIX
)
62 AUTOLOAD
:=$(call AutoLoad
,72,wcusb
)
65 define KernelPackage
/zaptel14-wcusb
/description
66 This package contains the Zaptel S100U usb driver.
69 define KernelPackage
/zaptel14-wctdm
70 $(call KernelPackage
/zaptel14
/Default
)
71 DEPENDS
+= +kmod-zaptel14
72 FILES
:=$(PKG_BUILD_DIR
)/kernel
/wctdm.
$(LINUX_KMOD_SUFFIX
)
73 AUTOLOAD
:=$(call AutoLoad
,72,wctdm
)
76 define KernelPackage
/zaptel14-wctdm
/description
77 This package contains the Zaptel wctdm driver.
80 define Package
/zaptel14-util
81 $(call Package
/zaptel14
/Default
)
85 DEPENDS
+= +kmod-zaptel14
+zaptel14-libtonezone
+libnewt
88 define Package
/zaptel14-util
/description
89 This package contains the zaptel utils.
92 define Package
/zaptel14-libtonezone
93 $(call Package
/zaptel14
/Default
)
96 TITLE
+= libtonezone
(library
)
97 DEPENDS
+= +kmod-zaptel14
100 define Package
/zaptel14-libtonezone
/description
101 This package contains the libraries for accessing zaptel
/dummy drivers.
105 LDFLAGS
="$$$$LDFLAGS -Wl,-rpath-link $(STAGING_DIR)/usr/lib"
108 --with-newt
="$(STAGING_DIR)/usr" \
113 ARCH
="$(LINUX_KARCH)" \
114 CC
="$(TARGET_CC) $(TARGET_CFLAGS)" \
115 LD
="$(TARGET_CROSS)ld" \
116 CROSS_COMPILE
="$(TARGET_CROSS)" \
117 KVERS
="$(LINUX_VERSION)" \
118 KSRC
="$(LINUX_DIR)" \
119 TOPDIR_MODULES
="zaptel ztdummy wcusb wctdm" \
122 define Build
/Compile
/kmod
123 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
128 define Build
/Compile
/user
129 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
130 ARCH
="$(LINUX_KARCH)" \
131 DESTDIR
="$(PKG_INSTALL_DIR)" \
132 install-libs install-include zttest ztcfg zttool ztdiag fxotune ztmonitor ztscan ztspeed fxstest
136 $(call Build
/Compile
/kmod
)
137 $(call Build
/Compile
/user
)
140 define Build
/InstallDev
141 $(INSTALL_DIR
) $(STAGING_DIR
)/usr
/include
142 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/zaptel
$(STAGING_DIR
)/usr
/include/
143 $(INSTALL_DIR
) $(STAGING_DIR
)/usr
/lib
144 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libtonezone.
* $(STAGING_DIR
)/usr
/lib
/
147 define Package
/zaptel14-util
/install
148 $(INSTALL_DIR
) $(1)/usr
/bin
149 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/zttest
$(1)/usr
/bin
/
150 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ztcfg
$(1)/usr
/bin
/
151 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/zttool
$(1)/usr
/bin
/
152 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ztdiag
$(1)/usr
/bin
/
153 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/fxotune
$(1)/usr
/bin
/
154 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/fxstest
$(1)/usr
/bin
/
155 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ztmonitor
$(1)/usr
/bin
/
156 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ztscan
$(1)/usr
/bin
/
157 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ztspeed
$(1)/usr
/bin
/
160 define Package
/zaptel14-libtonezone
/install
161 $(INSTALL_DIR
) $(1)/usr
/lib
162 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libtonezone.so.
* $(1)/usr
/lib
/
165 $(eval
$(call KernelPackage
,zaptel14
))
166 $(eval
$(call KernelPackage
,zaptel14-dummy
))
167 $(eval
$(call KernelPackage
,zaptel14-wcusb
))
168 $(eval
$(call KernelPackage
,zaptel14-wctdm
))
169 $(eval
$(call BuildPackage
,zaptel14-util
))
170 $(eval
$(call BuildPackage
,zaptel14-libtonezone
))