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