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