source: packages/libs/zaptel-1.4.x/Makefile @ 21902

Last change on this file since 21902 was 21902, checked in by juhosg, 6 years ago

packages/zaptel-1.4.x: remove KCONFIG options

The package builds fine without the tracing stuff.

File size: 3.5 KB
Line 
1#
2# Copyright (C) 2006-2009 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9include $(INCLUDE_DIR)/kernel.mk
10
11PKG_NAME:=zaptel
12PKG_VERSION:=1.4.12.1
13PKG_RELEASE:=4
14
15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16PKG_SOURCE_URL:=http://downloads.asterisk.org/pub/telephony/zaptel/releases/ \
17        http://ftp.digium.com/pub/zaptel/releases/
18PKG_MD5SUM:=71e83a020b020fa60905edecf70e95a3
19
20include $(INCLUDE_DIR)/package.mk
21
22define Package/zaptel14/Default
23  TITLE:=Zaptel
24  URL:=http://ftp.digium.com/pub/zaptel/releases
25endef
26
27define KernelPackage/zaptel14/Default
28  TITLE:=Zaptel (kernel module)
29  SUBMENU:=Other modules
30endef
31
32define KernelPackage/zaptel14
33  $(call KernelPackage/zaptel14/Default)
34  FILES:=$(PKG_BUILD_DIR)/kernel/zaptel.$(LINUX_KMOD_SUFFIX) \
35        $(PKG_BUILD_DIR)/kernel/ztdummy.$(LINUX_KMOD_SUFFIX)
36  AUTOLOAD:=$(call AutoLoad,70,zaptel ztdummy)
37endef
38
39define KernelPackage/zaptel14/description
40 This package contains the Zaptel core module and ztdummy driver.
41endef
42
43define KernelPackage/zaptel14-wcusb
44  $(call KernelPackage/zaptel14/Default)
45  DEPENDS += +kmod-zaptel14
46  FILES:=$(PKG_BUILD_DIR)/kernel/wcusb.$(LINUX_KMOD_SUFFIX)
47  AUTOLOAD:=$(call AutoLoad,71,wcusb)
48endef
49
50define KernelPackage/zaptel14-wcusb/description
51 This package contains the Zaptel S100U usb driver.
52endef
53
54define KernelPackage/zaptel14-wctdm
55  $(call KernelPackage/zaptel14/Default)
56  DEPENDS += +kmod-zaptel14
57  FILES:=$(PKG_BUILD_DIR)/kernel/wctdm.$(LINUX_KMOD_SUFFIX)
58  AUTOLOAD:=$(call AutoLoad,71,wctdm)
59endef
60
61define KernelPackage/zaptel14-wctdm/description
62 This package contains the Zaptel wctdm driver.
63endef
64
65define Package/zaptel14-util
66  $(call Package/zaptel14/Default)
67  SECTION:=utils
68  CATEGORY:=Utilities
69  TITLE+= utils
70  DEPENDS += +kmod-zaptel14
71endef
72
73define Package/zaptel14-util/description
74 This package contains the zaptel utils.
75endef
76
77define Package/zaptel14-libtonezone
78  $(call Package/zaptel14/Default)
79  SECTION:=libs
80  CATEGORY:=Libraries
81  TITLE+= libtonezone (library)
82  DEPENDS += +kmod-zaptel14
83endef
84
85define Package/zaptel14-libtonezone/description
86 This package contains the libraries for accessing zaptel/dummy drivers.
87endef
88
89MAKE_FLAGS:= \
90        ARCH="$(LINUX_KARCH)" \
91        CC="$(TARGET_CC) $(TARGET_CFLAGS)" \
92        LD="$(TARGET_CROSS)ld" \
93        CROSS_COMPILE="$(TARGET_CROSS)" \
94        KVERS="$(LINUX_VERSION)" \
95        KSRC="$(LINUX_DIR)" \
96        TOPDIR_MODULES="zaptel ztdummy wcusb wctdm" \
97        SUBDIR_MODULES=""
98
99define Build/Compile/kmod
100        $(MAKE) -C $(PKG_BUILD_DIR) \
101                $(MAKE_FLAGS) \
102                modules
103endef
104
105define Build/Compile/user
106        $(MAKE) -C $(PKG_BUILD_DIR) \
107                ARCH="$(LINUX_KARCH)" \
108                DESTDIR="$(PKG_INSTALL_DIR)" \
109                install-libs install-include zttest
110endef
111
112define Build/Compile
113        $(call Build/Compile/kmod)
114        $(call Build/Compile/user)
115endef
116
117define Build/InstallDev
118        $(INSTALL_DIR)  $(STAGING_DIR)/usr/include
119        $(CP) $(PKG_INSTALL_DIR)/usr/include/zaptel $(STAGING_DIR)/usr/include/
120        $(INSTALL_DIR)  $(STAGING_DIR)/usr/lib
121        $(CP)  $(PKG_INSTALL_DIR)/usr/lib/libtonezone.* $(STAGING_DIR)/usr/lib/
122endef
123
124define Package/zaptel14-util/install
125        $(INSTALL_DIR) $(1)/usr/bin
126        $(INSTALL_BIN) $(PKG_BUILD_DIR)/zttest $(1)/usr/bin/
127endef
128
129define Package/zaptel14-libtonezone/install
130        $(INSTALL_DIR) $(1)/usr/lib
131        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtonezone.so.* $(1)/usr/lib/
132endef
133
134$(eval $(call KernelPackage,zaptel14))
135$(eval $(call KernelPackage,zaptel14-wcusb))
136$(eval $(call KernelPackage,zaptel14-wctdm))
137$(eval $(call BuildPackage,zaptel14-util))
138$(eval $(call BuildPackage,zaptel14-libtonezone))
Note: See TracBrowser for help on using the repository browser.