[packages] nzbget: fix compilation against OpenSSL v1.x (#8893)
[packages.git] / net / asterisk-1.4.x / Makefile
1 #
2 # Copyright (C) 2007-2010 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:=asterisk14
11 PKG_VERSION:=1.4.25.1
12 PKG_RELEASE:=3
13
14 PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://downloads.digium.com/pub/asterisk/releases/
16 PKG_MD5SUM:=ca17be11559eb939ea16b8de98ddeefb
17
18 PKG_BUILD_DIR=$(BUILD_DIR)/asterisk-$(PKG_VERSION)
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   MAINTAINER:=Hans Zandbelt <hans.zandbelt@gmail.com>
42 endef
43
44 define Package/asterisk14/Default/description
45  Asterisk is a complete PBX in software. It provides all of the features
46  you would expect from a PBX and more. Asterisk does voice over IP in three
47  protocols, and can interoperate with almost all standards-based telephony
48  equipment using relatively inexpensive hardware.
49 endef
50
51
52 define Package/asterisk14
53 $(call Package/asterisk14/Default)
54   TITLE:=Complete open source PBX
55   DEPENDS:= +libncurses +libpopt +libpthread @!TARGET_avr32
56 endef
57
58 define Package/asterisk14/description
59 $(call Package/asterisk14/Default/description)
60 endef
61
62
63 define Package/asterisk14-mini
64 $(call Package/asterisk14/Default)
65   TITLE:=Minimal open source PBX
66   DEPENDS:=+libncurses +libpopt +libpthread @!TARGET_avr32
67 endef
68
69 define Package/asterisk14-mini/description
70 $(call Package/asterisk14/Default/description)
71  This package contains only the following modules:
72  - app_dial
73  - chan_iax2
74  - chan_local
75  - chan_sip
76  - codec_gsm
77  - codec_ulaw
78  - format_gsm
79  - format_pcm
80  - format_wav
81  - format_wav_gsm
82  - pbx_config
83  - res_features
84  - res_musiconhold
85 endef
86
87
88 define Package/asterisk14-app-meetme
89 $(call Package/asterisk14/Default)
90   TITLE:=conferencing support
91   DEPENDS:= +asterisk14 +zaptel14-libtonezone
92 endef
93
94 define Package/asterisk14-app-meetme/description
95 $(call Package/asterisk14/Default/description)
96  This package provides the MeetMe application driver Conferencing support to 
97  Asterisk.
98 endef
99
100
101 define Package/asterisk14-chan-oss
102 $(call Package/asterisk14/Default)
103   TITLE:=OSS soundcards support
104   DEPENDS:= +asterisk14
105 endef
106
107 define Package/asterisk14-chan-oss/description
108 $(call Package/asterisk14/Default/description)
109  This package provides the channel driver for OSS sound cards support to 
110  Asterisk.
111 endef
112
113
114 define Package/asterisk14-app-meetme
115 $(call Package/asterisk14/Default)
116   TITLE:=conferencing support
117   DEPENDS:= +asterisk14 +zaptel14-libtonezone
118 endef
119
120 define Package/asterisk14-app-meetme/description
121 $(call Package/asterisk14/Default/description)
122  This package provides the MeetMe application driver Conferencing support to 
123  Asterisk.
124 endef
125
126
127 define Package/asterisk14-chan-oss
128 $(call Package/asterisk14/Default)
129   TITLE:=OSS soundcards support
130   DEPENDS:= +asterisk14
131 endef
132
133 define Package/asterisk14-chan-oss/description
134 $(call Package/asterisk14/Default/description)
135  This package provides the channel driver for OSS sound cards support to 
136  Asterisk.
137 endef
138
139
140 define Package/asterisk14-chan-alsa
141 $(call Package/asterisk14/Default)
142   TITLE:=ALSA soundcards support
143   DEPENDS:= +asterisk14 +alsa-lib
144 endef
145
146 define Package/asterisk14-chan-alsa/description
147 $(call Package/asterisk14/Default/description)
148  This package provides the channel driver for ALSA sound cards support to 
149  Asterisk.
150 endef
151
152
153 define Package/asterisk14-chan-gtalk
154 $(call Package/asterisk14/Default)
155   TITLE:=GTalk support
156   DEPENDS:= +asterisk14 +libiksemel
157 endef
158
159 define Package/asterisk14-chan-gtalk/description
160 $(call Package/asterisk14/Default/description)
161  This package provides the channel chan_gtalk and res_jabber for GTalk 
162  support to Asterisk.
163 endef
164
165
166 define Package/asterisk14-chan-h323
167 $(call Package/asterisk14/Default)
168   TITLE:=H.323 support for Asterisk
169   DEPENDS:= +asterisk14 +uclibcxx
170 endef
171
172 define Package/asterisk14-chan-h323/description
173 $(call Package/asterisk14/Default/description)
174  This package provides H.323 support to Asterisk.
175 endef
176
177
178 define Package/asterisk14-chan-mgcp
179 $(call Package/asterisk14/Default)
180   TITLE:=MGCP support
181   DEPENDS:= +asterisk14
182 endef
183
184 define Package/asterisk14-chan-mgcp/description
185 $(call Package/asterisk14/Default/description)
186  This package provides MGCP (Media Gateway Control Protocol) support \\\
187  to Asterisk.
188 endef
189
190
191 define Package/asterisk14-chan-skinny
192 $(call Package/asterisk14/Default)
193   TITLE:=Skinny Client Control Protocol support
194   DEPENDS:= +asterisk14
195 endef
196
197 define Package/asterisk14-chan-skinny/description
198 $(call Package/asterisk14/Default/description)
199  This package provided Skinny Client Control Protocol support to \\\
200  Asterisk.
201 endef
202
203
204 #define Package/asterisk14-codec-ilbc
205 #$(call Package/asterisk14/Default)
206 #  TITLE:=ILBC Translator
207 #  DEPENDS:= +asterisk14
208 #endef
209
210 #define Package/asterisk14-codec-ilbc/description
211 #$(call Package/asterisk14/Default/description)
212 # This package contains the ILBC (Internet Low Bitrate Codec) translator 
213 # for Asterisk.
214 #endef
215
216
217 define Package/asterisk14-codec-lpc10
218 $(call Package/asterisk14/Default)
219   TITLE:=LPC10 2.4kbps voice codec Translator
220   DEPENDS:= +asterisk14
221 endef
222
223 define Package/asterisk14-chan-lpc10/description
224 $(call Package/asterisk14/Default/description)
225  This package contains the LPC10 (Linear Predictor Code) 2.4kbps voice 
226  codec translator for Asterisk.
227 endef
228
229
230 define Package/asterisk14-codec-speex
231 $(call Package/asterisk14/Default)
232   TITLE:=Speex/PCM16 Codec Translator
233   DEPENDS:= +asterisk14 +libspeex +libspeexdsp
234 endef
235
236 define Package/asterisk14-chan-speex/description
237 $(call Package/asterisk14/Default/description)
238  This package contains the Speex speech compression codec translator for 
239  Asterisk.
240 endef
241
242
243 define Package/asterisk14-pbx-dundi
244 $(call Package/asterisk14/Default)
245   TITLE:=DUNDi support
246   DEPENDS:= +asterisk14
247 endef
248
249 define Package/asterisk14-pbx-dundi/description
250 $(call Package/asterisk14/Default/description)
251  This package provides DUNDi (Distributed Universal Number Discovery) 
252  support to Asterisk.
253 endef
254
255
256 define Package/asterisk14-res-agi
257 $(call Package/asterisk14/Default)
258   TITLE:=AGI support
259   DEPENDS:= +asterisk14
260 endef
261
262 define Package/asterisk14-res-agi/description
263 $(call Package/asterisk14/Default/description)
264  This package provides AGI (Asterisk Gateway Interface) support to 
265  Asterisk.
266 endef
267
268
269 define Package/asterisk14-res-crypto
270 $(call Package/asterisk14/Default)
271   TITLE:=Cryptographic Digital Signatures support
272   DEPENDS:= +asterisk14 +libopenssl
273 endef
274
275 define Package/asterisk14-res-crypto/description
276 $(call Package/asterisk14/Default/description)
277  This package provides Cryptographic Digital Signatures support to 
278  Asterisk.
279 endef
280
281
282 define Package/asterisk14-pgsql
283 $(call Package/asterisk14/Default)
284   TITLE:=PostgreSQL support
285   DEPENDS:= +asterisk14 +libpq
286 endef
287
288 define Package/asterisk14-pgsql/description
289 $(call Package/asterisk14/Default/description)
290  This package contains PostgreSQL support modules for Asterisk.
291 endef
292
293
294 define Package/asterisk14-sqlite
295 $(call Package/asterisk14/Default)
296   TITLE:=SQLite modules
297   DEPENDS:= +asterisk14 +libsqlite2
298 endef
299
300 define Package/asterisk14-sqlite/description
301 $(call Package/asterisk14/Default/description)
302  This package contains SQLite support modules for Asterisk.
303 endef
304
305
306 define Package/asterisk14-sounds
307 $(call Package/asterisk14/Default)
308   TITLE:=Sound files
309   DEPENDS:= +asterisk14
310 endef
311
312 define Package/asterisk14-sounds/description
313 $(call Package/asterisk14/Default/description)
314  This package contains sound files for Asterisk.
315 endef
316
317
318 define Package/asterisk14-voicemail
319 $(call Package/asterisk14/Default)
320   TITLE:=Voicemail support
321   DEPENDS:= +asterisk14
322 endef
323
324 define Package/asterisk14-voicemail/description
325 $(call Package/asterisk14/Default/description)
326  This package contains voicemail related modules for Asterisk.
327 endef
328
329 define Package/asterisk14-rawplayer
330 $(call Package/asterisk14/Default)
331   TITLE:=Play raw files for asterisk
332 endef
333
334 define Package/asterisk14-rawplayer/description
335  Contains the rawplayer utility for asterisk
336 endef
337
338
339 CONFIGURE_ARGS+= \
340         --without-curl \
341         --without-curses \
342         --with-gsm="internal" \
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         $(INSTALL_DIR) $(1)/usr/include/asterisk-1.4/include/asterisk/
490         $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk/*.h $(1)/usr/include/asterisk-1.4/include/asterisk/
491         $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk.h $(1)/usr/include/asterisk-1.4/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
555         (cd $(1)/usr/lib/asterisk; \
556                 rm -rf agi-bin; \
557                 rm -rf images; \
558                 rm -rf keys/*; \
559                 rm -rf moh/*.wav; \
560                 rm -rf sounds/*; \
561                 cd modules; \
562                 rm -rf  *adsi* *festival* *modem* *oss* *phone* *intercom* \
563                         *mp3* *nbscat* *sqlite* *mysql* *postgres* *pgsql* \
564                         *voicemail* *speex* *flash* *page* *meetme* *zap* *jpeg* \
565                         *snmp* \
566                         chan_alsa.so \
567                         chan_oss.so \
568                         chan_gtalk.so \
569                         chan_h323.so \
570                         chan_mgcp.so \
571                         chan_skinny.so \
572                         {codec,format}_ilbc.so \
573                         codec_lpc10.so \
574                         pbx_dundi.so \
575                         res_agi.so \
576                         res_crypto.so \
577                         res_jabber.so \
578         )
579         (cd $(1)/etc/asterisk; \
580                 rm -f   *odbc* *mysql* *postgres* *pgsql* *voicemail* \
581                         *adsi* *oss* *alsa* *festival* *modem* *phone* \
582                         *tds* *vofr* *rpt* *vpb* *snmp* \
583                         *zapata* \
584                         alsa.conf \
585                         dundi.conf \
586                         gtalk.conf \
587                         h323.conf \
588                         jabber.conf \
589                         mgcp.conf \
590                         skinny.conf \
591         )
592         $(INSTALL_DATA) ./files/modules.conf $(1)/etc/asterisk/
593         $(INSTALL_DIR) $(1)/etc/default
594         $(INSTALL_DATA)  ./files/asterisk.default $(1)/etc/default/asterisk
595         $(INSTALL_DIR) $(1)/etc/init.d
596         $(INSTALL_BIN)  ./files/asterisk.init $(1)/etc/init.d/asterisk
597 endef
598
599
600 define Package/asterisk14-mini/conffiles
601 /etc/asterisk/asterisk.conf
602 /etc/asterisk/enum.conf
603 /etc/asterisk/extconfig.conf
604 /etc/asterisk/extensions.conf
605 /etc/asterisk/features.conf
606 /etc/asterisk/http.conf
607 /etc/asterisk/iax.conf
608 /etc/asterisk/iaxprov.conf
609 /etc/asterisk/logger.conf
610 /etc/asterisk/manager.conf
611 /etc/asterisk/modules.conf
612 /etc/asterisk/musiconhold.conf
613 /etc/asterisk/rtp.conf
614 /etc/asterisk/sip.conf
615 /etc/asterisk/sip_notify.conf
616 /etc/asterisk/users.conf
617 endef
618
619 define Package/asterisk14-mini/install
620         $(INSTALL_DIR) $(1)/etc/asterisk
621         for f in asterisk enum extconfig extensions features http \
622                 iax iaxprov logger manager modules musiconhold rtp \
623                 sip sip_notify users; do \
624           $(CP) $(PKG_INSTALL_DIR)/etc/asterisk/$$$$f.conf $(1)/etc/asterisk/ ; \
625         done
626         $(INSTALL_DATA) ./files/modules.conf $(1)/etc/asterisk/
627         $(INSTALL_DIR) $(1)/usr/lib/asterisk
628         $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/firmware $(1)/usr/lib/asterisk/
629         $(INSTALL_DIR) $(1)/usr/lib/asterisk/keys
630         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
631         for f in app_dial chan_iax2 chan_local chan_sip codec_gsm \
632                 codec_ulaw format_gsm format_pcm format_wav format_wav_gsm \
633                 pbx_config res_features res_musiconhold; do \
634           $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/$$$$f.so $(1)/usr/lib/asterisk/modules/ ; \
635         done
636         $(INSTALL_DIR) $(1)/usr/lib/asterisk/moh
637         $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds
638         $(INSTALL_DIR) $(1)/usr/sbin
639         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/asterisk $(1)/usr/sbin/
640         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/safe_asterisk $(1)/usr/sbin/
641         $(INSTALL_DIR) $(1)/etc/default
642         $(INSTALL_DATA)  ./files/asterisk.default $(1)/etc/default/asterisk
643         $(INSTALL_DIR) $(1)/etc/init.d
644         $(INSTALL_BIN)  ./files/asterisk.init $(1)/etc/init.d/asterisk
645 endef
646
647
648 define Package/asterisk14-app-meetme/conffiles
649 /etc/asterisk/meetme.conf
650 endef
651
652 define Package/asterisk14-app-meetme/install
653         $(INSTALL_DIR) $(1)/etc/asterisk
654         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/meetme.conf $(1)/etc/asterisk/
655         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
656         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/app_meetme.so $(1)/usr/lib/asterisk/modules/
657 endef
658
659
660 define Package/asterisk14-chan-oss/conffiles
661 /etc/asterisk/oss.conf
662 endef
663
664 define Package/asterisk14-chan-oss/install
665         $(INSTALL_DIR) $(1)/etc/asterisk
666         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/oss.conf $(1)/etc/asterisk/
667         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
668         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_oss.so $(1)/usr/lib/asterisk/modules/
669 endef
670
671
672 define Package/asterisk14-app-meetme/conffiles
673 /etc/asterisk/meetme.conf
674 endef
675
676 define Package/asterisk14-app-meetme/install
677         $(INSTALL_DIR) $(1)/etc/asterisk
678         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/meetme.conf $(1)/etc/asterisk/
679         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
680         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/app_meetme.so $(1)/usr/lib/asterisk/modules/
681 endef
682
683
684 define Package/asterisk14-chan-oss/conffiles
685 /etc/asterisk/oss.conf
686 endef
687
688 define Package/asterisk14-chan-oss/install
689         $(INSTALL_DIR) $(1)/etc/asterisk
690         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/oss.conf $(1)/etc/asterisk/
691         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
692         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_oss.so $(1)/usr/lib/asterisk/modules/
693 endef
694
695
696 define Package/asterisk14-chan-alsa/conffiles
697 /etc/asterisk/alsa.conf
698 endef
699
700 define Package/asterisk14-chan-alsa/install
701         $(INSTALL_DIR) $(1)/etc/asterisk
702         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/alsa.conf $(1)/etc/asterisk/
703         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
704         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_alsa.so $(1)/usr/lib/asterisk/modules/
705 endef
706
707
708 define Package/asterisk14-chan-gtalk/conffiles
709 /etc/asterisk/gtalk.conf
710 /etc/asterisk/jabber.conf
711 endef
712
713 define Package/asterisk14-chan-gtalk/install
714         $(INSTALL_DIR) $(1)/etc/asterisk
715         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/gtalk.conf $(1)/etc/asterisk/
716         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/jabber.conf $(1)/etc/asterisk/
717         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
718         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_gtalk.so $(1)/usr/lib/asterisk/modules/
719         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_jabber.so $(1)/usr/lib/asterisk/modules/
720 endef
721
722
723 define Package/asterisk14-chan-h323/conffiles
724 /etc/asterisk/h323.conf
725 endef
726
727 define Package/asterisk14-chan-h323/install
728         $(INSTALL_DIR) $(1)/etc/asterisk
729         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/h323.conf $(1)/etc/asterisk/
730         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
731         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_h323.so $(1)/usr/lib/asterisk/modules/
732 endef
733
734
735 define Package/asterisk14-chan-mgcp/install
736 /etc/asterisk/mgcp.conf
737 endef
738
739 define Package/asterisk14-chan-mgcp/install
740         $(INSTALL_DIR) $(1)/etc/asterisk
741         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/mgcp.conf $(1)/etc/asterisk/
742         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
743         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_mgcp.so $(1)/usr/lib/asterisk/modules/
744 endef
745
746
747 define Package/asterisk14-chan-skinny/conffiles
748 /etc/asterisk/skinny.conf
749 endef
750
751 define Package/asterisk14-chan-skinny/install
752         $(INSTALL_DIR) $(1)/etc/asterisk
753         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/skinny.conf $(1)/etc/asterisk/
754         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
755         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_skinny.so $(1)/usr/lib/asterisk/modules/
756 endef
757
758
759 #define Package/asterisk14-codec-ilbc/install
760 #       $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
761 #       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/codec_ilbc.so $(1)/usr/lib/asterisk/modules/
762 #       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/format_ilbc.so $(1)/usr/lib/asterisk/modules/
763 #endef
764
765
766 define Package/asterisk14-codec-lpc10/install
767         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
768         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/codec_lpc10.so $(1)/usr/lib/asterisk/modules/
769 endef
770
771
772 define Package/asterisk14-codec-speex/install
773         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
774         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/codec_speex.so $(1)/usr/lib/asterisk/modules/
775 endef
776
777
778 define Package/asterisk14-pbx-dundi/conffiles
779 /etc/asterisk/dundi.conf
780 endef
781
782 define Package/asterisk14-pbx-dundi/install
783         $(INSTALL_DIR) $(1)/etc/asterisk
784         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/dundi.conf $(1)/etc/asterisk/
785         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
786         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/pbx_dundi.so $(1)/usr/lib/asterisk/modules/
787 endef
788
789
790 define Package/asterisk14-res-agi/install
791         $(INSTALL_DIR) $(1)/usr/lib/asterisk/agi-bin
792         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
793         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_agi.so $(1)/usr/lib/asterisk/modules/
794 endef
795
796
797 define Package/asterisk14-res-crypto/install
798         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
799         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_crypto.so $(1)/usr/lib/asterisk/modules/
800 endef
801
802
803 define Package/asterisk14-pgsql/conffiles
804 /etc/asterisk/cdr_pgsql.conf
805 /etc/asterisk/res_pgsql.conf
806 endef
807
808 define Package/asterisk14-pgsql/install
809         $(INSTALL_DIR) $(1)/etc/asterisk
810         install -m0600 $(PKG_INSTALL_DIR)/etc/asterisk/cdr_pgsql.conf $(1)/etc/asterisk/
811         install -m0600 $(PKG_INSTALL_DIR)/etc/asterisk/res_pgsql.conf $(1)/etc/asterisk/
812         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
813         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/cdr_pgsql.so $(1)/usr/lib/asterisk/modules/
814         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_config_pgsql.so $(1)/usr/lib/asterisk/modules/
815 endef
816
817
818 define Package/asterisk14-sqlite/install
819         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
820         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/cdr_sqlite.so $(1)/usr/lib/asterisk/modules/
821 endef
822
823
824 define Package/asterisk14-sounds/install
825         $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds
826         $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/* $(1)/usr/lib/asterisk/sounds/
827         rm -f $(1)/usr/lib/asterisk/sounds/vm-*
828         rm -f $(1)/usr/lib/asterisk/sounds/x
829 endef
830
831
832 define Package/asterisk14-voicemail/conffiles
833 /etc/asterisk/voicemail.conf
834 endef
835
836 define Package/asterisk14-voicemail/install
837         $(INSTALL_DIR) $(1)/etc/asterisk
838         $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/asterisk/voicemail.conf $(1)/etc/asterisk/
839         $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
840         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/*voicemail.so $(1)/usr/lib/asterisk/modules/
841         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_adsi.so $(1)/usr/lib/asterisk/modules/
842         $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds
843         $(CP) $(PKG_INSTALL_DIR)//usr/lib/asterisk/sounds/vm-*.gsm $(1)/usr/lib/asterisk/sounds/
844 endef
845
846 define Package/asterisk14-rawplayer/install
847         $(INSTALL_DIR) $(1)/usr/bin
848         $(INSTALL_BIN)  $(PKG_BUILD_DIR)/rawplayer \
849                         $(1)/usr/bin
850 endef
851
852
853 $(eval $(call BuildPackage,asterisk14))
854 $(eval $(call BuildPackage,asterisk14-mini))
855 $(eval $(call BuildPackage,asterisk14-app-meetme))
856 $(eval $(call BuildPackage,asterisk14-chan-oss))
857 $(eval $(call BuildPackage,asterisk14-chan-alsa))
858 $(eval $(call BuildPackage,asterisk14-chan-gtalk))
859 $(eval $(call BuildPackage,asterisk14-chan-h323))
860 $(eval $(call BuildPackage,asterisk14-chan-mgcp))
861 $(eval $(call BuildPackage,asterisk14-chan-skinny))
862 #$(eval $(call BuildPackage,asterisk14-codec-ilbc))
863 $(eval $(call BuildPackage,asterisk14-codec-lpc10))
864 $(eval $(call BuildPackage,asterisk14-codec-speex))
865 $(eval $(call BuildPackage,asterisk14-pbx-dundi))
866 $(eval $(call BuildPackage,asterisk14-res-agi))
867 $(eval $(call BuildPackage,asterisk14-res-crypto))
868 $(eval $(call BuildPackage,asterisk14-pgsql))
869 $(eval $(call BuildPackage,asterisk14-sqlite))
870 $(eval $(call BuildPackage,asterisk14-voicemail))
871 $(eval $(call BuildPackage,asterisk14-sounds))
872 $(eval $(call BuildPackage,asterisk14-rawplayer))