asterisk18, asterisk11: add func_groupcount
[feed/telephony.git] / net / asterisk-1.8.x / Makefile
1 #
2 # Copyright (C) 2013 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=asterisk18
11 PKG_VERSION:=1.8.10.1
12 PKG_RELEASE:=8
13
14 PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://downloads.asterisk.org/pub/telephony/asterisk/releases/
16 PKG_MD5SUM:=415738d347b9037cbe5f8bfbe66843de
17
18 PKG_BUILD_DIR=$(BUILD_DIR)/asterisk-$(PKG_VERSION)
19
20 include $(INCLUDE_DIR)/ltqtapi.mk
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/asterisk18/Default
24   SUBMENU:=Telephony
25   SECTION:=net
26   CATEGORY:=Network
27   URL:=http://www.asterisk.org/
28 endef
29
30 define Package/asterisk18/Default/description
31  Asterisk is a complete PBX in software. It provides all of the features
32  you would expect from a PBX and more. Asterisk does voice over IP in three
33  protocols, and can interoperate with almost all standards-based telephony
34  equipment using relatively inexpensive hardware.
35 endef
36
37 define Package/asterisk18
38 $(call Package/asterisk18/Default)
39   TITLE:=Complete open source PBX, v1.8x
40   MENU:=1
41   DEPENDS:= +libopenssl +libncurses +libpopt +libpthread +zlib @!TARGET_avr32
42 endef
43
44 define Package/asterisk18/description
45 $(call Package/asterisk18/Default/description)
46 endef
47
48 define Package/asterisk18-sounds
49 $(call Package/asterisk18/Default)
50   TITLE:=Sound files
51   DEPENDS:= asterisk18
52 endef
53
54 define Package/asterisk18-sounds/description
55 $(call Package/asterisk18/Default/description)
56  This package contains sound files for Asterisk.
57 endef
58
59 define Package/asterisk18-voicemail
60 $(call Package/asterisk18/Default)
61   TITLE:=Voicemail support
62   DEPENDS:= asterisk18
63 endef
64
65 define Package/asterisk18-voicemail/description
66 $(call Package/asterisk18/Default/description)
67  This package contains voicemail related modules for Asterisk.
68 endef
69
70 define Package/asterisk18-app-meetme
71 $(call Package/asterisk18/Default)
72   TITLE:=conferencing support
73   DEPENDS:= asterisk18 +dahdi-tools-libtonezone +kmod-dahdi-linux
74 endef
75
76 define Package/asterisk18-app-meetme/description
77 $(call Package/asterisk18/Default/description)
78  This package provides the MeetMe application driver Conferencing support to
79  Asterisk.
80 endef
81
82 define Package/asterisk18-chan-iax2
83 $(call Package/asterisk18/Default)
84   TITLE:=IAX support
85   DEPENDS:= asterisk18 +asterisk18-res-crypto
86 endef
87
88 define Package/asterisk18-chan-iax2/description
89 $(call Package/asterisk18/Default/description)
90  This package provides IAX support to
91  Asterisk.
92 endef
93
94 define Package/asterisk18-cdr
95 $(call Package/asterisk18/Default)
96   TITLE:=CDR support
97   DEPENDS:= asterisk18
98 endef
99
100 define Package/asterisk18-cdr/description
101 $(call Package/asterisk18/Default/description)
102  This package provides Call Detail Record support to
103  Asterisk.
104 endef
105
106 define Package/asterisk18-pgsql
107 $(call Package/asterisk18/Default)
108   TITLE:=PostgreSQL support
109   DEPENDS:= asterisk18 +libpq
110 endef
111
112 define Package/asterisk18-pgsql/description
113 $(call Package/asterisk18/Default/description)
114  This package provides PostgreSQL support to
115  Asterisk.
116 endef
117
118 define Package/asterisk18-res-musiconhold
119 $(call Package/asterisk18/Default)
120   TITLE:=MOH support
121   DEPENDS:= asterisk18
122 endef
123
124 define Package/asterisk18-res-musiconhold/description
125 $(call Package/asterisk18/Default/description)
126  This package provides Music On Hold support to
127  Asterisk.
128 endef
129
130 define Package/asterisk18-res-srtp
131 $(call Package/asterisk18/Default)
132   TITLE:=SRTP support
133   DEPENDS:= asterisk18 libsrtp +asterisk18-res-crypto
134 endef
135
136 define Package/asterisk18-res-srtp/description
137 $(call Package/asterisk18/Default/description)
138  This package provides SRTP support to
139  Asterisk.
140 endef
141
142 define Package/asterisk18-chan-gtalk
143 $(call Package/asterisk18/Default)
144   TITLE:=GTalk support
145   DEPENDS:= asterisk18 +libiksemel
146 endef
147
148 define Package/asterisk18-chan-gtalk/description
149 $(call Package/asterisk18/Default/description)
150  This package provides the channel chan_gtalk and res_jabber for GTalk
151  support to Asterisk.
152 endef
153
154 define Package/asterisk18-chan-mobile
155 $(call Package/asterisk18/Default)
156   TITLE:=Mobile channel support
157   DEPENDS:= asterisk18 +bluez-libs
158 endef
159
160 define Package/asterisk18-chan-mobile/description
161 $(call Package/asterisk18/Default/description)
162  This package provides the channel chan_mobile support to Asterisk.
163 endef
164
165 define Package/asterisk18-res-timing-timerfd
166 $(call Package/asterisk18/Default)
167   TITLE:= Timerfd Timing Interface
168   DEPENDS:= asterisk18
169 endef
170
171 define Package/asterisk18-res-timing-pthread
172 $(call Package/asterisk18/Default)
173   TITLE:= pthread Timing Interface
174   DEPENDS:= asterisk18
175 endef
176
177 define Package/asterisk18-res-fax
178 $(call Package/asterisk18/Default)
179   TITLE:=Generic FAX Resource for FAX technology resource modules
180   DEPENDS:= asterisk18 +asterisk18-res-timing-pthread
181 endef
182
183 define Package/asterisk18-res-fax-spandsp
184 $(call Package/asterisk18/Default)
185   TITLE:=Spandsp T.38 and G.711 FAX Resource
186   DEPENDS:= asterisk18 +asterisk18-res-fax +libspandsp
187 endef
188
189 define Package/asterisk18-chan-mgcp
190 $(call Package/asterisk18/Default)
191   TITLE:=MGCP channel support
192   DEPENDS:= asterisk18
193 endef
194
195 define Package/asterisk18-chan-mgcp/description
196 $(call Package/asterisk18/Default/description)
197  This package provides the channel chan_mgcp support to Asterisk.
198 endef
199
200 define Package/asterisk18-chan-skinny
201 $(call Package/asterisk18/Default)
202   TITLE:=Skinny channel support
203   DEPENDS:= asterisk18
204 endef
205
206 define Package/asterisk18-chan-skinny/description
207 $(call Package/asterisk18/Default/description)
208  This package provides the channel chan_skinny support to Asterisk.
209 endef
210
211 define Package/asterisk18-curl
212 $(call Package/asterisk18/Default)
213   TITLE:=CURL support
214   DEPENDS:= asterisk18 +libcurl
215 endef
216
217 define Package/asterisk18-curl/description
218 $(call Package/asterisk18/Default/description)
219  This package provides CURL
220  support to Asterisk.
221 endef
222
223 define Package/asterisk18-mysql
224 $(call Package/asterisk18/Default)
225   TITLE:=MySQL support
226   DEPENDS:= asterisk18 +PACKAGE_asterisk18-mysql:libmysqlclient
227 endef
228
229 define Package/asterisk18-mysql/description
230 $(call Package/asterisk18/Default/description)
231  This package provides MySQL
232  support to Asterisk.
233 endef
234
235 define Package/asterisk18-chan-lantiq
236 $(call Package/asterisk18/Default)
237   TITLE:=Lantiq TAPI support
238   DEPENDS:= asterisk18 $(LTQ_TAPI_DEPENDS)
239   URL:=http://git.nanl.de/?p=asterisk_channel_lantiq.git
240   MAINTAINER:=Mirko Vogt <mirko@openwrt.org>
241 endef
242
243 define Package/asterisk18-chan-lantiq/description
244 $(call Package/asterisk18/Default/description)
245  This package provides the channel chan_lantiq support to Asterisk.
246 endef
247
248 define Package/asterisk18-odbc
249 $(call Package/asterisk18/Default)
250   TITLE:=ODBC support
251   DEPENDS:= asterisk18 +libpthread +libc +unixodbc
252 endef
253
254 define Package/asterisk18-odbc/description
255 $(call Package/asterisk18/Default/description)
256  This package provides ODBC support for Asterisk.
257 endef
258
259 define Package/asterisk18-pbx-lua
260 $(call Package/asterisk18/Default)
261   TITLE:=Lua support
262   DEPENDS:= asterisk18 +libpthread +libc +liblua
263 endef
264
265 define Package/asterisk18-pbx-lua/description
266 $(call Package/asterisk18/Default/description)
267  This package provides Lua resources for Asterisk.
268 endef
269
270 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-app-meetme),)
271   CONFIGURE_ARGS+= \
272         --with-dahdi="$(STAGING_DIR)/usr"
273 else
274   CONFIGURE_ARGS+= \
275         --without-dahdi
276 endif
277
278 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-chan-gtalk),)
279   CONFIGURE_ARGS+= \
280         --with-gnutls="$(STAGING_DIR)/usr" \
281         --with-iksemel="$(STAGING_DIR)/usr"
282   SITE_VARS+= \
283         ac_cv_lib_iksemel_iks_start_sasl=yes \
284         ac_cv_lib_gnutls_gnutls_bye=yes
285 else
286   CONFIGURE_ARGS+= \
287         --without-gnutls \
288         --without-iksemel
289 endif
290
291 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-curl),)
292   CONFIGURE_ARGS+= \
293         --with-curl="$(STAGING_DIR)/usr"
294 else
295   CONFIGURE_ARGS+= \
296         --without-curl
297 endif
298
299 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-pgsql),)
300   CONFIGURE_ARGS+= \
301         --with-postgres="$(STAGING_DIR)/usr"
302 else
303   CONFIGURE_ARGS+= \
304         --without-postgres
305 endif
306
307 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-mysql),)
308   CONFIGURE_ARGS+= \
309         --with-mysqlclient="$(STAGING_DIR)/usr/bin"
310 else
311   CONFIGURE_ARGS+= \
312         --without-mysqlclient
313 endif
314
315 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-res-fax-spandsp),)
316   CONFIGURE_ARGS+= \
317     --with-spandsp="$(STAGING_DIR)/usr"
318 else
319   CONFIGURE_ARGS+= \
320     --without-spandsp
321 endif
322
323 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-chan-mobile),)
324   CONFIGURE_ARGS+= \
325         --with-bluetooth="$(STAGING_DIR)/usr"
326 else
327   CONFIGURE_ARGS+= \
328         --without-bluetooth
329 endif
330
331 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-res-srtp),)
332   CONFIGURE_ARGS+= \
333         --with-srtp="$(STAGING_DIR)/usr"
334 else
335   CONFIGURE_ARGS+= \
336         --without-srtp
337 endif
338
339 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk18-pbx-lua),)
340   CONFIGURE_ARGS+= \
341         --with-lua="$(STAGING_DIR)/usr"
342   TARGET_LDFLAGS+=-ldl -lcrypt
343 else
344   CONFIGURE_ARGS+= \
345         --without-pbx-lua
346 endif
347
348 CONFIGURE_ARGS+= \
349         --without-curses \
350         --with-gsm=internal \
351         --without-cap \
352         --without-gtk \
353         --without-gtk2 \
354         --without-isdnnet \
355         --without-kde \
356         --without-misdn \
357         --without-nbs \
358         --with-ncurses="$(STAGING_DIR)/usr" \
359         --without-netsnmp \
360         --without-newt \
361         --without-ogg \
362         --without-osptk \
363         --with-popt="$(STAGING_DIR)/usr" \
364         --without-pri \
365         --without-qt \
366         --without-radius \
367         --without-sdl \
368         --without-suppserv \
369         --without-tds \
370         --without-termcap \
371         --without-tinfo \
372         --without-vorbis \
373         --without-vpb \
374         --with-z="$(STAGING_DIR)/usr" \
375         --with-sounds-cache="$(DL_DIR)" \
376         --disable-xmldoc
377
378 EXTRA_CFLAGS+= $(TARGET_CPPFLAGS)
379 EXTRA_LDFLAGS+= $(TARGET_LDFLAGS)
380
381 define Build/Prepare
382         $(call Build/Prepare/Default)
383 ifneq ($(CONFIG_TARGET_lantiq),)
384         $(CP) ./src-lantiq/* $(PKG_BUILD_DIR)/
385 endif
386 endef
387
388 define Build/Configure
389         $(call Build/Configure/Default,,$(SITE_VARS))
390 endef
391
392 define Build/Compile
393         $(MAKE) -C "$(PKG_BUILD_DIR)" \
394                 include/asterisk/version.h \
395                 include/asterisk/buildopts.h defaults.h \
396                 makeopts.embed_rules
397         ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY" \
398         ASTLDFLAGS="$(EXTRA_LDFLAGS)" \
399         $(MAKE) -C "$(PKG_BUILD_DIR)" \
400                 ASTVARLIBDIR="/usr/lib/asterisk" \
401                 ASTDATADIR="/usr/lib/asterisk" \
402                 ASTKEYDIR="/usr/lib/asterisk" \
403                 ASTDBDIR="/usr/lib/asterisk" \
404                 NOISY_BUILD="1" \
405                 DEBUG="" \
406                 OPTIMIZE="" \
407                 DESTDIR="$(PKG_INSTALL_DIR)" \
408                 all install samples
409 endef
410
411 define Build/InstallDev
412         $(INSTALL_DIR) $(1)/usr/include/asterisk-1.8/include/asterisk/
413         $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk/*.h $(1)/usr/include/asterisk-1.8/include/asterisk/
414         $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk.h $(1)/usr/include/asterisk-1.8/include/
415 endef
416
417 define Package/asterisk18/conffiles
418 /etc/asterisk/asterisk.conf
419 /etc/asterisk/modules.conf
420 /etc/asterisk/extensions.conf
421 /etc/asterisk/sip.conf
422 /etc/asterisk/sip_notify.conf
423 /etc/asterisk/features.conf
424 /etc/asterisk/indications.conf
425 /etc/asterisk/logger.conf
426 /etc/asterisk/manager.conf
427 /etc/asterisk/rtp.conf
428 /etc/default/asterisk
429 /etc/init.d/asterisk
430 endef
431
432 define Package/asterisk18/install
433         $(INSTALL_DIR) $(1)/etc/asterisk
434         for f in asterisk extensions features \
435                 indications logger manager modules \
436                 sip sip_notify rtp; do \
437                 $(CP) $(PKG_INSTALL_DIR)/etc/asterisk/$$$$f.conf $(1)/etc/asterisk/ ; \
438         done
439         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
440         for f in app_dial app_echo app_playback app_macro \
441                 chan_sip res_rtp_asterisk res_rtp_multicast \
442                 codec_ulaw codec_gsm \
443                 format_gsm format_pcm format_wav format_wav_gsm \
444                 pbx_config \
445                 func_strings func_timeout func_callerid func_logic; do \
446                 $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/$$$$f.so $(1)/usr/lib/asterisk/modules/ ; \
447         done
448         $(INSTALL_DIR) $(1)/usr/sbin
449         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/asterisk $(1)/usr/sbin/
450         $(INSTALL_DIR) $(1)/etc/default
451         $(INSTALL_DATA)  ./files/asterisk.default $(1)/etc/default/asterisk
452         $(INSTALL_DIR) $(1)/etc/init.d
453         $(INSTALL_BIN)  ./files/asterisk.init $(1)/etc/init.d/asterisk
454 endef
455
456 define Package/asterisk18-sounds/install
457         $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds/
458         $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/en/* $(1)/usr/lib/asterisk/sounds/
459         rm -f $(1)/usr/lib/asterisk/sounds/vm-*
460         rm -f $(1)/usr/lib/asterisk/sounds/conf-*
461 endef
462
463
464 define Package/asterisk18-voicemail/conffiles
465 /etc/asterisk/voicemail.conf
466 endef
467
468 define Package/asterisk18-voicemail/install
469         $(INSTALL_DIR) $(1)/etc/asterisk
470         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/voicemail.conf $(1)/etc/asterisk/
471         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
472         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/*voicemail.so $(1)/usr/lib/asterisk/modules/
473         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_adsi.so $(1)/usr/lib/asterisk/modules/
474         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_smdi.so $(1)/usr/lib/asterisk/modules/
475         $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds/
476         $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/en/vm-*.gsm $(1)/usr/lib/asterisk/sounds/
477 endef
478
479 define Package/asterisk18-app-meetme/conffiles
480 /etc/asterisk/meetme.conf
481 endef
482
483 define Package/asterisk18-app-meetme/install
484         $(INSTALL_DIR) $(1)/etc/asterisk
485         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/meetme.conf $(1)/etc/asterisk/
486         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
487         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/app_meetme.so $(1)/usr/lib/asterisk/modules/
488         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_dahdi.so $(1)/usr/lib/asterisk/modules/
489         $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds/
490         $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/en/conf-*.gsm $(1)/usr/lib/asterisk/sounds/
491 endef
492
493 define Package/asterisk18-chan-iax2/conffiles
494 /etc/asterisk/iax.conf
495 /etc/asterisk/iaxprov.conf
496 endef
497
498 define Package/asterisk18-cdr/conffiles
499 /etc/asterisk/cdr.conf
500 /etc/asterisk/cdr_custom.conf
501 /etc/asterisk/cdr_manager.conf
502 /etc/asterisk/cdr_syslog.conf
503 endef
504
505 define Package/asterisk18-res-musiconhold/conffiles
506 /etc/asterisk/musiconhold.conf
507 endef
508
509 define Package/asterisk18-chan-iax2/install
510         $(INSTALL_DIR) $(1)/etc/asterisk
511         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/iax.conf $(1)/etc/asterisk/
512         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/iaxprov.conf $(1)/etc/asterisk/
513         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
514         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_iax2.so $(1)/usr/lib/asterisk/modules/
515 endef
516
517 define Package/asterisk18-cdr/install
518         $(INSTALL_DIR) $(1)/etc/asterisk
519         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/{cdr,cdr_custom,cdr_manager,cdr_syslog}.conf $(1)/etc/asterisk/
520         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
521         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/{app_,app_fork,func_}cdr.so $(1)/usr/lib/asterisk/modules/
522         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/cdr_csv.so $(1)/usr/lib/asterisk/modules/
523 endef
524
525 define Package/asterisk18-pgsql/conffiles
526 /etc/asterisk/cel_pgsql.conf
527 /etc/asterisk/cdr_pgsql.conf
528 /etc/asterisk/res_pgsql.conf
529 endef
530
531 define Package/asterisk18-pgsql/install
532         $(INSTALL_DIR) $(1)/etc/asterisk
533         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/{cel,cdr,res}_pgsql.conf $(1)/etc/asterisk/
534         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
535         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/{cel,cdr,res_config}_pgsql.so $(1)/usr/lib/asterisk/modules/
536 endef
537
538 define Package/asterisk18-res-musiconhold/install
539         $(INSTALL_DIR) $(1)/etc/asterisk
540         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/musiconhold.conf $(1)/etc/asterisk/
541         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
542         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_musiconhold.so $(1)/usr/lib/asterisk/modules/
543 endef
544
545 define Package/asterisk18-chan-gtalk/conffiles
546 /etc/asterisk/gtalk.conf
547 /etc/asterisk/jabber.conf
548 endef
549
550 define Package/asterisk18-chan-gtalk/install
551         $(INSTALL_DIR) $(1)/etc/asterisk
552         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/gtalk.conf $(1)/etc/asterisk/
553         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/jabber.conf $(1)/etc/asterisk/
554         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
555         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_gtalk.so $(1)/usr/lib/asterisk/modules/
556         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_jabber.so $(1)/usr/lib/asterisk/modules/
557 endef
558
559 define Package/asterisk18-chan-mobile/conffiles
560 /etc/asterisk/chan_mobile.conf
561 endef
562
563 define Package/asterisk18-chan-mobile/install
564         $(INSTALL_DIR) $(1)/etc/asterisk
565         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/chan_mobile.conf $(1)/etc/asterisk/
566         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
567         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_mobile.so $(1)/usr/lib/asterisk/modules/
568 endef
569
570 define Package/asterisk18-res-timing-timerfd/install
571         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
572         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_timing_timerfd.so $(1)/usr/lib/asterisk/modules/
573 endef
574
575 define Package/asterisk18-res-timing-pthread/install
576         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
577         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_timing_pthread.so $(1)/usr/lib/asterisk/modules/
578 endef
579
580 define Package/asterisk18-res-fax/conffiles
581 /etc/asterisk/res_fax.conf
582 endef
583
584 define Package/asterisk18-res-fax/install
585         $(INSTALL_DIR) $(1)/etc/asterisk
586         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/res_fax.conf $(1)/etc/asterisk/
587         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
588         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_fax.so $(1)/usr/lib/asterisk/modules/
589 endef
590
591 define Package/asterisk18-res-fax-spandsp/install
592         $(INSTALL_DIR) $(1)/etc/asterisk
593         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
594         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_fax_spandsp.so $(1)/usr/lib/asterisk/modules/
595 endef
596
597 define Package/asterisk18-chan-mgcp/conffiles
598 /etc/asterisk/mgcp.conf
599 endef
600
601 define Package/asterisk18-chan-mgcp/install
602         $(INSTALL_DIR) $(1)/etc/asterisk
603         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/mgcp.conf $(1)/etc/asterisk/
604         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
605         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_mgcp.so $(1)/usr/lib/asterisk/modules/
606 endef
607
608 define Package/asterisk18-chan-skinny/conffiles
609 /etc/asterisk/skinny.conf
610 endef
611
612 define Package/asterisk18-chan-skinny/install
613         $(INSTALL_DIR) $(1)/etc/asterisk
614         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/skinny.conf $(1)/etc/asterisk/
615         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
616         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_skinny.so $(1)/usr/lib/asterisk/modules/
617 endef
618
619 define Package/asterisk18-curl/install
620         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
621         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/func_curl.so $(1)/usr/lib/asterisk/modules/
622         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_curl.so $(1)/usr/lib/asterisk/modules/
623 endef
624
625 define Package/asterisk18-mysql/conffiles
626 /etc/asterisk/app_mysql.conf
627 /etc/asterisk/res_config_mysql.conf
628 /etc/asterisk/cdr_mysql.conf
629 endef
630
631 define Package/asterisk18-mysql/install
632         $(INSTALL_DIR) $(1)/etc/asterisk
633         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/app_mysql.conf $(1)/etc/asterisk/
634         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/res_config_mysql.conf $(1)/etc/asterisk/
635         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/cdr_mysql.conf $(1)/etc/asterisk/
636         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
637         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/app_mysql.so $(1)/usr/lib/asterisk/modules/
638         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/cdr_mysql.so $(1)/usr/lib/asterisk/modules/
639         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_config_mysql.so $(1)/usr/lib/asterisk/modules/
640 endef
641
642 define Package/asterisk18-chan-lantiq/conffiles
643 /etc/asterisk/lantiq.conf
644 endef
645
646 define Package/asterisk18-chan-lantiq/install
647         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
648         $(INSTALL_DIR) $(1)/etc/asterisk
649         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/lantiq.conf $(1)/etc/asterisk/
650         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_lantiq.so $(1)/usr/lib/asterisk/modules/
651 endef
652
653 define Package/asterisk18-res-srtp/install
654         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
655         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_srtp.so $(1)/usr/lib/asterisk/modules/
656 endef
657
658 define Package/asterisk18-odbc/conffiles
659 /etc/asterisk/cdr_adaptive_odbc.conf
660 /etc/asterisk/cdr_odbc.conf
661 /etc/asterisk/cel_odbc.conf
662 /etc/asterisk/func_odbc.conf
663 /etc/asterisk/res_odbc.conf
664 endef
665
666 define Package/asterisk18-odbc/install
667         $(INSTALL_DIR) $(1)/etc/asterisk
668         $(CP) $(PKG_INSTALL_DIR)/etc/asterisk/{cdr_adaptive,cdr,cel,func,res}_odbc.conf $(1)/etc/asterisk/
669         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
670         $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/{cdr_adaptive,cdr,cel,func,res_config,res}_odbc.so $(1)/usr/lib/asterisk/modules/
671 endef
672
673 define Package/asterisk18-pbx-lua/install
674         $(INSTALL_DIR) $(1)/etc/asterisk
675         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/extensions.lua $(1)/etc/asterisk/
676         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
677         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/pbx_lua.so $(1)/usr/lib/asterisk/modules/
678 endef
679
680 define Buildasterisk18ModuleTemplate
681
682   define Package/asterisk18-$(subst _,-,$(1))
683   $$(call Package/asterisk18/Default)
684     TITLE:=$(2) support
685     DEPENDS:= asterisk18 $(4)
686   endef
687
688   define Package/asterisk18-$(subst _,-,$(1))/description
689   $$(call Package/asterisk18/Default/description)
690     This package provides support $(3) in Asterisk.
691   endef
692
693   define Package/asterisk18-$(subst _,-,$(1))/install
694         $(INSTALL_DIR) $$(1)/usr/lib/asterisk/modules
695         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/$(1).so $$(1)/usr/lib/asterisk/modules/
696   endef
697
698   $$(eval $$(call BuildPackage,asterisk18-$(subst _,-,$(1))))
699 endef
700
701 $(eval $(call BuildPackage,asterisk18))
702 $(eval $(call BuildPackage,asterisk18-voicemail))
703 $(eval $(call BuildPackage,asterisk18-sounds))
704 #$(eval $(call BuildPackage,asterisk18-app-meetme))
705 $(eval $(call BuildPackage,asterisk18-chan-iax2))
706 $(eval $(call BuildPackage,asterisk18-cdr))
707 $(eval $(call BuildPackage,asterisk18-res-musiconhold))
708 $(eval $(call BuildPackage,asterisk18-chan-gtalk))
709 $(eval $(call BuildPackage,asterisk18-chan-mobile))
710 $(eval $(call BuildPackage,asterisk18-odbc))
711 $(eval $(call BuildPackage,asterisk18-pgsql))
712 $(eval $(call BuildPackage,asterisk18-pbx-lua))
713 $(eval $(call BuildPackage,asterisk18-res-fax))
714 $(eval $(call BuildPackage,asterisk18-res-fax-spandsp))
715 $(eval $(call BuildPackage,asterisk18-res-timing-timerfd))
716 $(eval $(call BuildPackage,asterisk18-res-timing-pthread))
717 $(eval $(call BuildPackage,asterisk18-chan-mgcp))
718 $(eval $(call BuildPackage,asterisk18-chan-skinny))
719 $(eval $(call BuildPackage,asterisk18-curl))
720 $(eval $(call BuildPackage,asterisk18-mysql))
721 $(eval $(call BuildPackage,asterisk18-chan-lantiq))
722 $(eval $(call BuildPackage,asterisk18-res-srtp))
723 $(eval $(call Buildasterisk18ModuleTemplate,app_authenticate,Authenticate,support for executing arbitrary authenticate commands))
724 $(eval $(call Buildasterisk18ModuleTemplate,app_chanisavail,Channel availability check,support for checking if a channel is available))
725 $(eval $(call Buildasterisk18ModuleTemplate,app_chanspy,Channel listen in,support for listening in on any channel))
726 $(eval $(call Buildasterisk18ModuleTemplate,app_directed_pickup,Directed call pickup,support for directed call pickup))
727 $(eval $(call Buildasterisk18ModuleTemplate,app_exec,Exec application,support for application execution))
728 $(eval $(call Buildasterisk18ModuleTemplate,app_minivm,Minimal voicemail system,a voicemail system in small building blocks working together based on the Comedian Mail voicemail system))
729 $(eval $(call Buildasterisk18ModuleTemplate,app_readexten,Extension to variable,a trivial application to read an extension into a variable))
730 $(eval $(call Buildasterisk18ModuleTemplate,app_read,Variable read,a trivial application to read a variable))
731 $(eval $(call Buildasterisk18ModuleTemplate,app_sayunixtime,Say Unix time,an application to say Unix time))
732 $(eval $(call Buildasterisk18ModuleTemplate,app_sms,SMS,SMS support (ETSI ES 201 912 protocol 1)))
733 $(eval $(call Buildasterisk18ModuleTemplate,app_stack,Stack applications, stack applications Gosub Return etc., +asterisk18-res-agi))
734 $(eval $(call Buildasterisk18ModuleTemplate,app_system,System exec,support for executing system commands))
735 $(eval $(call Buildasterisk18ModuleTemplate,app_talkdetect,File playback with audio detect,for file playback with audio detect))
736 $(eval $(call Buildasterisk18ModuleTemplate,app_waituntil,Sleep,support sleeping until the given epoch))
737 $(eval $(call Buildasterisk18ModuleTemplate,app_while,While loop,a while loop implementation))
738 $(eval $(call Buildasterisk18ModuleTemplate,chan_agent,Agents proxy channel, an implementation of agents proxy channel))
739 $(eval $(call Buildasterisk18ModuleTemplate,chan_local,Local proxy channel, an implementation of local proxy channel))
740 $(eval $(call Buildasterisk18ModuleTemplate,codec_alaw,Signed linear to alaw translation,translation between signed linear and alaw codecs))
741 $(eval $(call Buildasterisk18ModuleTemplate,codec_a_mu,Alaw to ulaw translation,translation between alaw and ulaw codecs))
742 $(eval $(call Buildasterisk18ModuleTemplate,codec_g722,G.722,a high bit rate 48/56/64Kbps ITU standard codec))
743 $(eval $(call Buildasterisk18ModuleTemplate,codec_g726,Signed linear to G.726 translation,translation between signed linear and ITU G.726-32kbps codecs))
744 $(eval $(call Buildasterisk18ModuleTemplate,format_g726,G.726,support for headerless G.726 16/24/32/40kbps data format))
745 $(eval $(call Buildasterisk18ModuleTemplate,format_g729,G.729,support for raw headerless G729 data))
746 $(eval $(call Buildasterisk18ModuleTemplate,format_sln,Raw slinear format,support for raw slinear format))
747 $(eval $(call Buildasterisk18ModuleTemplate,format_sln16,Raw slinear 16 format,support for Raw slinear 16 format))
748 $(eval $(call Buildasterisk18ModuleTemplate,func_db,Database interaction,functions for interaction with the database))
749 $(eval $(call Buildasterisk18ModuleTemplate,func_devstate,Blinky lights control,functions for manually controlled blinky lights))
750 $(eval $(call Buildasterisk18ModuleTemplate,func_vmcount,vmcount dialplan,a vmcount dialplan function))
751 $(eval $(call Buildasterisk18ModuleTemplate,func_extstate,Hinted extension state,retrieving the state of a hinted extension for dialplan control))
752 $(eval $(call Buildasterisk18ModuleTemplate,func_global,Global variable,global variable dialplan functions))
753 $(eval $(call Buildasterisk18ModuleTemplate,func_groupcount,Group count,Counts the number of channels in the specified group))
754 $(eval $(call Buildasterisk18ModuleTemplate,func_shell,Shell,support for shell execution))
755 $(eval $(call Buildasterisk18ModuleTemplate,pbx_ael,Asterisk Extension Logic,support for symbolic Asterisk Extension Logic))
756 $(eval $(call Buildasterisk18ModuleTemplate,res_ael_share,Shareable AEL code,support for shareable AEL code mainly between internal and external modules))
757 $(eval $(call Buildasterisk18ModuleTemplate,pbx_spool,Call Spool,outgoing call spool support))
758 $(eval $(call Buildasterisk18ModuleTemplate,res_agi,Asterisk Gateway Interface,support for the Asterisk Gateway Interface extension))
759 $(eval $(call Buildasterisk18ModuleTemplate,res_crypto,Provide Crypto,Cryptographic Signature capability))
760 $(eval $(call Buildasterisk18ModuleTemplate,app_alarmreceiver,Alarm receiver,Central Station Alarm receiver for Ademco Contact ID))
761 $(eval $(call Buildasterisk18ModuleTemplate,app_setcallerid,Set callerid,support for setting callerid))
762 $(eval $(call Buildasterisk18ModuleTemplate,app_verbose,Verbose logging,Verbose logging application))
763 $(eval $(call Buildasterisk18ModuleTemplate,func_channel,Channel info,Channel info dialplan function))
764 $(eval $(call Buildasterisk18ModuleTemplate,func_blacklist,Blacklist on callerid,looking up the callerid number and see if it is blacklisted))
765 $(eval $(call Buildasterisk18ModuleTemplate,app_originate,Originate a call,originating an outbound call and connecting it to a specified extension or application))
766 $(eval $(call Buildasterisk18ModuleTemplate,func_uri,URI encoding and decoding,Encodes and decodes URI-safe strings))
767 $(eval $(call Buildasterisk18ModuleTemplate,app_disa,Direct Inward System Access,Direct Inward System Access))
768 $(eval $(call Buildasterisk18ModuleTemplate,app_senddtmf,Send DTMF digits,Sends arbitrary DTMF digits))
769 $(eval $(call Buildasterisk18ModuleTemplate,func_cut,CUT function,CUT function))
770 $(eval $(call Buildasterisk18ModuleTemplate,res_clioriginate,Calls via CLI,Originate calls via the CLI))
771 $(eval $(call Buildasterisk18ModuleTemplate,app_mixmonitor,Record a call and mix the audio,record a call and mix the audio during the recording))
772 $(eval $(call Buildasterisk18ModuleTemplate,app_playtones,Playtones application,play a tone list))
773 $(eval $(call Buildasterisk18ModuleTemplate,app_record,Record sound file,to record a sound file))