source: packages/net/asterisk-addons-1.4.x/Makefile @ 20620

Last change on this file since 20620 was 20620, checked in by zandbelt, 7 years ago

add maintainer ref to asteris14 and asteris14-addons upon request

  • Property svn:copyright set to Copyright (C) 2007 OpenWrt.org
File size: 5.1 KB
Line 
1#
2# Copyright (C) 2007 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
9
10PKG_NAME:=asterisk-addons
11PKG_VERSION:=1.4.8
12PKG_RELEASE:=1
13
14MAINTAINER:=Hans Zandbelt <hans.zandbelt@gmail.com>
15
16PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17PKG_SOURCE_URL:=http://downloads.digium.com/pub/asterisk/releases/
18PKG_MD5SUM:=d4e75c39f737b5ba2a75a4420e1a5a78
19
20PKG_FIXUP = libtool
21
22include $(INCLUDE_DIR)/package.mk
23
24define Package/asterisk-addons/Default
25  SUBMENU:=asterisk14 (Complete Open Source PBX), v1.4.x
26  SECTION:=net
27  CATEGORY:=Network
28  TITLE:=Asterisk addons
29  URL:=http://www.asterisk.org/
30endef
31
32define Package/asterisk-addons/Default/description
33 Asterisk addons contains additional modules for Asterisk which are, for
34 one reason or another, not included in the normal base distribution.
35endef
36
37
38define Package/asterisk14-chan-mobile
39$(call Package/asterisk-addons/Default)
40  DEPENDS:= +asterisk14 +bluez-libs
41  TITLE+= Mobile channel support
42endef
43
44define Package/asterisk14-chan-mobile/description
45$(call Package/asterisk-addons/Default/description)
46 This package contains the chan_mobile module for Asterisk.
47endef
48
49
50define Package/asterisk14-chan-ooh323
51$(call Package/asterisk-addons/Default)
52  DEPENDS:= +asterisk14
53  TITLE+= OO H.323 channel support
54endef
55
56define Package/asterisk14-chan-ooh323/description
57$(call Package/asterisk-addons/Default/description)
58 This package contains the Objective Open H.323 support module for Asterisk.
59endef
60
61
62define Package/asterisk14-format-mp3
63$(call Package/asterisk-addons/Default)
64  DEPENDS:= +asterisk14
65  TITLE+= MP3 format support
66endef
67
68define Package/asterisk14-format-mp3/description
69$(call Package/asterisk-addons/Default/description)
70 This package contains the MP3 support module for Asterisk.
71endef
72
73
74define Package/asterisk14-mysql
75$(call Package/asterisk-addons/Default)
76  DEPENDS:= +asterisk14 +libmysqlclient
77  TITLE+= MySQL support
78endef
79
80define Package/asterisk14-mysql/description
81$(call Package/asterisk-addons/Default/description)
82 This package contains MySQL support modules for Asterisk.
83endef
84
85
86EXTRA_CFLAGS:=$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)
87EXTRA_LDFLAGS:=$(TARGET_LDFLAGS)
88
89ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk14-mysql),)
90  EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/include/mysql
91  EXTRA_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql
92endif
93
94CONFIGURE_ARGS += \
95        --with-asterisk="$(STAGING_DIR)/usr" \
96        --with-bluetooth="$(STAGING_DIR)/usr" \
97        --with-ncurses="$(STAGING_DIR)/usr" \
98        --with-mysqlclient="$(STAGING_DIR)/usr" \
99
100CONFIGURE_VARS += \
101        ac_cv_file__usr_include_asterisk_channel_h="yes" \
102
103define Build/Configure
104        ( cd $(PKG_BUILD_DIR); ./bootstrap.sh )
105        $(call Build/Configure/Default,,,)
106        $(call Build/Configure/Default,,,asterisk-ooh323c)
107endef
108
109# XXX: explanations
110# - use AM_CFLAGS for asterisk-ooh323c
111# - use OPTIMIZE & OPTIONS for format_mp3
112
113MAKE_ARGS:= \
114        AM_CFLAGS="$(TARGET_CFLAGS)" \
115        OPTIMIZE="$(TARGET_CFLAGS) -DLOW_MEMORY" \
116        OPTIONS="" \
117        NOISY_BUILD="yes" \
118        BLUETOOTH_LIB="$(TARGET_LDFLAGS) -lbluetooth" \
119
120MAKE_VARS:= \
121        CFLAGS="$(EXTRA_CFLAGS)" \
122        LDFLAGS="$(EXTRA_LDFLAGS)" \
123
124define Build/Compile
125        mkdir -p $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules
126        $(MAKE_VARS) \
127        $(MAKE) -C "$(PKG_BUILD_DIR)" \
128                $(MAKE_ARGS) \
129                all
130        $(MAKE_VARS) \
131        $(MAKE) -C "$(PKG_BUILD_DIR)" \
132                $(MAKE_ARGS) \
133                DESTDIR="$(PKG_INSTALL_DIR)" \
134                install samples
135endef
136
137
138define Package/asterisk14-chan-mobile/conffiles
139/etc/asterisk/mobile.conf
140endef
141
142define Package/asterisk14-chan-mobile/install
143        $(INSTALL_DIR) $(1)/etc/asterisk
144        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/mobile.conf $(1)/etc/asterisk/
145        $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
146        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_mobile.so $(1)/usr/lib/asterisk/modules/
147endef
148
149
150define Package/asterisk14-chan-ooh323/install
151        $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
152        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_ooh323.so $(1)/usr/lib/asterisk/modules/
153endef
154
155
156define Package/asterisk14-format-mp3/install
157        $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
158        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/format_mp3.so $(1)/usr/lib/asterisk/modules/
159endef
160
161
162define Package/asterisk14-mysql/conffiles
163/etc/asterisk/cdr_mysql.conf
164/etc/asterisk/res_mysql.conf
165endef
166
167define Package/asterisk14-mysql/install
168        $(INSTALL_DIR) $(1)/etc/asterisk
169        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/cdr_mysql.conf $(1)/etc/asterisk/
170        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/res_mysql.conf $(1)/etc/asterisk/
171        $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
172        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/app_addon_sql_mysql.so $(1)/usr/lib/asterisk/modules/
173        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/cdr_addon_mysql.so $(1)/usr/lib/asterisk/modules/
174        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_config_mysql.so $(1)/usr/lib/asterisk/modules/
175endef
176
177
178$(eval $(call BuildPackage,asterisk14-chan-mobile))
179$(eval $(call BuildPackage,asterisk14-chan-ooh323))
180$(eval $(call BuildPackage,asterisk14-format-mp3))
181$(eval $(call BuildPackage,asterisk14-mysql))
Note: See TracBrowser for help on using the repository browser.