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