Added missing net/freeswitch/files/etc.minimal/autoload_configs/dingaling.conf.xml...
[openwrt/svn-archive/archive.git] / net / freeswitch / Makefile
1 #
2 # Copyright (C) 2009-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
11 PKG_NAME:=freeswitch
12 PKG_VERSION:=1.0.7
13 PKG_RELEASE:=1
14
15
16 #
17 # The latest FS git hash in PKG_REV can be obtained from http://fisheye.freeswitch.org
18 #
19 PKG_REV:=25417d3ea8d4f1b8e192d79ebad8e9d45dc85790
20 PKG_SOURCE_VERSION:=$(PKG_REV)
21 PKG_SOURCE_PROTO:=git
22 PKG_SOURCE_URL:=git://git.$(PKG_NAME).org/$(PKG_NAME).git
23 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
24 PKG_SOURCE:=$(PKG_SOURCE_SUBDIR)_git-$(shell echo $(PKG_REV)|cut -b -9).tar.bz2
25 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
26
27
28 PKG_FIXUP:=libtool
29 PKG_BUILD_PARALLEL:=1
30
31
32 FS_MOD_AVAILABLE:= \
33 alsa \
34 amr \
35 amrwb \
36 avmd \
37 bv \
38 callcenter \
39 cdr-csv \
40 cdr-pg-csv \
41 cdr-sqlite \
42 celt \
43 cepstral \
44 cidlookup \
45 cluechoo \
46 codec2 \
47 commands \
48 conference \
49 console \
50 curl \
51 dahdi-codec \
52 db \
53 dialplan-asterisk \
54 dialplan-directory \
55 dialplan-xml \
56 dingaling \
57 directory \
58 distributor \
59 dptools \
60 easyroute \
61 enum \
62 erlang-event \
63 esf \
64 event-multicast \
65 event-socket \
66 event-zmq \
67 expr \
68 fifo \
69 file-string \
70 flite \
71 fsk \
72 fsv \
73 g723-1 \
74 g729 \
75 gsmopen \
76 h26x \
77 h323 \
78 hash \
79 ilbc \
80 java \
81 json-cdr \
82 lcr \
83 local-stream \
84 logfile \
85 loopback \
86 lua \
87 managed \
88 mp4 \
89 native-file \
90 nibblebill \
91 openzap \
92 opus \
93 portaudio \
94 portaudio-stream \
95 radius-cdr \
96 rss \
97 rtmp \
98 say-de \
99 say-en \
100 say-es \
101 say-fr \
102 say-hu \
103 say-it \
104 say-nl \
105 say-pt \
106 say-ru \
107 say-th \
108 say-zh \
109 shell-stream \
110 silk \
111 siren \
112 skinny \
113 skypopen \
114 snapshot \
115 snmp \
116 snipe-hunt \
117 sndfile \
118 snom \
119 sofia \
120 spandsp \
121 speex \
122 spidermonkey \
123 spidermonkey-core-db \
124 spidermonkey-curl \
125 spidermonkey-odbc \
126 spidermonkey-socket \
127 spidermonkey-teletone \
128 spy \
129 stress \
130 syslog \
131 tone-stream \
132 tts-commandline \
133 unimrcp \
134 valet-parking \
135 vmd \
136 voicemail \
137 xml-cdr \
138 xml-curl \
139 xml-rpc \
140 yaml \
141
142
143 PKG_CONFIG_DEPENDS:= \
144 CONFIG_FS_SOFIA_WITH_GNUTLS \
145 CONFIG_FS_SOFIA_WITH_IPV6 \
146 CONFIG_FS_SOFIA_WITH_ODBC \
147 CONFIG_FS_SOFIA_WITH_OPT \
148 CONFIG_FS_SOFIA_WITH_SCTP \
149 CONFIG_FS_SOFIA_WITH_ZRTP_GIT \
150 CONFIG_FS_SOFIA_WITHOUT_MYSQL \
151 $(patsubst %,CONFIG_PACKAGE_$(PKG_NAME)-mod-%,$(FS_MOD_AVAILABLE)) \
152
153
154 include $(INCLUDE_DIR)/package.mk
155 include $(INCLUDE_DIR)/nls.mk
156
157
158 define Package/$(PKG_NAME)/Default
159 SECTION:=net
160 CATEGORY:=Network
161 SUBMENU:=Telephony
162 URL:=http://www.$(PKG_NAME).org/
163 MAINTAINER:=Mazilo <OpenWRT@slickdeals.endjunk.com>
164 endef
165
166
167 define Package/$(PKG_NAME)
168 $(call Package/$(PKG_NAME)/Default)
169 TITLE:=FreeSWITCH open source telephony platform
170 DEPENDS:= +libreadline +libncurses +libpthread +libstdcpp
171 MENU:=1
172 endef
173
174
175 define Package/$(PKG_NAME)/description
176 FreeSWITCH is an open source telephony platform designed to
177 facilitate the creation of voice and chat driven products scaling
178 from a soft-phone up to a soft-switch. See http://wiki.$(PKG_NAME).org
179 endef
180
181
182 define Package/$(PKG_NAME)/config
183 config FS_SOFIA_WITH_IPV6
184 depends on PACKAGE_$(PKG_NAME)
185 bool "Compile with IPV6 support"
186 default y
187 help
188 Compile $(PKG_NAME) with IPV6 Support.
189
190 config FS_SOFIA_WITH_OPT
191 depends on PACKAGE_$(PKG_NAME)
192 bool "Compile with optimization"
193 default y
194 help
195 Compile $(PKG_NAME) with optimization enabled.
196
197 config FS_SOFIA_WITHOUT_MYSQL
198 depends on PACKAGE_$(PKG_NAME)
199 bool "Compile without MySQL"
200 default y
201 help
202 Compile $(PKG_NAME) without MySQL.
203 endef
204
205
206 define Package/$(PKG_NAME)-mod-dingaling/config
207 config FS_SOFIA_WITH_GNUTLS
208 depends on PACKAGE_$(PKG_NAME)-mod-dingaling
209 bool "Compile with GNU TLS (Requires libgnutls-openssl)"
210 default y
211 select PACKAGE_libgnutls-openssl
212 help
213 Compile $(PKG_NAME)-mod-dingaling with GNU TLS Support (Requires libgnutls-openssl package).
214 endef
215
216
217 define Package/$(PKG_NAME)-mod-sofia/config
218 config FS_SOFIA_WITH_ODBC
219 depends on PACKAGE_$(PKG_NAME)-mod-sofia
220 depends on PACKAGE_unixodbc_svn
221 bool "Compile with ODBC support (Requires unixodbc_svn NOT YET AVAILABLE)"
222 default n
223 #select PACKAGE_unixodbc_svn
224 help
225 Compile $(PKG_NAME)-mod-sofia with ODBC Support. Since unixodbc_svn package is not yet available on OpenWRT, $(PKG_NAME)-mod-sofia CAN NOT be compiled with ODBC support.
226
227 config FS_SOFIA_WITH_SCTP
228 depends on PACKAGE_$(PKG_NAME)-mod-sofia
229 depends on PACKAGE_sctp
230 bool "Compile with SCTP (Stream Control Transfer Protocol) support"
231 default n
232 #select PACKAGE_sctp
233 help
234 Compile $(PKG_NAME)-mod-sofia with SCTP support.
235
236 config FS_SOFIA_WITH_ZRTP_GIT
237 depends on PACKAGE_$(PKG_NAME)-mod-sofia
238 depends on PACKAGE_libzrtpcpp
239 bool "Compile with ZRTP support (Requires libzrtpcpp NOT YET AVAILABLE)"
240 default n
241 #select PACKAGE_libzrtpcpp
242 help
243 Compile $(PKG_NAME)-mod-sofia with ZRTP Support. Since libzrtpcpp package is not yet available on OpenWRT, $(PKG_NAME)-mod-sofia CAN NOT be compiled with ZRTP support.
244 endef
245
246
247 define Package/$(PKG_NAME)-example-config
248 $(call Package/$(PKG_NAME)/Default)
249 TITLE:=FreeSWITCH example config (commented)
250 DEPENDS:= $(PKG_NAME)
251 endef
252
253
254 define Package/$(PKG_NAME)-example-config/description
255 The default configuration included with FreeSWITCH. It is not intended to be
256 a final product, and is thus moved to /usr/share/$(PKG_NAME)/examples/conf to
257 be an example of how FreeSWITCH can be configured.
258 endef
259
260
261 define Package/$(PKG_NAME)-config-upstream-defaults
262 $(call Package/$(PKG_NAME)/Default)
263 TITLE:=FreeSWITCH upstream config
264 DEPENDS:= $(PKG_NAME)
265 endef
266
267
268 define Package/$(PKG_NAME)-config-upstream-defaults/description
269 The default configuration included with FreeSWITCH. It is not intended to be
270 a final product, and but is included for those who don't want to use the
271 OpenWRT configuration and/or want to try things as prepared by upstream.
272 endef
273
274
275 define Package/$(PKG_NAME)-config-minimal
276 $(call Package/$(PKG_NAME)/Default)
277 TITLE:=FreeSWITCH minimal config
278 DEPENDS:= $(PKG_NAME)
279 endef
280
281
282 define Package/$(PKG_NAME)-config-minimal/description
283 A minimal configuration of FreeSWITCH for OpenWRT devices. Is what the UCI
284 configuration began with.
285 endef
286
287
288 define Package/$(PKG_NAME)-collection-upstream-defaults
289 $(call Package/$(PKG_NAME)/Default)
290 TITLE:=FS upstream def sample conf
291 DEPENDS:= $(PKG_NAME) \
292 +$(PKG_NAME)-config-upstream-defaults \
293 +$(PKG_NAME)-mod-callcenter \
294 +$(PKG_NAME)-mod-codec2 \
295 +$(PKG_NAME)-mod-commands \
296 +$(PKG_NAME)-mod-conference \
297 +$(PKG_NAME)-mod-curl \
298 +$(PKG_NAME)-mod-dialplan-xml \
299 +$(PKG_NAME)-mod-dingaling \
300 +$(PKG_NAME)-mod-dptools \
301 +$(PKG_NAME)-mod-event-socket \
302 +$(PKG_NAME)-mod-g723-1 \
303 +$(PKG_NAME)-mod-g729 \
304 +$(PKG_NAME)-mod-hash \
305 +$(PKG_NAME)-mod-ilbc \
306 +$(PKG_NAME)-mod-local-stream \
307 +$(PKG_NAME)-mod-lua \
308 +$(PKG_NAME)-mod-native-file \
309 +$(PKG_NAME)-mod-sndfile \
310 +$(PKG_NAME)-mod-sofia \
311 +$(PKG_NAME)-mod-spandsp \
312 +$(PKG_NAME)-mod-speex \
313 +$(PKG_NAME)-mod-syslog \
314 +$(PKG_NAME)-mod-tone-stream \
315 +$(PKG_NAME)-mod-xml-curl \
316 +$(PKG_NAME)-mod-xml-rpc \
317 +$(PKG_NAME)-tools
318 endef
319
320
321 define Package/$(PKG_NAME)-collection-minimal
322 $(call Package/$(PKG_NAME)/Default)
323 TITLE:=FreeSWITCH minimal package collection
324 DEFAULT:=y
325 DEPENDS:= $(PKG_NAME) \
326 +$(PKG_NAME)-config-minimal \
327 +$(PKG_NAME)-mod-codec2 \
328 +$(PKG_NAME)-mod-commands \
329 +$(PKG_NAME)-mod-dialplan-xml \
330 +$(PKG_NAME)-mod-dptools \
331 +$(PKG_NAME)-mod-event-socket \
332 +$(PKG_NAME)-mod-hash \
333 +$(PKG_NAME)-mod-local-stream \
334 +$(PKG_NAME)-mod-sndfile \
335 +$(PKG_NAME)-mod-sofia \
336 +$(PKG_NAME)-mod-syslog \
337 +$(PKG_NAME)-mod-tone-stream \
338 +$(PKG_NAME)-tools
339 endef
340
341
342 define Package/$(PKG_NAME)-sounds-en
343 $(call Package/$(PKG_NAME)/Default)
344 TITLE:=FreeSWITCH english sounds
345 DEPENDS:= $(PKG_NAME)
346 endef
347
348
349 define Package/$(PKG_NAME)-sounds-moh
350 $(call Package/$(PKG_NAME)/Default)
351 TITLE:=FreeSWITCH music-on-hold sounds
352 DEPENDS:= $(PKG_NAME)
353 endef
354
355
356 define Package/$(PKG_NAME)-tools
357 $(call Package/$(PKG_NAME)/Default)
358 TITLE:=FreeSWITCH control tools
359 DEPENDS:= $(PKG_NAME)
360 endef
361
362
363 define Download/files
364 define Download/$(1)
365 FILE:=$(2)
366 URL:=$(if $(4),$(4),http://files.$(PKG_NAME).org)/$(5)
367 MD5SUM:=$(3)
368 endef
369 define Prepare/$(1)
370 $(LN) $(DL_DIR)/$(2) $(PKG_BUILD_DIR)/$(6)
371 endef
372 $$(eval $$(call Download,$(1)))
373 endef
374
375
376 MAKE_INSTALL_TARGETS:=install
377
378
379 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-celt),)
380 $(eval $(call Download/files,celt,celt-0.10.0.tar.gz,a656f6176e9be84027c0e51ceedd710f,,downloads/libs/,libs/))
381 endif
382
383
384 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-curl),)
385 $(eval $(call Download/files,json-cdr,json-c-0.9.tar.gz,4653b3b9c568bb9c782178abfaac128d,,downloads/libs/,libs/))
386 endif
387
388
389 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-event-zmq),)
390 $(eval $(call Download/files,event-zmq,zeromq-2.1.9.tar.gz,94c5e0262a79c5f82bc0b178c1f8a33d,http://download.zeromq.org,,libs/))
391 endif
392
393
394 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-flite),)
395 $(eval $(call Download/files,flite,flite-1.3.99-latest.tar.gz,365b60881715c5e13c0d8bc37d9be6ff,,downloads/libs/,libs/))
396 endif
397
398
399 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-opus),)
400 $(eval $(call Download/files,opus,opus-0.9.0.tar.gz,8a729db587430392e64280a499e9d061,,downloads/libs/,libs/))
401 endif
402
403
404 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-sounds-en),)
405 $(eval $(call Download/files,sounds-en,$(PKG_NAME)-sounds-en-us-callie-8000-1.0.16.tar.gz,bde0883eb75fe06f39bde11f50a1f858,,,))
406 MAKE_INSTALL_TARGETS+= sounds-install
407 endif
408
409
410 ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-sounds-moh),)
411 $(eval $(call Download/files,sounds-moh,$(PKG_NAME)-sounds-music-8000-1.0.8.tar.gz,f63ef3cc3507af079ae5c7b8b8a01e42,,,))
412 MAKE_INSTALL_TARGETS+= moh-install
413 endif
414
415
416 #
417 # XXX: -fgnu89-inline is not supported on all compiler versions, so only enable it on avr32 where it solves build issues
418 #
419 ifneq ($(CONFIG_avr32),)
420 TARGET_CFLAGS += -fgnu89-inline
421 TARGET_CXXFLAGS += -fgnu89-inline
422 endif
423
424
425 ifneq ($(CONFIG_USE_EGLIBC),)
426 ifeq ($(CONFIG_EGLIBC_OPTION_EGLIBC_UTMP),)
427 TARGET_CFLAGS += -DNO_GETLOGIN
428 endif
429 endif
430
431
432 FS_TARGET_CFLAGS:= ${TARGET_CFLAGS} -DLUA_USE_LINUX $(FPIC) -std=gnu99 -Wno-format
433 FS_TARGET_CXXFLAGS:= ${TARGET_CXXFLAGS} -DLUA_USE_LINUX $(FPIC) -Wno-format
434 FS_TARGET_CPPFLAGS:= -I. -I./lua $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-erlang-event),-I$(STAGING_DIR_HOST)/lib/erlang/lib/erl_interface-3.6/include) $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-json-cdr),-Wno-error) ${TARGET_CPPFLAGS}
435
436
437 CONFIGURE_ARGS+= \
438 --host=$(GNU_TARGET_NAME) \
439 --build=$(GNU_HOST_NAME) \
440 --prefix="/usr/share/$(PKG_NAME)" \
441 --bindir="/usr/bin" \
442 --libdir="/usr/lib" \
443 --srcdir="$(PKG_BUILD_DIR)" \
444 --sysconfdir="/etc/$(PKG_NAME)" \
445 --with-modinstdir="/usr/lib/$(PKG_NAME)" \
446 --with-random="/dev/urandom" \
447 $(if $(CONFIG_FS_SOFIA_WITHOUT_MYSQL),--without-mysql) \
448 $(call autoconf_bool,CONFIG_FS_SOFIA_WITH_IPV6,ipv6) \
449 $(call autoconf_bool,CONFIG_FS_SOFIA_WITH_OPT,optimization) \
450 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-celt),--with-ogg="$(STAGING_DIR)/usr",--without-iogg) \
451 $(if ($(CONFIG_PACKAGE_$(PKG_NAME)-mod-curl)|$(CONFIG_PACKAGE_$(PKG_NAME)-mod-xml-cdr)|$(CONFIG_PACKAGE_$(PKG_NAME)-mod-xml-curl)),--with-libcurl="$(STAGING_DIR)/usr",--without-libcurl) \
452 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-dingaling)|$(CONFIG_FS_SOFIA_WITH_GNUTLS),--with-libgnutls="$(STAGING_DIR)/usr") \
453 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-java),--with-java="$(STAGING_DIR)/usr",--without-java) \
454 $(call autoconf_bool,CONFIG_PACKAGE_$(PKG_NAME)-mod-spandsp,builtin-tiff) \
455 $(call autoconf_bool,CONFIG_FS_SOFIA_WITH_SCTP,sctp) \
456 $(call autoconf_bool,CONFIG_FS_SOFIA_WITH_ZRTP_GIT,zrtp) \
457 $(call autoconf_bool,CONFIG_FS_SOFIA_WITH_ODBC,core-odbc-support) \
458 $(if $(CONFIG_FS_SOFIA_WITH_ODBC),--with-odbc="$(STAGING_DIR)/usr") \
459
460
461 CONFIGURE_VARS+= \
462 config_TARGET_CC="${TARGET_CC}" \
463 config_TARGET_CFLAGS="${FS_TARGET_CPPFLAGS} ${FS_TARGET_CFLAGS}" \
464 config_TARGET_CXX="${TARGET_CXX}" \
465 config_TARGET_CXXFLAGS="${FS_TARGET_CPPFLAGS} ${FS_TARGET_CXXFLAGS}" \
466 config_TARGET_CPPFLAGS="${FS_TARGET_CPPFLAGS}" \
467 config_TARGET_READLINE_INC="${FS_TARGET_CPPFLAGS}" \
468 config_TARGET_READLINE_LIBS="${TARGET_LDFLAGS} -lreadline -lncurses" \
469 config_TARGET_LIBS="${TARGET_LDFLAGS} -lpthread" \
470 config_BUILD_CC="${HOSTCC}" \
471 config_BUILD_CFLAGS="${HOST_CFLAGS}" \
472 CC_FOR_BUILD="${HOSTCC}" \
473 LDFLAGS="$$$$LDFLAGS" \
474 LDFLAGS_FOR_BUILD="${HOST_LDFLAGS}" \
475 CC="${TARGET_CC}" \
476 CXX="${TARGET_CXX}" \
477 CFLAGS="${FS_TARGET_CPPFLAGS} ${FS_TARGET_CFLAGS}" \
478 CXXFLAGS="${FS_TARGET_CPPFLAGS} ${FS_TARGET_CXXFLAGS}" \
479 CPPFLAGS="${FS_TARGET_CPPFLAGS}" \
480 LDFLAGS="${TARGET_LDFLAGS} -Wl,-rpath-link=\"${STAGING_DIR}/usr/lib\"" \
481 PATH="${PATH}:${STAGING_DIR}" \
482 HOST_CC="/usr/bin/cc" \
483 HOST_CXX="/usr/bin/g++" \
484 CROSS_COMPILE="1" \
485 ax_cv_c_compiler_vendor="gnu" \
486 ac_cv_dev_urandom="yes" \
487 ac_cv_file_dbd_apr_dbd_mysql_c="no" \
488 ac_cv_file__dev_random="no" \
489 ac_cv_file__dev_urandom="yes" \
490 ac_cv_file___dev_urandom_="yes" \
491 ac_cv_func_mmap_fixed_mapped="yes" \
492 ac_cv_func_pthread_rwlock_init="yes" \
493 ac_cv_struct_rlimit="yes" \
494 apr_cv_mutex_recursive="yes" \
495 apr_cv_process_shared_works="no" \
496 apr_cv_tcp_nodelay_with_cork="yes" \
497 apr_cv_type_rwlock_t="yes" \
498 ac_cv_path_LIBGNUTLS_CONFIG="no" \
499 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-perl),ac_cv_path_PERL="yes",) \
500 libzmq_cv_cxx_werror_flag="" \
501
502
503 define Build/Prepare
504 (cd $(PKG_BUILD_DIR); [ -h noreg ] || touch noreg)
505 $(call Build/Prepare/Default)
506 $(call Prepare/celt)
507 $(call Prepare/event-zmq)
508 $(call Prepare/flite)
509 $(call Prepare/json-cdr)
510 $(call Prepare/opus)
511 $(call Prepare/sounds-en)
512 $(call Prepare/sounds-moh)
513 endef
514
515
516 define Build/Configure
517 (cd $(PKG_BUILD_DIR); $(AM_TOOL_PATHS) ./bootstrap.sh)
518 $(call Build/Configure/Default,)
519 $(foreach m,$(FS_MOD_AVAILABLE),
520 $(if $(CONFIG_PACKAGE_$(PKG_NAME)-mod-$(m)),
521 $(SED) 's|^[ #]*\([^#]*/mod_$(subst -,_,$(m))\)$$$$|\1|g' $(PKG_BUILD_DIR)/modules.conf
522 ,
523 $(SED) 's|^\([^#]*/mod_$(subst -,_,$(m))\)$$$$|#\1|g' $(PKG_BUILD_DIR)/modules.conf
524 )
525 )
526 endef
527
528
529 define Build/Compile
530 $(MAKE) -C $(PKG_BUILD_DIR) \
531 AR="$(TARGET_CROSS)ar" \
532 RANLIB="$(TARGET_CROSS)ranlib" \
533 CC="$(TARGET_CC)" \
534 CXX="$(TARGET_CXX)" \
535 DESTDIR="$(PKG_INSTALL_DIR)" \
536 LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \
537 spandsp-reconf all $(MAKE_INSTALL_TARGETS)
538 $(SED) 's|^\([ \t]*\)\(.*\)"mod_console"\(.*\)$$$$|\1<!-- \2"mod_console"\3 -->|' $(PKG_INSTALL_DIR)/etc/$(PKG_NAME)/autoload_configs/modules.conf.xml
539 $(SED) 's|^\([ \t]*\)<!-- *\(.*\)"mod_syslog"\(.*\) *-->\(.*\)$$$$|\1\2"mod_syslog"\3\4|' $(PKG_INSTALL_DIR)/etc/$(PKG_NAME)/autoload_configs/modules.conf.xml
540 endef
541
542
543 define Build/InstallDev
544 $(INSTALL_DIR) $(1)/usr/include/$(PKG_NAME)
545 $(CP) $(PKG_INSTALL_DIR)/usr/share/$(PKG_NAME)/include/* $(1)/usr/include/$(PKG_NAME)/
546 $(INSTALL_DIR) $(1)/usr/lib
547 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib$(PKG_NAME).{a,so*} $(1)/usr/lib/
548 endef
549
550
551 define Package/$(PKG_NAME)/install
552 $(INSTALL_DIR) $(1)/usr/bin
553 $(CP) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/
554 $(INSTALL_DIR) $(1)/usr/lib
555 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib$(PKG_NAME).so.* $(1)/usr/lib/
556 $(INSTALL_DIR) $(1)/usr/lib/$(PKG_NAME)
557 $(INSTALL_DIR) $(1)/etc/default
558 $(INSTALL_DATA) ./files/$(PKG_NAME).default $(1)/etc/default/$(PKG_NAME)
559 $(INSTALL_DIR) $(1)/etc/init.d
560 $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
561 $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
562 $(INSTALL_DATA) ./files/$(PKG_NAME).hotplug $(1)/etc/hotplug.d/iface/90-$(PKG_NAME)
563 $(INSTALL_DIR) $(1)/etc/config
564 $(INSTALL_DATA) ./files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
565 endef
566
567
568 define Package/$(PKG_NAME)-collection-upstream-defaults/install
569 $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
570 endef
571
572
573 define Package/$(PKG_NAME)-example-config/install
574 $(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/examples/conf
575 #$(INSTALL_DIR) $(1)/var/log/$(PKG_NAME)/xml_cdr
576 $(CP) $(PKG_INSTALL_DIR)/etc/$(PKG_NAME)/* $(1)/usr/share/$(PKG_NAME)/examples/conf/
577 endef
578
579
580 define Package/$(PKG_NAME)-config-upstream-defaults/install
581 $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
582 $(CP) $(PKG_INSTALL_DIR)/etc/$(PKG_NAME)/* $(1)/etc/$(PKG_NAME)/
583 endef
584
585
586 define Package/$(PKG_NAME)-collection-minimal/install
587 $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
588 endef
589
590
591 define Package/$(PKG_NAME)-collection-uci-minimal/install
592 $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
593 endef
594
595
596 define Package/$(PKG_NAME)-config-minimal/install
597 $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)
598 $(CP) ./files/etc.minimal/* $(1)/etc/$(PKG_NAME)/
599 endef
600
601
602 define Package/$(PKG_NAME)-sounds-en/install
603 $(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/sounds
604 $(CP) $(PKG_INSTALL_DIR)/usr/share/$(PKG_NAME)/sounds/en $(1)/usr/share/$(PKG_NAME)/sounds/
605 endef
606
607
608 define Package/$(PKG_NAME)-sounds-moh/install
609 $(INSTALL_DIR) $(1)/usr/share/$(PKG_NAME)/sounds
610 $(CP) $(PKG_INSTALL_DIR)/usr/share/$(PKG_NAME)/sounds/music $(1)/usr/share/$(PKG_NAME)/sounds/
611 endef
612
613
614 define Package/$(PKG_NAME)-tools/install
615 $(INSTALL_DIR) $(1)/usr/bin
616 $(CP) $(PKG_INSTALL_DIR)/usr/bin/fs_cli $(1)/usr/bin/
617 $(CP) $(PKG_INSTALL_DIR)/usr/bin/fs_encode $(1)/usr/bin/
618 $(CP) $(PKG_INSTALL_DIR)/usr/bin/fs_ivrd $(1)/usr/bin/
619 $(CP) $(PKG_INSTALL_DIR)/usr/bin/fsxs $(1)/usr/bin/
620 $(CP) $(PKG_INSTALL_DIR)/usr/bin/gentls_cert $(1)/usr/bin/
621 $(CP) $(PKG_INSTALL_DIR)/usr/bin/tone2wav $(1)/usr/bin/
622 endef
623
624
625 #
626 # 1. Name
627 # 2. Title
628 # 3. Files
629 # 4. Inter Depends
630 # 5. Extra Depends
631 #
632 define BuildPlugin
633 define Package/$(PKG_NAME)-mod-$(1)
634 $$(call Package/$(PKG_NAME)/Default)
635 TITLE:= FS $(2) module
636 DEPENDS:= $(PKG_NAME) $(foreach m,$(4),+$(PKG_NAME)-mod-$(m)) $(5)
637 endef
638
639 define Package/$(PKG_NAME)-mod-$(1)/install
640 [ -z "$(3)" ] || $(INSTALL_DIR) $$(1)/usr/lib/$(PKG_NAME)
641 for f in $(3); do \
642 $(CP) \
643 $(PKG_INSTALL_DIR)/usr/lib/$(PKG_NAME)/$$$$$$$${f}.so \
644 $$(1)/usr/lib/$(PKG_NAME)/ ; \
645 done
646 if [ -d "./files/etc.packages/$(1)" ]; then \
647 $(INSTALL_DIR) $$(1)/etc/$(PKG_NAME) ; \
648 $(CP) \
649 ./files/etc.packages/$(1)/* \
650 $$(1)/etc/$(PKG_NAME)/ ; \
651 fi
652 endef
653
654 define Package/$(PKG_NAME)-mod-$(1)/postinst
655 #!/bin/sh
656 sed -i -e 's|^\([ \t]*\)<!-- *\(.*\)"mod_$(subst -,_,$(1))"\(.*\) *-->\(.*\)$$$$|\1\2"mod_$(subst -,_,$(1))"\3\4|' $$$${IPKG_INSTROOT}/etc/$(PKG_NAME)/autoload_configs/modules.conf.xml
657 endef
658
659 define Package/$(PKG_NAME)-mod-$(1)/postrm
660 #!/bin/sh
661 sed -i -e 's|^\([ \t]*\)\(.*\)"mod_$(subst -,_,$(1))"\(.*\)$$$$|\1<!-- \2"mod_$(subst -,_,$(1))"\3 -->|' $$$${IPKG_INSTROOT}/etc/$(PKG_NAME)/autoload_configs/modules.conf.xml
662 endef
663
664 $$(eval $$(call BuildPackage,$(PKG_NAME)-mod-$(1)))
665 endef
666
667
668 $(eval $(call BuildPackage,$(PKG_NAME)))
669 $(eval $(call BuildPackage,$(PKG_NAME)-collection-upstream-defaults))
670 $(eval $(call BuildPackage,$(PKG_NAME)-collection-minimal))
671 $(eval $(call BuildPackage,$(PKG_NAME)-sounds-en))
672 $(eval $(call BuildPackage,$(PKG_NAME)-sounds-moh))
673 $(eval $(call BuildPackage,$(PKG_NAME)-tools))
674 $(eval $(call BuildPackage,$(PKG_NAME)-example-config))
675 $(eval $(call BuildPackage,$(PKG_NAME)-config-upstream-defaults))
676 $(eval $(call BuildPackage,$(PKG_NAME)-config-minimal))
677
678
679 #
680 # $(eval $(call BuildPlugin,Name,Title,Files,Inter Depends,Extra Depends))
681 #
682 $(eval $(call BuildPlugin,alsa,Alsa endpoint,mod_alsa,,))
683 $(eval $(call BuildPlugin,amr,GSM-AMR codec,mod_amr,,))
684 $(eval $(call BuildPlugin,amrwb,GSM-AMRWB,mod_amrwb,,))
685 $(eval $(call BuildPlugin,avmd,Advanced Voice Mail Detection,mod_avmd,,))
686 $(eval $(call BuildPlugin,bv,codec mod_bv,mod_bv,,))
687 $(eval $(call BuildPlugin,callcenter,Call Center,mod_callcenter,,))
688 $(eval $(call BuildPlugin,cdr-csv,CSV-CDR handler,mod_cdr_csv,,))
689 $(eval $(call BuildPlugin,cdr-pg-csv,Postgress CDR handler,mod_cdr_pg_csv,,+coreutils +libpq))
690 $(eval $(call BuildPlugin,cdr-sqlite,SQLite3 CDR handler,mod_cdr_sqlite,,+sqlite3))
691 $(eval $(call BuildPlugin,celt,CELT ultra-low delay codec,mod_celt,,+libogg))
692 $(eval $(call BuildPlugin,cepstral,Cepstral interface,mod_cepstral,,@BROKEN)) # needs <swift.h>
693 $(eval $(call BuildPlugin,cidlookup,applications mod_cidlookup,mod_cidlookup,,))
694 $(eval $(call BuildPlugin,cluechoo,Framework Demo,mod_cluechoo,,))
695 $(eval $(call BuildPlugin,codec2,CoDec 2,mod_codec2,,))
696 $(eval $(call BuildPlugin,commands,API commands,mod_commands,,))
697 $(eval $(call BuildPlugin,conference,Conference room,mod_conference,,))
698 $(eval $(call BuildPlugin,console,Console logger,mod_console,,))
699 $(eval $(call BuildPlugin,curl,HTTP request,mod_curl,,+libcurl))
700 $(eval $(call BuildPlugin,dahdi-codec,DAHDI codecs,mod_dahdi_codec,,))
701 $(eval $(call BuildPlugin,db,Database backend,mod_db,,))
702 $(eval $(call BuildPlugin,dialplan-asterisk,Asterisk dialplan parser,mod_dialplan_asterisk,,))
703 $(eval $(call BuildPlugin,dialplan-directory,Dialplan directory,mod_dialplan_directory,,))
704 $(eval $(call BuildPlugin,dialplan-xml,Dialplan-XML interface,mod_dialplan_xml,,))
705 $(eval $(call BuildPlugin,dingaling,Jabber interface,mod_dingaling,,))
706 $(eval $(call BuildPlugin,directory,application mod_directory,mod_directory,,))
707 $(eval $(call BuildPlugin,distributor,application mod_distributor,mod_distributor,,))
708 $(eval $(call BuildPlugin,dptools,Dialplan tools,mod_dptools,,))
709 $(eval $(call BuildPlugin,easyroute,DID routing,mod_easyroute,,))
710 $(eval $(call BuildPlugin,enum,ENUM routing,mod_enum,,))
711 $(eval $(call BuildPlugin,erlang-event,Erlang event handler,mod_erlang_event,,+erlang))
712 $(eval $(call BuildPlugin,esf,Extra SIP Functionality,mod_esf,,))
713 $(eval $(call BuildPlugin,event-multicast,Multicast event handler,mod_event_multicast,,))
714 $(eval $(call BuildPlugin,event-socket,Socket event handler,mod_event_socket,,))
715 $(eval $(call BuildPlugin,event-zmq,Socket event handler by Zero MQ,mod_event_zmq,,))
716 $(eval $(call BuildPlugin,expr,Expression evaluation,mod_expr,,))
717 $(eval $(call BuildPlugin,fifo,FIFO,mod_fifo,,))
718 $(eval $(call BuildPlugin,file-string,File streaming,mod_file_string,,@OBSOLETE)) # merged into dptools
719 $(eval $(call BuildPlugin,flite,Festival TTS,mod_flite,,@(!(armeb||avr32)||BROKEN)))
720 $(eval $(call BuildPlugin,fsk,Bell-202 1200-baud FSK decoder,mod_fsk,,))
721 $(eval $(call BuildPlugin,fsv,Video,mod_fsv,,))
722 $(eval $(call BuildPlugin,g723-1,G.723.1 codec,mod_g723_1,,))
723 $(eval $(call BuildPlugin,g729,G.729 codec,mod_g729,,))
724 $(eval $(call BuildPlugin,gsmopen,Short Message Service (SMS),mod_gsmopen,spandsp,+alsa-lib +gsmlib))
725 $(eval $(call BuildPlugin,h26x,H26X linear codec,mod_h26x,,))
726 $(eval $(call BuildPlugin,h323,h323 endpoint,mod_h323,,@BROKEN)) # missing header files (other packages needed)
727 $(eval $(call BuildPlugin,hash,API for manipulating a hash table,mod_hash,,))
728 $(eval $(call BuildPlugin,ilbc,ILBC codec,mod_ilbc,,))
729 $(eval $(call BuildPlugin,java,Java language interface,mod_java,,@BROKEN)) # needs java
730 $(eval $(call BuildPlugin,json-cdr,JSon-CDR interface,mod_json_cdr,,))
731 $(eval $(call BuildPlugin,lcr,Least Cost Routing,mod_lcr,,))
732 $(eval $(call BuildPlugin,local-stream,Local streaming,mod_local_stream,,))
733 $(eval $(call BuildPlugin,logfile,File logger,mod_logfile,,))
734 $(eval $(call BuildPlugin,loopback,Loopback endpoint,mod_loopback,,))
735 $(eval $(call BuildPlugin,lua,Lua language interface,mod_lua,,+libstdcpp))
736 $(eval $(call BuildPlugin,managed,language mod_managed,mod_managed,,+glib2 @BROKEN)) # needs Mono
737 $(eval $(call BuildPlugin,mp4,MP4 File Format support for video apps.,mod_mp4,,+libmp4v2))
738 $(eval $(call BuildPlugin,native-file,Native files,mod_native_file,,))
739 $(eval $(call BuildPlugin,nibblebill,Billing,mod_nibblebill,,))
740 $(eval $(call BuildPlugin,openzap,Zaptel hardware interface,mod_openzap ozmod_analog ozmod_analog_em ozmod_isdn ozmod_skel ozmod_zt,,+libpcap))
741 $(eval $(call BuildPlugin,opus,Opus CoDec,mod_opus,,))
742 $(eval $(call BuildPlugin,portaudio,Local audio endpoint,mod_portaudio,,+alsa-lib))
743 $(eval $(call BuildPlugin,portaudio-stream,portaudio stream format,mod_portaudio_stream,,))
744 $(eval $(call BuildPlugin,radius-cdr,Radius-CDR interface,mod_radius_cdr,,+freeradius2 @BROKEN)) # fails in freeradius-client
745 $(eval $(call BuildPlugin,rss,RRS feeds via TTS,mod_rss,,))
746 $(eval $(call BuildPlugin,rtmp,RTMP Protocol Handler,mod_rtmp,,))
747 $(eval $(call BuildPlugin,say-de,German say,mod_say_de,,))
748 $(eval $(call BuildPlugin,say-en,English say,mod_say_en,,))
749 $(eval $(call BuildPlugin,say-es,Spanish say,mod_say_es,,))
750 $(eval $(call BuildPlugin,say-fr,French say,mod_say_fr,,))
751 $(eval $(call BuildPlugin,say-hu,Hungarian say,mod_say_hu,,))
752 $(eval $(call BuildPlugin,say-it,Italian say,mod_say_it,,))
753 $(eval $(call BuildPlugin,say-nl,Dutch say,mod_say_nl,,))
754 $(eval $(call BuildPlugin,say-pt,Portugeese say,mod_say_pt,,))
755 $(eval $(call BuildPlugin,say-ru,Russian say,mod_say_ru,,))
756 $(eval $(call BuildPlugin,say-th,Thai say,mod_say_th,,))
757 $(eval $(call BuildPlugin,say-zh,Chineese say,mod_say_zh,,))
758 $(eval $(call BuildPlugin,shell-stream,Shell stream,mod_shell_stream,,))
759 $(eval $(call BuildPlugin,silk,codec mod_silk,mod_silk,,))
760 $(eval $(call BuildPlugin,siren,G.722.1 codec,mod_siren,,))
761 $(eval $(call BuildPlugin,skinny,endpoint mod_skinny,mod_skinny,,))
762 $(eval $(call BuildPlugin,skypopen,Skype compatible endpoint,mod_skypopen,,+FEATURE_drawing-backend_libX11:libX11))
763 $(eval $(call BuildPlugin,snapshot,application mod_snapshot,mod_snapshot,,))
764 $(eval $(call BuildPlugin,sndfile,Multi-Format file transcoder,mod_sndfile,,))
765 $(eval $(call BuildPlugin,snipe-hunt,application mod_snipe_hunt,mod_snipe_hunt,,))
766 $(eval $(call BuildPlugin,snmp,Simple Network Management Protocol,mod_snmp,,+libnetsnmp))
767 $(eval $(call BuildPlugin,snom,SNOM specific features,mod_snom,,))
768 $(eval $(call BuildPlugin,sofia,SIP,mod_sofia,,))
769 $(eval $(call BuildPlugin,spandsp,Span DSP,mod_spandsp,,+libjpeg))
770 $(eval $(call BuildPlugin,speex,Speex codec,mod_speex,,))
771 $(eval $(call BuildPlugin,spidermonkey,JavaScript,mod_spidermonkey,,@BROKEN)) # fails in js
772 $(eval $(call BuildPlugin,spidermonkey-core_db,JavaScript DB,mod_spidermonkey_core_db,,@BROKEN))
773 $(eval $(call BuildPlugin,spidermonkey-curl,JavaScript Curl,mod_spidermonkey_curl,,@BROKEN))
774 $(eval $(call BuildPlugin,spidermonkey-odbc,JavaScript ODBC,mod_spidermonkey_odbc,,@BROKEN))
775 $(eval $(call BuildPlugin,spidermonkey-socket,JavaScript socket,mod_spidermonkey_socket,,@BROKEN))
776 $(eval $(call BuildPlugin,spidermonkey-teletone,JavaScript teletone,mod_spidermonkey_teletone,,@BROKEN))
777 $(eval $(call BuildPlugin,spy,User spy,mod_spy,,))
778 $(eval $(call BuildPlugin,stress,application mod_stress,mod_stress,,))
779 $(eval $(call BuildPlugin,syslog,SysLog logger,mod_syslog,,))
780 $(eval $(call BuildPlugin,tone-stream,Tone generation stream,mod_tone_stream,,))
781 $(eval $(call BuildPlugin,tts-commandline,ASR TTS cli,mod_tts_commandline,,))
782 $(eval $(call BuildPlugin,unimrcp,MRCP interface,mod_unimrcp,,@BROKEN))
783 $(eval $(call BuildPlugin,valet-parking,application mod_valet_parking,mod_valet_parking,,))
784 $(eval $(call BuildPlugin,vmd,VoiceMail beep detection,mod_vmd,,))
785 $(eval $(call BuildPlugin,voicemail,VoiceMail,mod_voicemail,,))
786 $(eval $(call BuildPlugin,xml-cdr,XML-CDR handler,mod_xml_cdr,,+libcurl))
787 $(eval $(call BuildPlugin,xml-curl,XML-Curl gateway,mod_xml_curl,,+libcurl))
788 $(eval $(call BuildPlugin,xml-rpc,XML-RPC interface,mod_xml_rpc,,))
789 $(eval $(call BuildPlugin,yaml,YAML dialplans,mod_yaml,,))
790