2 # Copyright (C) 2008-2010 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 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=http
://downloads.digium.com
/pub
/asterisk
/releases
/
16 PKG_MD5SUM
:=1f947d951c419b8039d53a6e6168fd69
18 include $(INCLUDE_DIR
)/package.mk
20 define Package
/asterisk16
/Default
21 SUBMENU
:=asterisk16
(Complete Open Source PBX
), v1.6.x
24 URL
:=http
://www.asterisk.org
/
25 MAINTAINER
:=Hans Zandbelt
<hans.zandbelt@gmail.com
>
28 define Package
/asterisk16
/Default
/description
29 Asterisk is a complete PBX in software. It provides
all of the features
30 you would expect from a PBX and more. Asterisk does voice over IP in three
31 protocols
, and can interoperate with almost
all standards-based telephony
32 equipment using relatively inexpensive hardware.
36 define Package
/asterisk16
37 $(call Package
/asterisk16
/Default
)
38 TITLE
:=Complete open source PBX
39 DEPENDS
:= +libopenssl
+libncurses
+libpopt
+libpthread
+zlib @
!TARGET_avr32 @
!PACKAGE_asterisk14
42 define Package
/asterisk16
/description
43 $(call Package
/asterisk16
/Default
/description
)
46 define Package
/asterisk16-sounds
47 $(call Package
/asterisk16
/Default
)
52 define Package
/asterisk16-sounds
/description
53 $(call Package
/asterisk16
/Default
/description
)
54 This package contains sound files for Asterisk.
58 define Package
/asterisk16-voicemail
59 $(call Package
/asterisk16
/Default
)
60 TITLE
:=Voicemail support
64 define Package
/asterisk16-voicemail
/description
65 $(call Package
/asterisk16
/Default
/description
)
66 This package contains voicemail related modules for Asterisk.
69 define Package
/asterisk16-app-meetme
70 $(call Package
/asterisk16
/Default
)
71 TITLE
:=conferencing support
72 DEPENDS
:= +asterisk16
+dahdi-tools-libtonezone
+kmod-dahdi-linux
75 define Package
/asterisk16-app-meetme
/description
76 $(call Package
/asterisk16
/Default
/description
)
77 This package provides the MeetMe application driver Conferencing support to
81 define Package
/asterisk16-chan-iax2
82 $(call Package
/asterisk16
/Default
)
87 define Package
/asterisk16-chan-iax2
/description
88 $(call Package
/asterisk16
/Default
/description
)
89 This package provides IAX support to
93 define Package
/asterisk16-cdr
94 $(call Package
/asterisk16
/Default
)
99 define Package
/asterisk16-cdr
/description
100 $(call Package
/asterisk16
/Default
/description
)
101 This package provides Call Detail Record support to
105 define Package
/asterisk16-res-musiconhold
106 $(call Package
/asterisk16
/Default
)
108 DEPENDS
:= +asterisk16
111 define Package
/asterisk16-res-musiconhold
/description
112 $(call Package
/asterisk16
/Default
/description
)
113 This package provides Music On Hold support to
117 define Package
/asterisk16-chan-gtalk
118 $(call Package
/asterisk16
/Default
)
120 DEPENDS
:= +asterisk16
+libiksemel
123 define Package
/asterisk16-chan-gtalk
/description
124 $(call Package
/asterisk16
/Default
/description
)
125 This package provides the channel chan_gtalk and res_jabber for GTalk
129 define Package
/asterisk16-curl
130 $(call Package
/asterisk16
/Default
)
132 DEPENDS
:= +asterisk16
+libcurl
135 define Package
/asterisk16-curl
/description
136 $(call Package
/asterisk16
/Default
/description
)
137 This package provides CURL
144 --with-gsm
=internal \
151 --with-ncurses
="$(STAGING_DIR)/usr" \
157 --with-popt
="$(STAGING_DIR)/usr" \
169 --with-z
="$(STAGING_DIR)/usr" \
172 ifneq ($(SDK
)$(CONFIG_PACKAGE_asterisk16-app-meetme
),)
174 --with-dahdi
="$(STAGING_DIR)/usr"
180 ifneq ($(SDK
)$(CONFIG_PACKAGE_asterisk16-chan-gtalk
),)
182 --with-gnutls
="$(STAGING_DIR)/usr" \
183 --with-iksemel
="$(STAGING_DIR)/usr"
185 ac_cv_lib_iksemel_iks_start_sasl
=yes \
186 ac_cv_lib_gnutls_gnutls_bye
=yes
193 ifneq ($(SDK
)$(CONFIG_PACKAGE_asterisk16-curl
),)
195 --with-curl
="$(STAGING_DIR)/usr"
202 EXTRA_CFLAGS
:= $(TARGET_CPPFLAGS
)
203 EXTRA_LDFLAGS
:= $(TARGET_LDFLAGS
)
205 define Build
/Configure
206 -rm $(PKG_BUILD_DIR
)/menuselect.makeopts
207 $(call Build
/Configure
/Default
,,$(SITE_VARS
))
211 $(MAKE
) -C
"$(PKG_BUILD_DIR)" \
212 include/asterisk
/version.h \
213 include/asterisk
/buildopts.h defaults.h \
215 ASTCFLAGS
="$(EXTRA_CFLAGS) -DLOW_MEMORY $(TARGET_CFLAGS)" \
216 ASTLDFLAGS
="$(EXTRA_LDFLAGS)" \
217 $(MAKE
) -C
"$(PKG_BUILD_DIR)" \
218 ASTVARLIBDIR
="/usr/lib/asterisk" \
222 DESTDIR
="$(PKG_INSTALL_DIR)" \
224 $(SED
) 's|/var/lib/asterisk|/usr/lib/asterisk|g' $(PKG_INSTALL_DIR
)/etc
/asterisk
/musiconhold.conf
227 #define Build/InstallDev
228 # $(INSTALL_DIR) $(1)/usr/include/asterisk/
229 # $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk/*.h $(1)/usr/include/asterisk/
230 # $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk.h $(1)/usr/include/
233 define Package
/asterisk16
/conffiles
234 /etc
/asterisk
/asterisk.conf
235 /etc
/asterisk
/modules.conf
236 /etc
/asterisk
/extensions.conf
237 /etc
/asterisk
/sip.conf
238 /etc
/asterisk
/sip_notify.conf
239 /etc
/asterisk
/features.conf
240 /etc
/asterisk
/indications.conf
241 /etc
/asterisk
/logger.conf
242 /etc
/asterisk
/manager.conf
243 /etc
/asterisk
/rtp.conf
244 /etc
/default
/asterisk
248 define Package
/asterisk16
/install
249 $(INSTALL_DIR
) $(1)/etc
/asterisk
250 for f in asterisk extensions features \
251 indications logger manager modules \
252 sip sip_notify rtp
; do \
253 $(CP
) $(PKG_INSTALL_DIR
)/etc
/asterisk
/$$$$f.conf
$(1)/etc
/asterisk
/ ; \
255 $(INSTALL_DIR
) $(1)/usr
/lib
/asterisk
/modules
256 for f in app_dial app_echo app_playback app_macro \
258 codec_ulaw codec_gsm \
259 format_gsm format_pcm format_wav format_wav_gsm \
261 func_strings func_timeout func_callerid
; do \
262 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/modules
/$$$$f.so
$(1)/usr
/lib
/asterisk
/modules
/ ; \
264 $(INSTALL_DIR
) $(1)/usr
/sbin
265 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/asterisk
$(1)/usr
/sbin
/
266 $(INSTALL_DIR
) $(1)/etc
/default
267 $(INSTALL_DATA
) .
/files
/asterisk.default
$(1)/etc
/default
/asterisk
268 $(INSTALL_DIR
) $(1)/etc
/init.d
269 $(INSTALL_BIN
) .
/files
/asterisk.init
$(1)/etc
/init.d
/asterisk
272 define Package
/asterisk16-sounds
/install
273 $(INSTALL_DIR
) $(1)/usr
/lib
/asterisk
/sounds
/
274 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/sounds
/en
/* $(1)/usr
/lib
/asterisk
/sounds
/
275 rm -f
$(1)/usr
/lib
/asterisk
/sounds
/vm-
*
276 rm -f
$(1)/usr
/lib
/asterisk
/sounds
/conf-
*
280 define Package
/asterisk16-voicemail
/conffiles
281 /etc
/asterisk
/voicemail.conf
284 define Package
/asterisk16-voicemail
/install
285 $(INSTALL_DIR
) $(1)/etc
/asterisk
286 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/etc
/asterisk
/voicemail.conf
$(1)/etc
/asterisk
/
287 $(INSTALL_DIR
) $(1)/usr
/lib
/asterisk
/modules
288 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/modules
/*voicemail.so
$(1)/usr
/lib
/asterisk
/modules
/
289 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/modules
/res_adsi.so
$(1)/usr
/lib
/asterisk
/modules
/
290 $(INSTALL_DIR
) $(1)/usr
/lib
/asterisk
/sounds
/
291 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/sounds
/en
/vm-
*.gsm
$(1)/usr
/lib
/asterisk
/sounds
/
294 define Package
/asterisk16-app-meetme
/conffiles
295 /etc
/asterisk
/meetme.conf
298 define Package
/asterisk16-app-meetme
/install
299 $(INSTALL_DIR
) $(1)/etc
/asterisk
300 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/etc
/asterisk
/meetme.conf
$(1)/etc
/asterisk
/
301 $(INSTALL_DIR
) $(1)/usr
/lib
/asterisk
/modules
302 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/modules
/app_meetme.so
$(1)/usr
/lib
/asterisk
/modules
/
303 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/modules
/chan_dahdi.so
$(1)/usr
/lib
/asterisk
/modules
/
304 $(INSTALL_DIR
) $(1)/usr
/lib
/asterisk
/sounds
/
305 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/sounds
/en
/conf-
*.gsm
$(1)/usr
/lib
/asterisk
/sounds
/
308 define Package
/asterisk16-chan-iax2
/conffiles
309 /etc
/asterisk
/iax.conf
310 /etc
/asterisk
/iaxprov.conf
313 define Package
/asterisk16-cdr
/conffiles
314 /etc
/asterisk
/cdr.conf
315 /etc
/asterisk
/cdr_custom.conf
316 /etc
/asterisk
/cdr_manager.conf
317 /etc
/asterisk
/cdr_odbc.conf
318 /etc
/asterisk
/cdr_pgsql.conf
319 /etc
/asterisk
/cdr_tds.conf
322 define Package
/asterisk16-res-musiconhold
/conffiles
323 /etc
/asterisk
/musiconhold.conf
326 define Package
/asterisk16-chan-iax2
/install
327 $(INSTALL_DIR
) $(1)/etc
/asterisk
328 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/etc
/asterisk
/iax.conf
$(1)/etc
/asterisk
/
329 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/etc
/asterisk
/iaxprov.conf
$(1)/etc
/asterisk
/
330 $(INSTALL_DIR
) $(1)/usr
/lib
/asterisk
/modules
331 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/modules
/chan_iax2.so
$(1)/usr
/lib
/asterisk
/modules
/
334 define Package
/asterisk16-cdr
/install
335 $(INSTALL_DIR
) $(1)/etc
/asterisk
336 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/etc
/asterisk
/cdr
*.conf
$(1)/etc
/asterisk
/
337 $(INSTALL_DIR
) $(1)/usr
/lib
/asterisk
/modules
338 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/modules
/*cdr
*.so
$(1)/usr
/lib
/asterisk
/modules
/
341 define Package
/asterisk16-res-musiconhold
/install
342 $(INSTALL_DIR
) $(1)/etc
/asterisk
343 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/etc
/asterisk
/musiconhold.conf
$(1)/etc
/asterisk
/
344 $(INSTALL_DIR
) $(1)/usr
/lib
/asterisk
/modules
345 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/modules
/res_musiconhold.so
$(1)/usr
/lib
/asterisk
/modules
/
348 define Package
/asterisk16-chan-gtalk
/conffiles
349 /etc
/asterisk
/gtalk.conf
350 /etc
/asterisk
/jabber.conf
353 define Package
/asterisk16-chan-gtalk
/install
354 $(INSTALL_DIR
) $(1)/etc
/asterisk
355 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/etc
/asterisk
/gtalk.conf
$(1)/etc
/asterisk
/
356 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/etc
/asterisk
/jabber.conf
$(1)/etc
/asterisk
/
357 $(INSTALL_DIR
) $(1)/usr
/lib
/asterisk
/modules
358 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/modules
/chan_gtalk.so
$(1)/usr
/lib
/asterisk
/modules
/
359 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/modules
/res_jabber.so
$(1)/usr
/lib
/asterisk
/modules
/
362 define Package
/asterisk16-curl
/install
363 $(INSTALL_DIR
) $(1)/usr
/lib
/asterisk
/modules
364 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/modules
/func_curl.so
$(1)/usr
/lib
/asterisk
/modules
/
365 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/modules
/res_curl.so
$(1)/usr
/lib
/asterisk
/modules
/
368 define BuildAsterisk16ModuleTemplate
370 define Package
/asterisk16-
$(subst _
,-,$(1))
371 $$(call Package
/asterisk16
/Default
)
373 DEPENDS
:= +asterisk16
376 define Package
/asterisk16-
$(subst _
,-,$(1))/description
377 $$(call Package
/asterisk16
/Default
/description
)
378 This package provides support
$(3) in Asterisk.
381 define Package
/asterisk16-
$(subst _
,-,$(1))/install
382 $(INSTALL_DIR
) $$(1)/usr
/lib
/asterisk
/modules
383 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/modules
/$(1).so
$$(1)/usr
/lib
/asterisk
/modules
/
386 $$(eval
$$(call BuildPackage
,asterisk16-
$(subst _
,-,$(1))))
389 $(eval
$(call BuildPackage
,asterisk16
))
390 $(eval
$(call BuildPackage
,asterisk16-voicemail
))
391 $(eval
$(call BuildPackage
,asterisk16-sounds
))
392 #$(eval $(call BuildPackage,asterisk16-app-meetme))
393 $(eval
$(call BuildPackage
,asterisk16-chan-iax2
))
394 $(eval
$(call BuildPackage
,asterisk16-cdr
))
395 $(eval
$(call BuildPackage
,asterisk16-res-musiconhold
))
396 $(eval
$(call BuildPackage
,asterisk16-chan-gtalk
))
397 $(eval
$(call BuildPackage
,asterisk16-curl
))
398 $(eval
$(call BuildAsterisk16ModuleTemplate
,app_authenticate
,Authenticate
,support for executing arbitrary authenticate commands
))
399 $(eval
$(call BuildAsterisk16ModuleTemplate
,app_chanisavail
,Channel availability
check,support for checking if a channel is available
))
400 $(eval
$(call BuildAsterisk16ModuleTemplate
,app_chanspy
,Channel listen in
,support for listening in on any channel
))
401 $(eval
$(call BuildAsterisk16ModuleTemplate
,app_directed_pickup
,Directed call pickup
,support for directed call pickup
))
402 $(eval
$(call BuildAsterisk16ModuleTemplate
,app_exec
,Exec application
,support for application execution
))
403 $(eval
$(call BuildAsterisk16ModuleTemplate
,app_minivm
,Minimal voicemail system
,a voicemail system in small building blocks working together based on the Comedian Mail voicemail system
))
404 $(eval
$(call BuildAsterisk16ModuleTemplate
,app_readexten
,Extension to variable
,a trivial application to read an extension into a variable
))
405 $(eval
$(call BuildAsterisk16ModuleTemplate
,app_read
,Variable read
,a trivial application to read a variable
))
406 $(eval
$(call BuildAsterisk16ModuleTemplate
,app_sayunixtime
,Say Unix time
,an application to say Unix time
))
407 $(eval
$(call BuildAsterisk16ModuleTemplate
,app_sms
,SMS
,SMS support
(ETSI ES
201 912 protocol
1)))
408 $(eval
$(call BuildAsterisk16ModuleTemplate
,app_stack
,Stack applications
, stack applications Gosub Return etc.
))
409 $(eval
$(call BuildAsterisk16ModuleTemplate
,app_system
,System exec
,support for executing system commands
))
410 $(eval
$(call BuildAsterisk16ModuleTemplate
,app_talkdetect
,File playback with audio detect
,for file playback with audio detect
))
411 $(eval
$(call BuildAsterisk16ModuleTemplate
,app_waituntil
,Sleep
,support sleeping until the given epoch
))
412 $(eval
$(call BuildAsterisk16ModuleTemplate
,app_while
,While loop
,a while loop implementation
))
413 $(eval
$(call BuildAsterisk16ModuleTemplate
,chan_agent
,Agents proxy channel
, an implementation of agents proxy channel
))
414 $(eval
$(call BuildAsterisk16ModuleTemplate
,chan_local
,Local proxy channel
, an implementation of local proxy channel
))
415 $(eval
$(call BuildAsterisk16ModuleTemplate
,codec_ulaw
,Signed linear to ulaw translation
,translation between signed linear and ulaw codecs
))
416 $(eval
$(call BuildAsterisk16ModuleTemplate
,codec_a_mu
,Alaw to ulaw translation
,translation between alaw and ulaw codecs
))
417 $(eval
$(call BuildAsterisk16ModuleTemplate
,codec_g726
,Signed linear to G
.726 translation
,translation between signed linear and ITU G
.726-32kbps codecs
))
418 $(eval
$(call BuildAsterisk16ModuleTemplate
,format_g726
,G
.726,support for headerless G
.726 16/24/32/40kbps data format
))
419 $(eval
$(call BuildAsterisk16ModuleTemplate
,format_g729
,G
.729,support for raw headerless G729 data
))
420 $(eval
$(call BuildAsterisk16ModuleTemplate
,format_sln
,Raw slinear format
,support for raw slinear format
))
421 $(eval
$(call BuildAsterisk16ModuleTemplate
,format_sln16
,Raw slinear
16 format
,support for Raw slinear
16 format
))
422 $(eval
$(call BuildAsterisk16ModuleTemplate
,func_db
,Database interaction
,functions for interaction with the database
))
423 $(eval
$(call BuildAsterisk16ModuleTemplate
,func_devstate
,Blinky lights control
,functions for manually controlled blinky lights
))
424 $(eval
$(call BuildAsterisk16ModuleTemplate
,func_vmcount
,vmcount dialplan
,a vmcount dialplan function
))
425 $(eval
$(call BuildAsterisk16ModuleTemplate
,func_extstate
,Hinted extension state
,retrieving the state of a hinted extension for dialplan control
))
426 $(eval
$(call BuildAsterisk16ModuleTemplate
,func_global
,Global variable
,global variable dialplan functions
))
427 $(eval
$(call BuildAsterisk16ModuleTemplate
,func_shell
,Shell
,support for
shell execution
))
428 $(eval
$(call BuildAsterisk16ModuleTemplate
,pbx_ael
,Asterisk Extension Logic
,support for symbolic Asterisk Extension Logic
))
429 $(eval
$(call BuildAsterisk16ModuleTemplate
,res_ael_share
,Shareable AEL code
,support for shareable AEL code mainly between internal and external modules
))
430 $(eval
$(call BuildAsterisk16ModuleTemplate
,res_agi
,Asterisk Gateway Interface
,support for the Asterisk Gateway Interface extension
))