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