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

Last change on this file since 21774 was 21774, checked in by claudio, 6 years ago

[packages] zaptel: update and fix kernel module build for 2.6.34

File size: 2.8 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:=1
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
28  $(call Package/zaptel14/Default)
29  SUBMENU:=Other modules
30  TITLE+= (kernel module)
31  KCONFIG:=CONFIG_FTRACE=y \
32                        CONFIG_TRACING \
33                        CONFIG_KMEMTRACE
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 Package/zaptel14-util
44  $(call Package/zaptel14/Default)
45  SECTION:=utils
46  CATEGORY:=Utilities
47  TITLE+= utils
48  DEPENDS += +kmod-zaptel14
49endef
50
51define Package/zaptel14-util/description
52 This package contains the zttest program
53endef
54
55define Package/zaptel14-libtonezone
56  $(call Package/zaptel14/Default)
57  SECTION:=libs
58  CATEGORY:=Libraries
59  TITLE+= libtonezone (library)
60  DEPENDS += +kmod-zaptel14
61endef
62
63define Package/zaptel14-libtonezone/description
64 This package contains the libraries for accessing zaptel/dummy drivers.
65endef
66
67MAKE_FLAGS:= \
68        ARCH="$(LINUX_KARCH)" \
69        CC="$(TARGET_CC) $(TARGET_CFLAGS)" \
70        LD="$(TARGET_CROSS)ld" \
71        CROSS_COMPILE="$(TARGET_CROSS)" \
72        KVERS="$(LINUX_VERSION)" \
73        KSRC="$(LINUX_DIR)" \
74        TOPDIR_MODULES="zaptel ztdummy" \
75        SUBDIR_MODULES=""
76
77define Build/Compile/kmod
78        $(MAKE) -C $(PKG_BUILD_DIR) \
79                $(MAKE_FLAGS) \
80                modules
81endef
82
83define Build/Compile/user
84        $(MAKE) -C $(PKG_BUILD_DIR) \
85                ARCH="$(LINUX_KARCH)" \
86                DESTDIR="$(PKG_INSTALL_DIR)" \
87                install-libs install-include zttest
88endef
89
90define Build/Compile
91        $(call Build/Compile/kmod)
92        $(call Build/Compile/user)
93endef
94
95define Build/InstallDev
96        $(INSTALL_DIR)  $(STAGING_DIR)/usr/include
97        $(CP) $(PKG_INSTALL_DIR)/usr/include/zaptel $(STAGING_DIR)/usr/include/
98        $(INSTALL_DIR)  $(STAGING_DIR)/usr/lib
99        $(CP)  $(PKG_INSTALL_DIR)/usr/lib/libtonezone.* $(STAGING_DIR)/usr/lib/
100endef
101
102define Package/zaptel14-util/install
103        $(INSTALL_DIR) $(1)/usr/bin
104        $(INSTALL_BIN) $(PKG_BUILD_DIR)/zttest $(1)/usr/bin/
105endef
106
107define Package/zaptel14-libtonezone/install
108        $(INSTALL_DIR) $(1)/usr/lib
109        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtonezone.so.* $(1)/usr/lib/
110endef
111
112$(eval $(call KernelPackage,zaptel14))
113$(eval $(call BuildPackage,zaptel14-util))
114$(eval $(call BuildPackage,zaptel14-libtonezone))
Note: See TracBrowser for help on using the repository browser.