eb77ac03d3f1b3d37f549f281b8ed1596a267d70
[openwrt/svn-archive/archive.git] / net / asterisk-1.4.x / Makefile
1 #
2 # Copyright (C) 2007 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=asterisk
12 PKG_VERSION:=1.4.23.1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://downloads.digium.com/pub/asterisk/releases/
17 PKG_MD5SUM:=4788954a93f5fbf78e55e2aa6e03329f
18
19 PKG_BUILD_DEPENDS:= libopenh323 pwlib
20
21 include $(INCLUDE_DIR)/package.mk
22
23 STAMP_CONFIGURED:=$(STAMP_CONFIGURED)_$(call confvar, \
24 CONFIG_PACKAGE_asterisk14 CONFIG_PACKAGE_asterisk14-mini \
25 CONFIG_PACKAGE_asterisk14-chan-alsa CONFIG_PACKAGE_asterisk14-chan-gtalk \
26 CONFIG_PACKAGE_asterisk14-chan-h323 CONFIG_PACKAGE_asterisk14-chan-mgcp \
27 CONFIG_PACKAGE_asterisk14-chan-skinny CONFIG_PACKAGE_asterisk14-codec-ilbc \
28 CONFIG_PACKAGE_asterisk14-codec-lpc10 CONFIG_PACKAGE_asterisk14-codec-speex \
29 CONFIG_PACKAGE_asterisk14-pbx-dundi CONFIG_PACKAGE_asterisk14-res-agi \
30 CONFIG_PACKAGE_asterisk14-res-crypto CONFIG_PACKAGE_asterisk14-pgsql \
31 CONFIG_PACKAGE_asterisk14-sqlite CONFIG_PACKAGE_asterisk14-voicemail \
32 CONFIG_PACKAGE_asterisk14-sounds \
33 )
34
35 define Package/asterisk14/Default
36 SUBMENU:=asterisk14 (Complete Open Source PBX), v1.4.x
37 SECTION:=net
38 CATEGORY:=Network
39 URL:=http://www.asterisk.org/
40 endef
41
42 define Package/asterisk14/Default/description
43 Asterisk is a complete PBX in software. It provides all of the features
44 you would expect from a PBX and more. Asterisk does voice over IP in three
45 protocols, and can interoperate with almost all standards-based telephony
46 equipment using relatively inexpensive hardware.
47 endef
48
49
50 define Package/asterisk14
51 $(call Package/asterisk14/Default)
52 TITLE:=Complete open source PBX
53 DEPENDS:= +libncurses +libpopt +libpthread @!TARGET_avr32
54 endef
55
56 define Package/asterisk14/description
57 $(call Package/asterisk14/Default/description)
58 endef
59
60
61 define Package/asterisk14-mini
62 $(call Package/asterisk14/Default)
63 TITLE:=Minimal open source PBX
64 DEPENDS:=+libncurses +libpthread @!TARGET_avr32
65 endef
66
67 define Package/asterisk14-mini/description
68 $(call Package/asterisk14/Default/description)
69 This package contains only the following modules:
70 - app_dial
71 - chan_iax2
72 - chan_local
73 - chan_sip
74 - codec_gsm
75 - codec_ulaw
76 - format_gsm
77 - format_pcm
78 - format_wav
79 - format_wav_gsm
80 - pbx_config
81 - res_features
82 - res_musiconhold
83 endef
84
85
86 define Package/asterisk14-app-meetme
87 $(call Package/asterisk14/Default)
88 TITLE:=conferencing support
89 DEPENDS:= +asterisk14 +zaptel14-libtonezone
90 endef
91
92 define Package/asterisk14-app-meetme/description
93 $(call Package/asterisk14/Default/description)
94 This package provides the MeetMe application driver Conferencing support to
95 Asterisk.
96 endef
97
98
99 define Package/asterisk14-chan-oss
100 $(call Package/asterisk14/Default)
101 TITLE:=OSS soundcards support
102 DEPENDS:= +asterisk14
103 endef
104
105 define Package/asterisk14-chan-oss/description
106 $(call Package/asterisk14/Default/description)
107 This package provides the channel driver for OSS sound cards support to
108 Asterisk.
109 endef
110
111
112 define Package/asterisk14-app-meetme
113 $(call Package/asterisk14/Default)
114 TITLE:=conferencing support
115 DEPENDS:= +asterisk14 +zaptel14-libtonezone
116 endef
117
118 define Package/asterisk14-app-meetme/description
119 $(call Package/asterisk14/Default/description)
120 This package provides the MeetMe application driver Conferencing support to
121 Asterisk.
122 endef
123
124
125 define Package/asterisk14-chan-oss
126 $(call Package/asterisk14/Default)
127 TITLE:=OSS soundcards support
128 DEPENDS:= +asterisk14
129 endef
130
131 define Package/asterisk14-chan-oss/description
132 $(call Package/asterisk14/Default/description)
133 This package provides the channel driver for OSS sound cards support to
134 Asterisk.
135 endef
136
137
138 define Package/asterisk14-chan-alsa
139 $(call Package/asterisk14/Default)
140 TITLE:=ALSA soundcards support
141 DEPENDS:= +asterisk14 +alsa-lib
142 endef
143
144 define Package/asterisk14-chan-alsa/description
145 $(call Package/asterisk14/Default/description)
146 This package provides the channel driver for ALSA sound cards support to
147 Asterisk.
148 endef
149
150
151 define Package/asterisk14-chan-gtalk
152 $(call Package/asterisk14/Default)
153 TITLE:=GTalk support
154 DEPENDS:= +asterisk14 +libiksemel
155 endef
156
157 define Package/asterisk14-chan-gtalk/description
158 $(call Package/asterisk14/Default/description)
159 This package provides the channel chan_gtalk and res_jabber for GTalk
160 support to Asterisk.
161 endef
162
163
164 define Package/asterisk14-chan-h323
165 $(call Package/asterisk14/Default)
166 TITLE:=H.323 support for Asterisk
167 DEPENDS:= +asterisk14 +uclibcxx
168 endef
169
170 define Package/asterisk14-chan-h323/description
171 $(call Package/asterisk14/Default/description)
172 This package provides H.323 support to Asterisk.
173 endef
174
175
176 define Package/asterisk14-chan-mgcp
177 $(call Package/asterisk14/Default)
178 TITLE:=MGCP support
179 DEPENDS:= +asterisk14
180 endef
181
182 define Package/asterisk14-chan-mgcp/description
183 $(call Package/asterisk14/Default/description)
184 This package provides MGCP (Media Gateway Control Protocol) support \\\
185 to Asterisk.
186 endef
187
188
189 define Package/asterisk14-chan-skinny
190 $(call Package/asterisk14/Default)
191 TITLE:=Skinny Client Control Protocol support
192 DEPENDS:= +asterisk14
193 endef
194
195 define Package/asterisk14-chan-skinny/description
196 $(call Package/asterisk14/Default/description)
197 This package provided Skinny Client Control Protocol support to \\\
198 Asterisk.
199 endef
200
201
202 #define Package/asterisk14-codec-ilbc
203 #$(call Package/asterisk14/Default)
204 # TITLE:=ILBC Translator
205 # DEPENDS:= +asterisk14
206 #endef
207
208 #define Package/asterisk14-codec-ilbc/description
209 #$(call Package/asterisk14/Default/description)
210 # This package contains the ILBC (Internet Low Bitrate Codec) translator
211 # for Asterisk.
212 #endef
213
214
215 define Package/asterisk14-codec-lpc10
216 $(call Package/asterisk14/Default)
217 TITLE:=LPC10 2.4kbps voice codec Translator
218 DEPENDS:= +asterisk14
219 endef
220
221 define Package/asterisk14-chan-lpc10/description
222 $(call Package/asterisk14/Default/description)
223 This package contains the LPC10 (Linear Predictor Code) 2.4kbps voice
224 codec translator for Asterisk.
225 endef
226
227
228 define Package/asterisk14-codec-speex
229 $(call Package/asterisk14/Default)
230 TITLE:=Speex/PCM16 Codec Translator
231 DEPENDS:= +asterisk14 +libspeex +libspeexdsp
232 endef
233
234 define Package/asterisk14-chan-speex/description
235 $(call Package/asterisk14/Default/description)
236 This package contains the Speex speech compression codec translator for
237 Asterisk.
238 endef
239
240
241 define Package/asterisk14-pbx-dundi
242 $(call Package/asterisk14/Default)
243 TITLE:=DUNDi support
244 DEPENDS:= +asterisk14
245 endef
246
247 define Package/asterisk14-pbx-dundi/description
248 $(call Package/asterisk14/Default/description)
249 This package provides DUNDi (Distributed Universal Number Discovery)
250 support to Asterisk.
251 endef
252
253
254 define Package/asterisk14-res-agi
255 $(call Package/asterisk14/Default)
256 TITLE:=AGI support
257 DEPENDS:= +asterisk14
258 endef
259
260 define Package/asterisk14-res-agi/description
261 $(call Package/asterisk14/Default/description)
262 This package provides AGI (Asterisk Gateway Interface) support to
263 Asterisk.
264 endef
265
266
267 define Package/asterisk14-res-crypto
268 $(call Package/asterisk14/Default)
269 TITLE:=Cryptographic Digital Signatures support
270 DEPENDS:= +asterisk14 +libopenssl
271 endef
272
273 define Package/asterisk14-res-crypto/description
274 $(call Package/asterisk14/Default/description)
275 This package provides Cryptographic Digital Signatures support to
276 Asterisk.
277 endef
278
279
280 define Package/asterisk14-pgsql
281 $(call Package/asterisk14/Default)
282 TITLE:=PostgreSQL support
283 DEPENDS:= +asterisk14 +libpq
284 endef
285
286 define Package/asterisk14-pgsql/description
287 $(call Package/asterisk14/Default/description)
288 This package contains PostgreSQL support modules for Asterisk.
289 endef
290
291
292 define Package/asterisk14-sqlite
293 $(call Package/asterisk14/Default)
294 TITLE:=SQLite modules
295 DEPENDS:= +asterisk14 +libsqlite2
296 endef
297
298 define Package/asterisk14-sqlite/description
299 $(call Package/asterisk14/Default/description)
300 This package contains SQLite support modules for Asterisk.
301 endef
302
303
304 define Package/asterisk14-sounds
305 $(call Package/asterisk14/Default)
306 TITLE:=Sound files
307 DEPENDS:= +asterisk14
308 endef
309
310 define Package/asterisk14-sounds/description
311 $(call Package/asterisk14/Default/description)
312 This package contains sound files for Asterisk.
313 endef
314
315
316 define Package/asterisk14-voicemail
317 $(call Package/asterisk14/Default)
318 TITLE:=Voicemail support
319 DEPENDS:= +asterisk14
320 endef
321
322 define Package/asterisk14-voicemail/description
323 $(call Package/asterisk14/Default/description)
324 This package contains voicemail related modules for Asterisk.
325 endef
326
327 define Package/asterisk14-rawplayer
328 $(call Package/asterisk14/Default)
329 TITLE:=Play raw files for asterisk
330 endef
331
332 define Package/asterisk14-rawplayer/description
333 Contains the rawplayer utility for asterisk
334 endef
335
336
337 # --with-ltdl="$(STAGING_DIR)/usr" \
338 CONFIGURE_ARGS+= \
339 --without-curl \
340 --without-curses \
341 --with-gsm="$(STAGING_DIR)/usr" \
342 --without-imap \
343 --without-isdnnet \
344 --without-kde \
345 --without-misdn \
346 --without-nbs \
347 --with-ncurses="$(STAGING_DIR)/usr" \
348 --without-netsnmp \
349 --without-newt \
350 --without-odbc \
351 --without-ogg \
352 --without-osptk \
353 --with-popt="$(STAGING_DIR)/usr" \
354 --without-pri \
355 --without-qt \
356 --without-radius \
357 --without-spandsp \
358 --without-suppserv \
359 --without-tds \
360 --without-termcap \
361 --without-tinfo \
362 --without-vorbis \
363 --without-vpb \
364 --with-z="$(STAGING_DIR)/usr" \
365
366 EXTRA_CFLAGS:= $(TARGET_CPPFLAGS)
367 EXTRA_LDFLAGS:= $(TARGET_LDFLAGS)
368
369 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk14-app-meetme),)
370 CONFIGURE_ARGS+= \
371 --with-tonezone="$(STAGING_DIR)/usr" --with-zaptel="$(STAGING_DIR)/usr"
372 else
373 CONFIGURE_ARGS+= \
374 --without-tonezone --without-zaptel
375 endif
376
377 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk14-chan-alsa),)
378 CONFIGURE_ARGS+= \
379 --with-asound="$(STAGING_DIR)/usr"
380 else
381 CONFIGURE_ARGS+= \
382 --without-asound
383 endif
384
385 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk14-chan-oss),)
386 CONFIGURE_ARGS+= \
387 --with-oss
388 else
389 CONFIGURE_ARGS+= \
390 --without-oss
391 endif
392
393 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk14-chan-gtalk),)
394 CONFIGURE_ARGS+= \
395 --with-gnutls="$(STAGING_DIR)/usr" \
396 --with-iksemel="$(STAGING_DIR)/usr"
397 SITE_VARS+= \
398 ac_cv_lib_iksemel_iks_start_sasl=yes \
399 ac_cv_lib_gnutls_gnutls_bye=yes
400 else
401 CONFIGURE_ARGS+= \
402 --without-gnutls \
403 --without-iksemel
404 endif
405
406 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk14-chan-h323),)
407 CONFIGURE_ARGS+= \
408 --with-h323="$(BUILD_DIR)/openh323" \
409 --with-pwlib="$(BUILD_DIR)/pwlib"
410 CONFIGURE_VARS+= \
411 LIBS="$$$$LIBS -luClibc++ -ldl -lpthread"
412
413 define Build/Compile/chan-h323
414 $(MAKE) -C "$(PKG_BUILD_DIR)/channels/h323" \
415 $(TARGET_CONFIGURE_OPTS) \
416 CXXLIBS="-nodefaultlibs -luClibc++" \
417 optnoshared
418 endef
419 else
420 CONFIGURE_ARGS+= \
421 --without-h323 \
422 --without-pwlib
423 endif
424
425 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk14-codec-speex),)
426 CONFIGURE_ARGS+= \
427 --with-speex="$(STAGING_DIR)/usr"
428 SITE_VARS+= \
429 ac_cv_lib_speex_speex_encode=yes
430 EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/include/speex
431 else
432 CONFIGURE_ARGS+= \
433 --without-speex
434 endif
435
436 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk14-res-crypto),)
437 CONFIGURE_ARGS+= \
438 --with-ssl="$(STAGING_DIR)/usr"
439 else
440 CONFIGURE_ARGS+= \
441 --without-ssl
442 endif
443
444 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk14-pgsql),)
445 CONFIGURE_ARGS+= \
446 --with-postgres="$(STAGING_DIR)/usr"
447 else
448 CONFIGURE_ARGS+= \
449 --without-postgres
450 endif
451
452 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk14-sqlite),)
453 CONFIGURE_ARGS+= \
454 --with-sqlite="$(STAGING_DIR)/usr"
455 else
456 CONFIGURE_ARGS+= \
457 --without-sqlite
458 endif
459
460
461 define Build/Configure
462 -rm $(PKG_BUILD_DIR)/menuselect.makeopts
463 ( cd $(PKG_BUILD_DIR); ./bootstrap.sh )
464 $(call Build/Configure/Default,,$(SITE_VARS))
465 endef
466
467 define Build/Compile
468 $(MAKE) -C "$(PKG_BUILD_DIR)" \
469 include/asterisk/version.h \
470 include/asterisk/buildopts.h defaults.h \
471 makeopts.embed_rules
472 $(call Build/Compile/chan-h323)
473 ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY $(TARGET_CFLAGS)" \
474 ASTLDFLAGS="$(EXTRA_LDFLAGS)" \
475 $(MAKE) -C "$(PKG_BUILD_DIR)" \
476 ASTVARLIBDIR="/usr/lib/asterisk" \
477 NOISY_BUILD="1" \
478 DEBUG="" \
479 OPTIMIZE="" \
480 DESTDIR="$(PKG_INSTALL_DIR)" \
481 all install samples
482 $(SED) 's|/var/lib/asterisk|/usr/lib/asterisk|g' $(PKG_INSTALL_DIR)/etc/asterisk/musiconhold.conf
483
484 $(TARGET_CC) -O2 $(PKG_BUILD_DIR)/contrib/utils/rawplayer.c -o $(PKG_BUILD_DIR)/rawplayer
485 endef
486
487 define Build/InstallDev
488 mkdir -p $(1)/usr/include/asterisk/
489 $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk/*.h $(1)/usr/include/asterisk/
490 $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk.h $(1)/usr/include/
491 endef
492
493
494 define Package/asterisk14/conffiles
495 /etc/asterisk/agents.conf
496 /etc/asterisk/alarmreceiver.conf
497 /etc/asterisk/amd.conf
498 /etc/asterisk/asterisk.conf
499 /etc/asterisk/cdr.conf
500 /etc/asterisk/cdr_custom.conf
501 /etc/asterisk/cdr_manager.conf
502 /etc/asterisk/codecs.conf
503 /etc/asterisk/dnsmgr.conf
504 /etc/asterisk/enum.conf
505 /etc/asterisk/extconfig.conf
506 /etc/asterisk/extensions.ael
507 /etc/asterisk/extensions.conf
508 /etc/asterisk/features.conf
509 /etc/asterisk/followme.conf
510 /etc/asterisk/http.conf
511 /etc/asterisk/iax.conf
512 /etc/asterisk/iaxprov.conf
513 /etc/asterisk/indications.conf
514 /etc/asterisk/logger.conf
515 /etc/asterisk/manager.conf
516 /etc/asterisk/misdn.conf
517 /etc/asterisk/modules.conf
518 /etc/asterisk/musiconhold.conf
519 /etc/asterisk/muted.conf
520 /etc/asterisk/osp.conf
521 /etc/asterisk/privacy.conf
522 /etc/asterisk/queues.conf
523 /etc/asterisk/rtp.conf
524 /etc/asterisk/say.conf
525 /etc/asterisk/sip.conf
526 /etc/asterisk/sip_notify.conf
527 /etc/asterisk/sla.conf
528 /etc/asterisk/smdi.conf
529 /etc/asterisk/udptl.conf
530 /etc/asterisk/users.conf
531 endef
532
533 #define Package/asterisk14/postinst
534 ##!/bin/sh
535 #ROOT=`echo $${PKG_ROOT} | sed 's:[\/]:\\\&:g' -`
536 #/bin/sed -i 's/\ \/etc/\ '$${ROOT}'etc/g' $${PKG_ROOT}/etc/asterisk/asterisk.conf
537 #/bin/sed -i 's/\ \/var/\ '$${ROOT}'var/g' $${PKG_ROOT}/etc/asterisk/asterisk.conf
538 #/bin/sed -i 's/\ \/usr/\ '$${ROOT}'usr/g' $${PKG_ROOT}/etc/asterisk/asterisk.conf
539 #/bin/sed -i 's/^DEST=/DEST='$${ROOT}'/g' $${PKG_ROOT}/etc/init.d/asterisk
540 #/bin/sed -i 's/OPTIONS=\"\"/OPTIONS=\"-C\ '$${ROOT}'etc\/asterisk\/asterisk.conf\"/g' $${PKG_ROOT}/etc/default/asterisk
541 #endef
542
543 define Package/asterisk14/install
544 $(CP) $(PKG_INSTALL_DIR)/* $(1)
545 rm -rf $(1)/usr/sbin/astgenkey
546 rm -rf $(1)/usr/sbin/aelparse
547 rm -rf $(1)/usr/sbin/autosupport
548 rm -rf $(1)/usr/sbin/muted
549 rm -rf $(1)/usr/sbin/stereorize
550 rm -rf $(1)/usr/bin
551 rm -rf $(1)/usr/man
552 rm -rf $(1)/usr/include
553 rm -rf $(1)/var/spool/asterisk/meetme
554 rm -rf $(1)/var/spool/asterisk/voicemail
555 (cd $(1)/usr/lib/asterisk; \
556 rm -rf agi-bin; \
557 rm -rf images; \
558 rm -rf keys/*; \
559 rm -rf moh/*.wav; \
560 rm -rf sounds/*; \
561 cd modules; \
562 rm -rf *adsi* *festival* *modem* *oss* *phone* *intercom* \
563 *mp3* *nbscat* *sqlite* *mysql* *postgres* *pgsql* \
564 *voicemail* *speex* *flash* *page* *meetme* *zap* *jpeg* \
565 *snmp* \
566 chan_alsa.so \
567 chan_oss.so \
568 chan_gtalk.so \
569 chan_h323.so \
570 chan_mgcp.so \
571 chan_skinny.so \
572 {codec,format}_ilbc.so \
573 codec_lpc10.so \
574 pbx_dundi.so \
575 res_agi.so \
576 res_crypto.so \
577 res_jabber.so \
578 )
579 (cd $(1)/etc/asterisk; \
580 rm -f *odbc* *mysql* *postgres* *pgsql* *voicemail* \
581 *adsi* *oss* *alsa* *festival* *modem* *phone* \
582 *tds* *vofr* *rpt* *vpb* *snmp* \
583 *zapata* \
584 alsa.conf \
585 dundi.conf \
586 gtalk.conf \
587 h323.conf \
588 jabber.conf \
589 mgcp.conf \
590 skinny.conf \
591 )
592 $(INSTALL_DATA) ./files/modules.conf $(1)/etc/asterisk/
593 $(INSTALL_DIR) $(1)/etc/default
594 $(INSTALL_DATA) ./files/asterisk.default $(1)/etc/default/asterisk
595 $(INSTALL_DIR) $(1)/etc/init.d
596 $(INSTALL_BIN) ./files/asterisk.init $(1)/etc/init.d/asterisk
597 endef
598
599
600 define Package/asterisk14-mini/conffiles
601 /etc/asterisk/asterisk.conf
602 /etc/asterisk/enum.conf
603 /etc/asterisk/extconfig.conf
604 /etc/asterisk/extensions.conf
605 /etc/asterisk/features.conf
606 /etc/asterisk/http.conf
607 /etc/asterisk/iax.conf
608 /etc/asterisk/iaxprov.conf
609 /etc/asterisk/logger.conf
610 /etc/asterisk/manager.conf
611 /etc/asterisk/modules.conf
612 /etc/asterisk/musiconhold.conf
613 /etc/asterisk/rtp.conf
614 /etc/asterisk/sip.conf
615 /etc/asterisk/sip_notify.conf
616 /etc/asterisk/users.conf
617 endef
618
619 define Package/asterisk14-mini/install
620 $(INSTALL_DIR) $(1)/etc/asterisk
621 for f in asterisk enum extconfig extensions features http \
622 iax iaxprov logger manager modules musiconhold rtp \
623 sip sip_notify users; do \
624 $(CP) $(PKG_INSTALL_DIR)/etc/asterisk/$$$$f.conf $(1)/etc/asterisk/ ; \
625 done
626 $(INSTALL_DATA) ./files/modules.conf $(1)/etc/asterisk/
627 $(INSTALL_DIR) $(1)/usr/lib/asterisk
628 $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/firmware $(1)/usr/lib/asterisk/
629 $(INSTALL_DIR) $(1)/usr/lib/asterisk/keys
630 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
631 for f in app_dial chan_iax2 chan_local chan_sip codec_gsm \
632 codec_ulaw format_gsm format_pcm format_wav format_wav_gsm \
633 pbx_config res_features res_musiconhold; do \
634 $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/$$$$f.so $(1)/usr/lib/asterisk/modules/ ; \
635 done
636 $(INSTALL_DIR) $(1)/usr/lib/asterisk/moh
637 $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds
638 $(INSTALL_DIR) $(1)/usr/sbin
639 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/asterisk $(1)/usr/sbin/
640 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/safe_asterisk $(1)/usr/sbin/
641 $(INSTALL_DIR) $(1)/etc/default
642 $(INSTALL_DATA) ./files/asterisk.default $(1)/etc/default/asterisk
643 $(INSTALL_DIR) $(1)/etc/init.d
644 $(INSTALL_BIN) ./files/asterisk.init $(1)/etc/init.d/asterisk
645 endef
646
647
648 define Package/asterisk14-app-meetme/conffiles
649 /etc/asterisk/meetme.conf
650 endef
651
652 define Package/asterisk14-app-meetme/install
653 $(INSTALL_DIR) $(1)/etc/asterisk
654 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/meetme.conf $(1)/etc/asterisk/
655 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
656 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/app_meetme.so $(1)/usr/lib/asterisk/modules/
657 endef
658
659
660 define Package/asterisk14-chan-oss/conffiles
661 /etc/asterisk/oss.conf
662 endef
663
664 define Package/asterisk14-chan-oss/install
665 $(INSTALL_DIR) $(1)/etc/asterisk
666 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/oss.conf $(1)/etc/asterisk/
667 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
668 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_oss.so $(1)/usr/lib/asterisk/modules/
669 endef
670
671
672 define Package/asterisk14-app-meetme/conffiles
673 /etc/asterisk/meetme.conf
674 endef
675
676 define Package/asterisk14-app-meetme/install
677 $(INSTALL_DIR) $(1)/etc/asterisk
678 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/meetme.conf $(1)/etc/asterisk/
679 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
680 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/app_meetme.so $(1)/usr/lib/asterisk/modules/
681 endef
682
683
684 define Package/asterisk14-chan-oss/conffiles
685 /etc/asterisk/oss.conf
686 endef
687
688 define Package/asterisk14-chan-oss/install
689 $(INSTALL_DIR) $(1)/etc/asterisk
690 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/oss.conf $(1)/etc/asterisk/
691 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
692 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_oss.so $(1)/usr/lib/asterisk/modules/
693 endef
694
695
696 define Package/asterisk14-chan-alsa/conffiles
697 /etc/asterisk/alsa.conf
698 endef
699
700 define Package/asterisk14-chan-alsa/install
701 $(INSTALL_DIR) $(1)/etc/asterisk
702 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/alsa.conf $(1)/etc/asterisk/
703 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
704 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_alsa.so $(1)/usr/lib/asterisk/modules/
705 endef
706
707
708 define Package/asterisk14-chan-gtalk/conffiles
709 /etc/asterisk/gtalk.conf
710 /etc/asterisk/jabber.conf
711 endef
712
713 define Package/asterisk14-chan-gtalk/install
714 $(INSTALL_DIR) $(1)/etc/asterisk
715 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/gtalk.conf $(1)/etc/asterisk/
716 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/jabber.conf $(1)/etc/asterisk/
717 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
718 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_gtalk.so $(1)/usr/lib/asterisk/modules/
719 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_jabber.so $(1)/usr/lib/asterisk/modules/
720 endef
721
722
723 define Package/asterisk14-chan-h323/conffiles
724 /etc/asterisk/h323.conf
725 endef
726
727 define Package/asterisk14-chan-h323/install
728 $(INSTALL_DIR) $(1)/etc/asterisk
729 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/h323.conf $(1)/etc/asterisk/
730 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
731 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_h323.so $(1)/usr/lib/asterisk/modules/
732 endef
733
734
735 define Package/asterisk14-chan-mgcp/install
736 /etc/asterisk/mgcp.conf
737 endef
738
739 define Package/asterisk14-chan-mgcp/install
740 $(INSTALL_DIR) $(1)/etc/asterisk
741 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/mgcp.conf $(1)/etc/asterisk/
742 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
743 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_mgcp.so $(1)/usr/lib/asterisk/modules/
744 endef
745
746
747 define Package/asterisk14-chan-skinny/conffiles
748 /etc/asterisk/skinny.conf
749 endef
750
751 define Package/asterisk14-chan-skinny/install
752 $(INSTALL_DIR) $(1)/etc/asterisk
753 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/skinny.conf $(1)/etc/asterisk/
754 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
755 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_skinny.so $(1)/usr/lib/asterisk/modules/
756 endef
757
758
759 #define Package/asterisk14-codec-ilbc/install
760 # $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
761 # $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/codec_ilbc.so $(1)/usr/lib/asterisk/modules/
762 # $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/format_ilbc.so $(1)/usr/lib/asterisk/modules/
763 #endef
764
765
766 define Package/asterisk14-codec-lpc10/install
767 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
768 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/codec_lpc10.so $(1)/usr/lib/asterisk/modules/
769 endef
770
771
772 define Package/asterisk14-codec-speex/install
773 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
774 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/codec_speex.so $(1)/usr/lib/asterisk/modules/
775 endef
776
777
778 define Package/asterisk14-pbx-dundi/conffiles
779 /etc/asterisk/dundi.conf
780 endef
781
782 define Package/asterisk14-pbx-dundi/install
783 $(INSTALL_DIR) $(1)/etc/asterisk
784 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/dundi.conf $(1)/etc/asterisk/
785 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
786 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/pbx_dundi.so $(1)/usr/lib/asterisk/modules/
787 endef
788
789
790 define Package/asterisk14-res-agi/install
791 $(INSTALL_DIR) $(1)/usr/lib/asterisk/agi-bin
792 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
793 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_agi.so $(1)/usr/lib/asterisk/modules/
794 endef
795
796
797 define Package/asterisk14-res-crypto/install
798 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
799 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_crypto.so $(1)/usr/lib/asterisk/modules/
800 endef
801
802
803 define Package/asterisk14-pgsql/conffiles
804 /etc/asterisk/cdr_pgsql.conf
805 /etc/asterisk/res_pgsql.conf
806 endef
807
808 define Package/asterisk14-pgsql/install
809 $(INSTALL_DIR) $(1)/etc/asterisk
810 install -m0600 $(PKG_INSTALL_DIR)/etc/asterisk/cdr_pgsql.conf $(1)/etc/asterisk/
811 install -m0600 $(PKG_INSTALL_DIR)/etc/asterisk/res_pgsql.conf $(1)/etc/asterisk/
812 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
813 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/cdr_pgsql.so $(1)/usr/lib/asterisk/modules/
814 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_config_pgsql.so $(1)/usr/lib/asterisk/modules/
815 endef
816
817
818 define Package/asterisk14-sqlite/install
819 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
820 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/cdr_sqlite.so $(1)/usr/lib/asterisk/modules/
821 endef
822
823
824 define Package/asterisk14-sounds/install
825 $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds
826 $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/* $(1)/usr/lib/asterisk/sounds/
827 rm -f $(1)/usr/lib/asterisk/sounds/vm-*
828 rm -f $(1)/usr/lib/asterisk/sounds/x
829 endef
830
831
832 define Package/asterisk14-voicemail/conffiles
833 /etc/asterisk/voicemail.conf
834 endef
835
836 define Package/asterisk14-voicemail/install
837 $(INSTALL_DIR) $(1)/etc/asterisk
838 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/voicemail.conf $(1)/etc/asterisk/
839 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
840 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/*voicemail.so $(1)/usr/lib/asterisk/modules/
841 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_adsi.so $(1)/usr/lib/asterisk/modules/
842 $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds
843 $(CP) $(PKG_INSTALL_DIR)//usr/lib/asterisk/sounds/vm-*.gsm $(1)/usr/lib/asterisk/sounds/
844 endef
845
846 define Package/asterisk14-rawplayer/install
847 $(INSTALL_DIR) $(1)/usr/bin
848 $(INSTALL_BIN) $(PKG_BUILD_DIR)/rawplayer \
849 $(1)/usr/bin
850 endef
851
852
853 $(eval $(call BuildPackage,asterisk14))
854 $(eval $(call BuildPackage,asterisk14-mini))
855 $(eval $(call BuildPackage,asterisk14-app-meetme))
856 $(eval $(call BuildPackage,asterisk14-chan-oss))
857 $(eval $(call BuildPackage,asterisk14-chan-alsa))
858 $(eval $(call BuildPackage,asterisk14-chan-gtalk))
859 $(eval $(call BuildPackage,asterisk14-chan-h323))
860 $(eval $(call BuildPackage,asterisk14-chan-mgcp))
861 $(eval $(call BuildPackage,asterisk14-chan-skinny))
862 #$(eval $(call BuildPackage,asterisk14-codec-ilbc))
863 $(eval $(call BuildPackage,asterisk14-codec-lpc10))
864 $(eval $(call BuildPackage,asterisk14-codec-speex))
865 $(eval $(call BuildPackage,asterisk14-pbx-dundi))
866 $(eval $(call BuildPackage,asterisk14-res-agi))
867 $(eval $(call BuildPackage,asterisk14-res-crypto))
868 $(eval $(call BuildPackage,asterisk14-pgsql))
869 $(eval $(call BuildPackage,asterisk14-sqlite))
870 $(eval $(call BuildPackage,asterisk14-voicemail))
871 $(eval $(call BuildPackage,asterisk14-sounds))
872 $(eval $(call BuildPackage,asterisk14-rawplayer))