Rebuild the package if the selected modules have changed.
[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.11
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://ftp.digium.com/pub/asterisk/old-releases/
17 PKG_MD5SUM:=3ba9b399fedc68de4845b1c5603d167c
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:= +libltdl +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-chan-alsa
87 $(call Package/asterisk14/Default)
88 TITLE:=ALSA soundcards support
89 DEPENDS:= +asterisk14 +alsa-lib
90 endef
91
92 define Package/asterisk14-chan-alsa/description
93 $(call Package/asterisk14/Default/description)
94 This package provides the channel driver for ALSA sound cards support to
95 Asterisk.
96 endef
97
98
99 define Package/asterisk14-chan-gtalk
100 $(call Package/asterisk14/Default)
101 TITLE:=GTalk support
102 DEPENDS:= +asterisk14 +libiksemel
103 endef
104
105 define Package/asterisk14-chan-gtalk/description
106 $(call Package/asterisk14/Default/description)
107 This package provides the channel chan_gtalk and res_jabber for GTalk
108 support to Asterisk.
109 endef
110
111
112 define Package/asterisk14-chan-h323
113 $(call Package/asterisk14/Default)
114 TITLE:=H.323 support for Asterisk
115 DEPENDS:= +asterisk14 +uclibcxx
116 endef
117
118 define Package/asterisk14-chan-h323/description
119 $(call Package/asterisk14/Default/description)
120 This package provides H.323 support to Asterisk.
121 endef
122
123
124 define Package/asterisk14-chan-mgcp
125 $(call Package/asterisk14/Default)
126 TITLE:=MGCP support
127 DEPENDS:= +asterisk14
128 endef
129
130 define Package/asterisk14-chan-mgcp/description
131 $(call Package/asterisk14/Default/description)
132 This package provides MGCP (Media Gateway Control Protocol) support \\\
133 to Asterisk.
134 endef
135
136
137 define Package/asterisk14-chan-skinny
138 $(call Package/asterisk14/Default)
139 TITLE:=Skinny Client Control Protocol support
140 DEPENDS:= +asterisk14
141 endef
142
143 define Package/asterisk14-chan-skinny/description
144 $(call Package/asterisk14/Default/description)
145 This package provided Skinny Client Control Protocol support to \\\
146 Asterisk.
147 endef
148
149
150 define Package/asterisk14-codec-ilbc
151 $(call Package/asterisk14/Default)
152 TITLE:=ILBC Translator
153 DEPENDS:= +asterisk14
154 endef
155
156 define Package/asterisk14-codec-ilbc/description
157 $(call Package/asterisk14/Default/description)
158 This package contains the ILBC (Internet Low Bitrate Codec) translator
159 for Asterisk.
160 endef
161
162
163 define Package/asterisk14-codec-lpc10
164 $(call Package/asterisk14/Default)
165 TITLE:=LPC10 2.4kbps voice codec Translator
166 DEPENDS:= +asterisk14
167 endef
168
169 define Package/asterisk14-chan-lpc10/description
170 $(call Package/asterisk14/Default/description)
171 This package contains the LPC10 (Linear Predictor Code) 2.4kbps voice
172 codec translator for Asterisk.
173 endef
174
175
176 define Package/asterisk14-codec-speex
177 $(call Package/asterisk14/Default)
178 TITLE:=Speex/PCM16 Codec Translator
179 DEPENDS:= +asterisk14 +libspeex
180 endef
181
182 define Package/asterisk14-chan-speex/description
183 $(call Package/asterisk14/Default/description)
184 This package contains the Speex speech compression codec translator for
185 Asterisk.
186 endef
187
188
189 define Package/asterisk14-pbx-dundi
190 $(call Package/asterisk14/Default)
191 TITLE:=DUNDi support
192 DEPENDS:= +asterisk14
193 endef
194
195 define Package/asterisk14-pbx-dundi/description
196 $(call Package/asterisk14/Default/description)
197 This package provides DUNDi (Distributed Universal Number Discovery)
198 support to Asterisk.
199 endef
200
201
202 define Package/asterisk14-res-agi
203 $(call Package/asterisk14/Default)
204 TITLE:=AGI support
205 DEPENDS:= +asterisk14
206 endef
207
208 define Package/asterisk14-res-agi/description
209 $(call Package/asterisk14/Default/description)
210 This package provides AGI (Asterisk Gateway Interface) support to
211 Asterisk.
212 endef
213
214
215 define Package/asterisk14-res-crypto
216 $(call Package/asterisk14/Default)
217 TITLE:=Cryptographic Digital Signatures support
218 DEPENDS:= +asterisk14 +libopenssl
219 endef
220
221 define Package/asterisk14-res-crypto/description
222 $(call Package/asterisk14/Default/description)
223 This package provides Cryptographic Digital Signatures support to
224 Asterisk.
225 endef
226
227
228 define Package/asterisk14-pgsql
229 $(call Package/asterisk14/Default)
230 TITLE:=PostgreSQL support
231 DEPENDS:= +asterisk14 +libpq
232 endef
233
234 define Package/asterisk14-pgsql/description
235 $(call Package/asterisk14/Default/description)
236 This package contains PostgreSQL support modules for Asterisk.
237 endef
238
239
240 define Package/asterisk14-sqlite
241 $(call Package/asterisk14/Default)
242 TITLE:=SQLite modules
243 DEPENDS:= +asterisk14 +libsqlite2
244 endef
245
246 define Package/asterisk14-sqlite/description
247 $(call Package/asterisk14/Default/description)
248 This package contains SQLite support modules for Asterisk.
249 endef
250
251
252 define Package/asterisk14-sounds
253 $(call Package/asterisk14/Default)
254 TITLE:=Sound files
255 DEPENDS:= +asterisk14
256 endef
257
258 define Package/asterisk14-sounds/description
259 $(call Package/asterisk14/Default/description)
260 This package contains sound files for Asterisk.
261 endef
262
263
264 define Package/asterisk14-voicemail
265 $(call Package/asterisk14/Default)
266 TITLE:=Voicemail support
267 DEPENDS:= +asterisk14
268 endef
269
270 define Package/asterisk14-voicemail/description
271 $(call Package/asterisk14/Default/description)
272 This package contains voicemail related modules for Asterisk.
273 endef
274
275
276 CONFIGURE_ARGS+= \
277 --without-curl \
278 --without-curses \
279 --without-gsm \
280 --without-imap \
281 --without-isdnnet \
282 --without-kde \
283 --with-ltdl="$(STAGING_DIR)/usr" \
284 --without-misdn \
285 --without-nbs \
286 --with-ncurses="$(STAGING_DIR)/usr" \
287 --without-netsnmp \
288 --without-newt \
289 --without-odbc \
290 --without-ogg \
291 --without-osptk \
292 --without-oss \
293 --with-popt="$(STAGING_DIR)/usr" \
294 --without-pri \
295 --without-qt \
296 --without-radius \
297 --without-spandsp \
298 --without-suppserv \
299 --without-tds \
300 --without-termcap \
301 --without-tinfo \
302 --without-tonezone \
303 --without-vorbis \
304 --without-vpb \
305 --with-z="$(STAGING_DIR)/usr" \
306 --without-zaptel \
307
308 EXTRA_CFLAGS:= $(TARGET_CPPFLAGS)
309 EXTRA_LDFLAGS:= $(TARGET_LDFLAGS)
310
311 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk14-chan-alsa),)
312 CONFIGURE_ARGS+= \
313 --with-asound="$(STAGING_DIR)/usr"
314 else
315 CONFIGURE_ARGS+= \
316 --without-asound
317 endif
318
319 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk14-chan-gtalk),)
320 CONFIGURE_ARGS+= \
321 --with-gnutls="$(STAGING_DIR)/usr" \
322 --with-iksemel="$(STAGING_DIR)/usr"
323 SITE_VARS+= \
324 ac_cv_lib_iksemel_iks_start_sasl=yes \
325 ac_cv_lib_gnutls_gnutls_bye=yes
326 else
327 CONFIGURE_ARGS+= \
328 --without-gnutls \
329 --without-iksemel
330 endif
331
332 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk14-chan-h323),)
333 CONFIGURE_ARGS+= \
334 --with-h323="$(BUILD_DIR)/openh323" \
335 --with-pwlib="$(BUILD_DIR)/pwlib"
336 CONFIGURE_VARS+= \
337 LIBS="$$$$LIBS -luClibc++ -ldl -lpthread"
338
339 define Build/Compile/chan-h323
340 $(MAKE) -C "$(PKG_BUILD_DIR)/channels/h323" \
341 $(TARGET_CONFIGURE_OPTS) \
342 CXXLIBS="-nodefaultlibs -luClibc++" \
343 optnoshared
344 endef
345 else
346 CONFIGURE_ARGS+= \
347 --without-h323 \
348 --without-pwlib
349 endif
350
351 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk14-codec-speex),)
352 CONFIGURE_ARGS+= \
353 --with-speex="$(STAGING_DIR)/usr"
354 SITE_VARS+= \
355 ac_cv_lib_speex_speex_encode=yes
356 EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/include/speex
357 else
358 CONFIGURE_ARGS+= \
359 --without-speex
360 endif
361
362 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk14-res-crypto),)
363 CONFIGURE_ARGS+= \
364 --with-ssl="$(STAGING_DIR)/usr"
365 else
366 CONFIGURE_ARGS+= \
367 --without-ssl
368 endif
369
370 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk14-pgsql),)
371 CONFIGURE_ARGS+= \
372 --with-postgres="$(STAGING_DIR)/usr"
373 else
374 CONFIGURE_ARGS+= \
375 --without-postgres
376 endif
377
378 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk14-sqlite),)
379 CONFIGURE_ARGS+= \
380 --with-sqlite="$(STAGING_DIR)/usr"
381 else
382 CONFIGURE_ARGS+= \
383 --without-sqlite
384 endif
385
386
387 define Build/Configure
388 ( cd $(PKG_BUILD_DIR); ./bootstrap.sh )
389 $(call Build/Configure/Default,,$(SITE_VARS))
390 endef
391
392 define Build/Compile
393 $(MAKE) -C "$(PKG_BUILD_DIR)" \
394 include/asterisk/version.h \
395 include/asterisk/buildopts.h defaults.h \
396 makeopts.embed_rules
397 $(call Build/Compile/chan-h323)
398 ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY $(TARGET_CFLAGS)" \
399 ASTLDFLAGS="$(EXTRA_LDFLAGS)" \
400 $(MAKE) -C "$(PKG_BUILD_DIR)" \
401 ASTVARLIBDIR="/usr/lib/asterisk" \
402 NOISY_BUILD="1" \
403 DEBUG="" \
404 OPTIMIZE="" \
405 DESTDIR="$(PKG_INSTALL_DIR)" \
406 all install samples
407 $(SED) 's|/var/lib/asterisk|/usr/lib/asterisk|g' $(PKG_INSTALL_DIR)/etc/asterisk/musiconhold.conf
408 endef
409
410 define Build/InstallDev
411 mkdir -p $(1)/usr/include/asterisk/
412 $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk/*.h $(1)/usr/include/asterisk/
413 $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk.h $(1)/usr/include/
414 endef
415
416
417 define Package/asterisk14/conffiles
418 /etc/asterisk/agents.conf
419 /etc/asterisk/alarmreceiver.conf
420 /etc/asterisk/amd.conf
421 /etc/asterisk/asterisk.conf
422 /etc/asterisk/cdr.conf
423 /etc/asterisk/cdr_custom.conf
424 /etc/asterisk/cdr_manager.conf
425 /etc/asterisk/codecs.conf
426 /etc/asterisk/dnsmgr.conf
427 /etc/asterisk/enum.conf
428 /etc/asterisk/extconfig.conf
429 /etc/asterisk/extensions.ael
430 /etc/asterisk/extensions.conf
431 /etc/asterisk/features.conf
432 /etc/asterisk/followme.conf
433 /etc/asterisk/http.conf
434 /etc/asterisk/iax.conf
435 /etc/asterisk/iaxprov.conf
436 /etc/asterisk/indications.conf
437 /etc/asterisk/logger.conf
438 /etc/asterisk/manager.conf
439 /etc/asterisk/misdn.conf
440 /etc/asterisk/modules.conf
441 /etc/asterisk/musiconhold.conf
442 /etc/asterisk/muted.conf
443 /etc/asterisk/osp.conf
444 /etc/asterisk/privacy.conf
445 /etc/asterisk/queues.conf
446 /etc/asterisk/rtp.conf
447 /etc/asterisk/say.conf
448 /etc/asterisk/sip.conf
449 /etc/asterisk/sip_notify.conf
450 /etc/asterisk/sla.conf
451 /etc/asterisk/smdi.conf
452 /etc/asterisk/udptl.conf
453 /etc/asterisk/users.conf
454 endef
455
456 define Package/asterisk14/postinst
457 #!/bin/sh
458 ROOT=`echo $${PKG_ROOT} | sed 's:[\/]:\\\&:g' -`
459 /bin/sed -i 's/\ \/etc/\ '$${ROOT}'etc/g' $${PKG_ROOT}/etc/asterisk/asterisk.conf
460 /bin/sed -i 's/\ \/var/\ '$${ROOT}'var/g' $${PKG_ROOT}/etc/asterisk/asterisk.conf
461 /bin/sed -i 's/\ \/usr/\ '$${ROOT}'usr/g' $${PKG_ROOT}/etc/asterisk/asterisk.conf
462 /bin/sed -i 's/^DEST=/DEST='$${ROOT}'/g' $${PKG_ROOT}/etc/init.d/asterisk
463 /bin/sed -i 's/OPTIONS=\"\"/OPTIONS=\"-C\ '$${ROOT}'etc\/asterisk\/asterisk.conf\"/g' $${PKG_ROOT}/etc/default/asterisk
464 endef
465
466 define Package/asterisk14/install
467 $(CP) $(PKG_INSTALL_DIR)/* $(1)
468 rm -rf $(1)/usr/sbin/astgenkey
469 rm -rf $(1)/usr/sbin/aelparse
470 rm -rf $(1)/usr/sbin/autosupport
471 rm -rf $(1)/usr/sbin/muted
472 rm -rf $(1)/usr/sbin/stereorize
473 rm -rf $(1)/usr/bin
474 rm -rf $(1)/usr/man
475 rm -rf $(1)/usr/include
476 rm -rf $(1)/var/spool/asterisk/meetme
477 rm -rf $(1)/var/spool/asterisk/voicemail
478 (cd $(1)/usr/lib/asterisk; \
479 rm -rf agi-bin; \
480 rm -rf images; \
481 rm -rf keys/*; \
482 rm -rf moh/*.wav; \
483 rm -rf sounds/*; \
484 cd modules; \
485 rm -rf *adsi* *festival* *modem* *oss* *phone* *intercom* \
486 *mp3* *nbscat* *sqlite* *mysql* *postgres* *pgsql* \
487 *voicemail* *speex* *flash* *page* *zap* *jpeg* \
488 *snmp* \
489 chan_alsa.so \
490 chan_gtalk.so \
491 chan_h323.so \
492 chan_mgcp.so \
493 chan_skinny.so \
494 {codec,format}_ilbc.so \
495 codec_lpc10.so \
496 pbx_dundi.so \
497 res_agi.so \
498 res_crypto.so \
499 res_jabber.so \
500 )
501 (cd $(1)/etc/asterisk; \
502 rm -f *odbc* *mysql* *postgres* *pgsql* *voicemail* \
503 *adsi* *oss* *alsa* *festival* *modem* *phone* \
504 *tds* *vofr* *rpt* *vpb* *snmp* \
505 *zapata* \
506 alsa.conf \
507 dundi.conf \
508 gtalk.conf \
509 h323.conf \
510 jabber.conf \
511 mgcp.conf \
512 skinny.conf \
513 )
514 $(INSTALL_DATA) ./files/modules.conf $(1)/etc/asterisk/
515 $(INSTALL_DIR) $(1)/etc/default
516 $(INSTALL_DATA) ./files/asterisk.default $(1)/etc/default/asterisk
517 $(INSTALL_DIR) $(1)/etc/init.d
518 $(INSTALL_BIN) ./files/asterisk.init $(1)/etc/init.d/asterisk
519 endef
520
521
522 define Package/asterisk14-mini/conffiles
523 /etc/asterisk/asterisk.conf
524 /etc/asterisk/enum.conf
525 /etc/asterisk/extconfig.conf
526 /etc/asterisk/extensions.conf
527 /etc/asterisk/features.conf
528 /etc/asterisk/http.conf
529 /etc/asterisk/iax.conf
530 /etc/asterisk/iaxprov.conf
531 /etc/asterisk/logger.conf
532 /etc/asterisk/manager.conf
533 /etc/asterisk/modules.conf
534 /etc/asterisk/musiconhold.conf
535 /etc/asterisk/rtp.conf
536 /etc/asterisk/sip.conf
537 /etc/asterisk/sip_notify.conf
538 /etc/asterisk/users.conf
539 endef
540
541 define Package/asterisk14-mini/install
542 $(INSTALL_DIR) $(1)/etc/asterisk
543 for f in asterisk enum extconfig extensions features http \
544 iax iaxprov logger manager modules musiconhold rtp \
545 sip sip_notify users; do \
546 $(CP) $(PKG_INSTALL_DIR)/etc/asterisk/$$$$f.conf $(1)/etc/asterisk/ ; \
547 done
548 $(INSTALL_DATA) ./files/modules.conf $(1)/etc/asterisk/
549 $(INSTALL_DIR) $(1)/usr/lib/asterisk
550 $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/firmware $(1)/usr/lib/asterisk/
551 $(INSTALL_DIR) $(1)/usr/lib/asterisk/keys
552 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
553 for f in app_dial chan_iax2 chan_local chan_sip codec_gsm \
554 codec_ulaw format_gsm format_pcm format_wav format_wav_gsm \
555 pbx_config res_features res_musiconhold; do \
556 $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/$$$$f.so $(1)/usr/lib/asterisk/modules/ ; \
557 done
558 $(INSTALL_DIR) $(1)/usr/lib/asterisk/moh
559 $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds
560 $(INSTALL_DIR) $(1)/usr/sbin
561 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/asterisk $(1)/usr/sbin/
562 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/safe_asterisk $(1)/usr/sbin/
563 $(INSTALL_DIR) $(1)/etc/default
564 $(INSTALL_DATA) ./files/asterisk.default $(1)/etc/default/asterisk
565 $(INSTALL_DIR) $(1)/etc/init.d
566 $(INSTALL_BIN) ./files/asterisk.init $(1)/etc/init.d/asterisk
567 endef
568
569
570 define Package/asterisk14-chan-alsa/conffiles
571 /etc/asterisk/alsa.conf
572 endef
573
574 define Package/asterisk14-chan-alsa/install
575 $(INSTALL_DIR) $(1)/etc/asterisk
576 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/alsa.conf $(1)/etc/asterisk/
577 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
578 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_alsa.so $(1)/usr/lib/asterisk/modules/
579 endef
580
581
582 define Package/asterisk14-chan-gtalk/conffiles
583 /etc/asterisk/gtalk.conf
584 /etc/asterisk/jabber.conf
585 endef
586
587 define Package/asterisk14-chan-gtalk/install
588 $(INSTALL_DIR) $(1)/etc/asterisk
589 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/gtalk.conf $(1)/etc/asterisk/
590 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/jabber.conf $(1)/etc/asterisk/
591 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
592 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_gtalk.so $(1)/usr/lib/asterisk/modules/
593 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_jabber.so $(1)/usr/lib/asterisk/modules/
594 endef
595
596
597 define Package/asterisk14-chan-h323/conffiles
598 /etc/asterisk/h323.conf
599 endef
600
601 define Package/asterisk14-chan-h323/install
602 $(INSTALL_DIR) $(1)/etc/asterisk
603 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/h323.conf $(1)/etc/asterisk/
604 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
605 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_h323.so $(1)/usr/lib/asterisk/modules/
606 endef
607
608
609 define Package/asterisk14-chan-mgcp/install
610 /etc/asterisk/mgcp.conf
611 endef
612
613 define Package/asterisk14-chan-mgcp/install
614 $(INSTALL_DIR) $(1)/etc/asterisk
615 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/mgcp.conf $(1)/etc/asterisk/
616 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
617 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_mgcp.so $(1)/usr/lib/asterisk/modules/
618 endef
619
620
621 define Package/asterisk14-chan-skinny/conffiles
622 /etc/asterisk/skinny.conf
623 endef
624
625 define Package/asterisk14-chan-skinny/install
626 $(INSTALL_DIR) $(1)/etc/asterisk
627 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/skinny.conf $(1)/etc/asterisk/
628 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
629 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_skinny.so $(1)/usr/lib/asterisk/modules/
630 endef
631
632
633 define Package/asterisk14-codec-ilbc/install
634 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
635 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/codec_ilbc.so $(1)/usr/lib/asterisk/modules/
636 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/format_ilbc.so $(1)/usr/lib/asterisk/modules/
637 endef
638
639
640 define Package/asterisk14-codec-lpc10/install
641 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
642 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/codec_lpc10.so $(1)/usr/lib/asterisk/modules/
643 endef
644
645
646 define Package/asterisk14-codec-speex/install
647 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
648 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/codec_speex.so $(1)/usr/lib/asterisk/modules/
649 endef
650
651
652 define Package/asterisk14-pbx-dundi/conffiles
653 /etc/asterisk/dundi.conf
654 endef
655
656 define Package/asterisk14-pbx-dundi/install
657 $(INSTALL_DIR) $(1)/etc/asterisk
658 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/dundi.conf $(1)/etc/asterisk/
659 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
660 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/pbx_dundi.so $(1)/usr/lib/asterisk/modules/
661 endef
662
663
664 define Package/asterisk14-res-agi/install
665 $(INSTALL_DIR) $(1)/usr/lib/asterisk/agi-bin
666 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
667 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_agi.so $(1)/usr/lib/asterisk/modules/
668 endef
669
670
671 define Package/asterisk14-res-crypto/install
672 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
673 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_crypto.so $(1)/usr/lib/asterisk/modules/
674 endef
675
676
677 define Package/asterisk14-pgsql/conffiles
678 /etc/asterisk/cdr_pgsql.conf
679 /etc/asterisk/res_pgsql.conf
680 endef
681
682 define Package/asterisk14-pgsql/install
683 $(INSTALL_DIR) $(1)/etc/asterisk
684 install -m0600 $(PKG_INSTALL_DIR)/etc/asterisk/cdr_pgsql.conf $(1)/etc/asterisk/
685 install -m0600 $(PKG_INSTALL_DIR)/etc/asterisk/res_pgsql.conf $(1)/etc/asterisk/
686 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
687 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/cdr_pgsql.so $(1)/usr/lib/asterisk/modules/
688 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_config_pgsql.so $(1)/usr/lib/asterisk/modules/
689 endef
690
691
692 define Package/asterisk14-sqlite/install
693 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
694 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/cdr_sqlite.so $(1)/usr/lib/asterisk/modules/
695 endef
696
697
698 define Package/asterisk14-sounds/install
699 $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds
700 $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/* $(1)/usr/lib/asterisk/sounds/
701 rm -f $(1)/usr/lib/asterisk/sounds/vm-*
702 rm -f $(1)/usr/lib/asterisk/sounds/x
703 endef
704
705
706 define Package/asterisk14-voicemail/conffiles
707 /etc/asterisk/voicemail.conf
708 endef
709
710 define Package/asterisk14-voicemail/install
711 $(INSTALL_DIR) $(1)/etc/asterisk
712 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/voicemail.conf $(1)/etc/asterisk/
713 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
714 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/*voicemail.so $(1)/usr/lib/asterisk/modules/
715 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_adsi.so $(1)/usr/lib/asterisk/modules/
716 $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds
717 $(CP) $(PKG_INSTALL_DIR)//usr/lib/asterisk/sounds/vm-*.gsm $(1)/usr/lib/asterisk/sounds/
718 endef
719
720
721 $(eval $(call BuildPackage,asterisk14))
722 $(eval $(call BuildPackage,asterisk14-mini))
723 $(eval $(call BuildPackage,asterisk14-chan-alsa))
724 $(eval $(call BuildPackage,asterisk14-chan-gtalk))
725 $(eval $(call BuildPackage,asterisk14-chan-h323))
726 $(eval $(call BuildPackage,asterisk14-chan-mgcp))
727 $(eval $(call BuildPackage,asterisk14-chan-skinny))
728 $(eval $(call BuildPackage,asterisk14-codec-ilbc))
729 $(eval $(call BuildPackage,asterisk14-codec-lpc10))
730 $(eval $(call BuildPackage,asterisk14-codec-speex))
731 $(eval $(call BuildPackage,asterisk14-pbx-dundi))
732 $(eval $(call BuildPackage,asterisk14-res-agi))
733 $(eval $(call BuildPackage,asterisk14-res-crypto))
734 $(eval $(call BuildPackage,asterisk14-pgsql))
735 $(eval $(call BuildPackage,asterisk14-sqlite))
736 $(eval $(call BuildPackage,asterisk14-voicemail))
737 $(eval $(call BuildPackage,asterisk14-sounds))