2 # Copyright (C) 2008-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
14 MAINTAINER:=Hans Zandbelt <hans.zandbelt@gmail.com>
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=http://downloads.digium.com/pub/asterisk/releases/
18 PKG_MD5SUM:=f068ef2433eebdc7f6dd635986f36d77
20 include $(INCLUDE_DIR)/package.mk
22 define Package/asterisk16/Default
23 SUBMENU:=asterisk16 (Complete Open Source PBX), v1.6.x
26 URL:=http://www.asterisk.org/
29 define Package/asterisk16/Default/description
30 Asterisk is a complete PBX in software. It provides all of the features
31 you would expect from a PBX and more. Asterisk does voice over IP in three
32 protocols, and can interoperate with almost all standards-based telephony
33 equipment using relatively inexpensive hardware.
37 define Package/asterisk16
38 $(call Package/asterisk16/Default)
39 TITLE:=Complete open source PBX
40 DEPENDS:= +libopenssl +libncurses +libpopt +libpthread +zlib @!TARGET_avr32 @!PACKAGE_asterisk14
43 define Package/asterisk16/description
44 $(call Package/asterisk16/Default/description)
47 define Package/asterisk16-sounds
48 $(call Package/asterisk16/Default)
53 define Package/asterisk16-sounds/description
54 $(call Package/asterisk16/Default/description)
55 This package contains sound files for Asterisk.
59 define Package/asterisk16-voicemail
60 $(call Package/asterisk16/Default)
61 TITLE:=Voicemail support
65 define Package/asterisk16-voicemail/description
66 $(call Package/asterisk16/Default/description)
67 This package contains voicemail related modules for Asterisk.
70 define Package/asterisk16-app-meetme
71 $(call Package/asterisk16/Default)
72 TITLE:=conferencing support
73 DEPENDS:= +asterisk16 +dahdi-tools-libtonezone +kmod-dahdi-linux
76 define Package/asterisk16-app-meetme/description
77 $(call Package/asterisk16/Default/description)
78 This package provides the MeetMe application driver Conferencing support to
82 define Package/asterisk16-chan-iax2
83 $(call Package/asterisk16/Default)
88 define Package/asterisk16-chan-iax2/description
89 $(call Package/asterisk16/Default/description)
90 This package provides IAX support to
94 define Package/asterisk16-chan-local
95 $(call Package/asterisk16/Default)
96 TITLE:=chan_local support
100 define Package/asterisk16-chan-local/description
101 $(call Package/asterisk16/Default/description)
102 This package provides chan_local support to
106 define Package/asterisk16-cdr
107 $(call Package/asterisk16/Default)
109 DEPENDS:= +asterisk16
112 define Package/asterisk16-cdr/description
113 $(call Package/asterisk16/Default/description)
114 This package provides Call Detail Record support to
118 define Package/asterisk16-res-musiconhold
119 $(call Package/asterisk16/Default)
121 DEPENDS:= +asterisk16
124 define Package/asterisk16-res-musiconhold/description
125 $(call Package/asterisk16/Default/description)
126 This package provides Music On Hold support to
130 define Package/asterisk16-format-g729
131 $(call Package/asterisk16/Default)
133 DEPENDS:= +asterisk16
136 define Package/asterisk16-format-g729/description
137 $(call Package/asterisk16/Default/description)
138 This package provides G.729 support to
142 define Package/asterisk16-chan-gtalk
143 $(call Package/asterisk16/Default)
145 DEPENDS:= +asterisk16 +libiksemel
148 define Package/asterisk16-chan-gtalk/description
149 $(call Package/asterisk16/Default/description)
150 This package provides the channel chan_gtalk and res_jabber for GTalk
154 define Package/asterisk16-app-system
155 $(call Package/asterisk16/Default)
156 TITLE:=System exec support
157 DEPENDS:= +asterisk16
160 define Package/asterisk16-app-system/description
161 $(call Package/asterisk16/Default/description)
162 This package provides support for executing system commands in Asterisk.
168 --with-gsm=internal \
175 --with-ncurses="$(STAGING_DIR)/usr" \
181 --with-popt="$(STAGING_DIR)/usr" \
193 --with-z="$(STAGING_DIR)/usr" \
196 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk16-app-meetme),)
198 --with-dahdi="$(STAGING_DIR)/usr"
204 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk16-chan-gtalk),)
206 --with-gnutls="$(STAGING_DIR)/usr" \
207 --with-iksemel="$(STAGING_DIR)/usr"
209 ac_cv_lib_iksemel_iks_start_sasl=yes \
210 ac_cv_lib_gnutls_gnutls_bye=yes
217 EXTRA_CFLAGS:= $(TARGET_CPPFLAGS)
218 EXTRA_LDFLAGS:= $(TARGET_LDFLAGS)
220 define Build/Configure
221 -rm $(PKG_BUILD_DIR)/menuselect.makeopts
222 $(call Build/Configure/Default,,$(SITE_VARS))
226 $(MAKE) -C "$(PKG_BUILD_DIR)" \
227 include/asterisk/version.h \
228 include/asterisk/buildopts.h defaults.h \
230 ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY $(TARGET_CFLAGS)" \
231 ASTLDFLAGS="$(EXTRA_LDFLAGS)" \
232 $(MAKE) -C "$(PKG_BUILD_DIR)" \
233 ASTVARLIBDIR="/usr/lib/asterisk" \
237 DESTDIR="$(PKG_INSTALL_DIR)" \
239 $(SED) 's|/var/lib/asterisk|/usr/lib/asterisk|g' $(PKG_INSTALL_DIR)/etc/asterisk/musiconhold.conf
242 #define Build/InstallDev
243 # $(INSTALL_DIR) $(1)/usr/include/asterisk/
244 # $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk/*.h $(1)/usr/include/asterisk/
245 # $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk.h $(1)/usr/include/
248 define Package/asterisk16/conffiles
249 /etc/asterisk/asterisk.conf
250 /etc/asterisk/modules.conf
251 /etc/asterisk/extensions.conf
252 /etc/asterisk/sip.conf
253 /etc/asterisk/sip_notify.conf
254 /etc/asterisk/features.conf
255 /etc/asterisk/indications.conf
256 /etc/asterisk/logger.conf
257 /etc/asterisk/manager.conf
258 /etc/asterisk/rtp.conf
259 /etc/default/asterisk
263 define Package/asterisk16/install
264 $(INSTALL_DIR) $(1)/etc/asterisk
265 for f in asterisk extensions features \
266 indications logger manager modules \
267 sip sip_notify rtp; do \
268 $(CP) $(PKG_INSTALL_DIR)/etc/asterisk/$$$$f.conf $(1)/etc/asterisk/ ; \
270 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
271 for f in app_dial app_echo app_playback app_macro \
273 codec_ulaw codec_gsm \
274 format_gsm format_pcm format_wav format_wav_gsm \
276 func_strings func_timeout func_callerid; do \
277 $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/$$$$f.so $(1)/usr/lib/asterisk/modules/ ; \
279 $(INSTALL_DIR) $(1)/usr/sbin
280 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/asterisk $(1)/usr/sbin/
281 $(INSTALL_DIR) $(1)/etc/default
282 $(INSTALL_DATA) ./files/asterisk.default $(1)/etc/default/asterisk
283 $(INSTALL_DIR) $(1)/etc/init.d
284 $(INSTALL_BIN) ./files/asterisk.init $(1)/etc/init.d/asterisk
287 define Package/asterisk16-sounds/install
288 $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds/
289 $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/en/* $(1)/usr/lib/asterisk/sounds/
290 rm -f $(1)/usr/lib/asterisk/sounds/vm-*
291 rm -f $(1)/usr/lib/asterisk/sounds/conf-*
295 define Package/asterisk16-voicemail/conffiles
296 /etc/asterisk/voicemail.conf
299 define Package/asterisk16-voicemail/install
300 $(INSTALL_DIR) $(1)/etc/asterisk
301 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/voicemail.conf $(1)/etc/asterisk/
302 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
303 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/*voicemail.so $(1)/usr/lib/asterisk/modules/
304 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_adsi.so $(1)/usr/lib/asterisk/modules/
305 $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds/
306 $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/en/vm-*.gsm $(1)/usr/lib/asterisk/sounds/
309 define Package/asterisk16-app-meetme/conffiles
310 /etc/asterisk/meetme.conf
313 define Package/asterisk16-app-meetme/install
314 $(INSTALL_DIR) $(1)/etc/asterisk
315 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/meetme.conf $(1)/etc/asterisk/
316 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
317 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/app_meetme.so $(1)/usr/lib/asterisk/modules/
318 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_dahdi.so $(1)/usr/lib/asterisk/modules/
319 $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds/
320 $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/en/conf-*.gsm $(1)/usr/lib/asterisk/sounds/
323 define Package/asterisk16-chan-iax2/conffiles
324 /etc/asterisk/iax.conf
325 /etc/asterisk/iaxprov.conf
328 define Package/asterisk16-cdr/conffiles
329 /etc/asterisk/cdr.conf
330 /etc/asterisk/cdr_custom.conf
331 /etc/asterisk/cdr_manager.conf
332 /etc/asterisk/cdr_odbc.conf
333 /etc/asterisk/cdr_pgsql.conf
334 /etc/asterisk/cdr_tds.conf
337 define Package/asterisk16-res-musiconhold/conffiles
338 /etc/asterisk/musiconhold.conf
341 define Package/asterisk16-chan-iax2/install
342 $(INSTALL_DIR) $(1)/etc/asterisk
343 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/iax.conf $(1)/etc/asterisk/
344 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/iaxprov.conf $(1)/etc/asterisk/
345 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
346 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_iax2.so $(1)/usr/lib/asterisk/modules/
349 define Package/asterisk16-chan-local/install
350 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
351 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_local.so $(1)/usr/lib/asterisk/modules/
354 define Package/asterisk16-cdr/install
355 $(INSTALL_DIR) $(1)/etc/asterisk
356 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/cdr*.conf $(1)/etc/asterisk/
357 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
358 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/*cdr*.so $(1)/usr/lib/asterisk/modules/
361 define Package/asterisk16-res-musiconhold/install
362 $(INSTALL_DIR) $(1)/etc/asterisk
363 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/musiconhold.conf $(1)/etc/asterisk/
364 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
365 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_musiconhold.so $(1)/usr/lib/asterisk/modules/
368 define Package/asterisk16-format-g729/install
369 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
370 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/format_g729.so $(1)/usr/lib/asterisk/modules/
373 define Package/asterisk16-chan-gtalk/conffiles
374 /etc/asterisk/gtalk.conf
375 /etc/asterisk/jabber.conf
378 define Package/asterisk16-chan-gtalk/install
379 $(INSTALL_DIR) $(1)/etc/asterisk
380 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/gtalk.conf $(1)/etc/asterisk/
381 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/jabber.conf $(1)/etc/asterisk/
382 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
383 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_gtalk.so $(1)/usr/lib/asterisk/modules/
384 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_jabber.so $(1)/usr/lib/asterisk/modules/
387 define Package/asterisk16-app-system/install
388 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
389 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/app_system.so $(1)/usr/lib/asterisk/modules/
392 $(eval $(call BuildPackage,asterisk16))
393 $(eval $(call BuildPackage,asterisk16-voicemail))
394 $(eval $(call BuildPackage,asterisk16-sounds))
395 #$(eval $(call BuildPackage,asterisk16-app-meetme))
396 $(eval $(call BuildPackage,asterisk16-chan-iax2))
397 $(eval $(call BuildPackage,asterisk16-chan-local))
398 $(eval $(call BuildPackage,asterisk16-cdr))
399 $(eval $(call BuildPackage,asterisk16-res-musiconhold))
400 $(eval $(call BuildPackage,asterisk16-format-g729))
401 $(eval $(call BuildPackage,asterisk16-chan-gtalk))
402 $(eval $(call BuildPackage,asterisk16-app-system))