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
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 ARCH
="$(LINUX_KARCH)" \
106 CC
="$(TARGET_CC) $(TARGET_CFLAGS)" \
107 LD
="$(TARGET_CROSS)ld" \
108 CROSS_COMPILE
="$(TARGET_CROSS)" \
109 KVERS
="$(LINUX_VERSION)" \
110 KSRC
="$(LINUX_DIR)" \
111 TOPDIR_MODULES
="zaptel ztdummy wcusb wctdm" \
114 define Build
/Compile
/kmod
115 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
120 define Build
/Compile
/user
121 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
122 ARCH
="$(LINUX_KARCH)" \
123 DESTDIR
="$(PKG_INSTALL_DIR)" \
124 install-libs install-include zttest
128 $(call Build
/Compile
/kmod
)
129 $(call Build
/Compile
/user
)
132 define Build
/InstallDev
133 $(INSTALL_DIR
) $(STAGING_DIR
)/usr
/include
134 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/zaptel
$(STAGING_DIR
)/usr
/include/
135 $(INSTALL_DIR
) $(STAGING_DIR
)/usr
/lib
136 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libtonezone.
* $(STAGING_DIR
)/usr
/lib
/
139 define Package
/zaptel14-util
/install
140 $(INSTALL_DIR
) $(1)/usr
/bin
141 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/zttest
$(1)/usr
/bin
/
144 define Package
/zaptel14-libtonezone
/install
145 $(INSTALL_DIR
) $(1)/usr
/lib
146 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libtonezone.so.
* $(1)/usr
/lib
/
149 $(eval
$(call KernelPackage
,zaptel14
))
150 $(eval
$(call KernelPackage
,zaptel14-dummy
))
151 $(eval
$(call KernelPackage
,zaptel14-wcusb
))
152 $(eval
$(call KernelPackage
,zaptel14-wctdm
))
153 $(eval
$(call BuildPackage
,zaptel14-util
))
154 $(eval
$(call BuildPackage
,zaptel14-libtonezone
))