1561f9b3e5b2aacab556c775bf8009143b31ed8f
[openwrt/svn-archive/archive.git] / net / asterisk / Makefile
1 #
2 # Copyright (C) 2006 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.2.16
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 ftp://ftp.digium.com/pub/asterisk/old-releases
18 PKG_MD5SUM:=88cfcd5c3b2a8f2504e561cb93546299
19 PKG_CAT:=zcat
20
21 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
22 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/asterisk/Default
27 SECTION:=net
28 CATEGORY:=Network
29 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 SUBMENU:=asterisk (Complete Open Source PBX)
36 endef
37
38 define Package/asterisk
39 $(call Package/asterisk/Default)
40 DEPENDS:=+libncurses +libpthread
41 TITLE:=Complete Open Source PBX
42 endef
43
44 define Package/asterisk/conffiles
45 /etc/asterisk/asterisk.conf
46 /etc/asterisk/agents.conf
47 /etc/asterisk/alarmreceiver.conf
48 /etc/asterisk/cdr_manager.conf
49 /etc/asterisk/codecs.conf
50 /etc/asterisk/enum.conf
51 /etc/asterisk/extconfig.conf
52 /etc/asterisk/extensions.conf
53 /etc/asterisk/features.conf
54 /etc/asterisk/iax.conf
55 /etc/asterisk/iaxprov.conf
56 /etc/asterisk/indications.conf
57 /etc/asterisk/logger.conf
58 /etc/asterisk/manager.conf
59 /etc/asterisk/modules.conf
60 /etc/asterisk/musiconhold.conf
61 /etc/asterisk/osp.conf
62 /etc/asterisk/privacy.conf
63 /etc/asterisk/queues.conf
64 /etc/asterisk/rtp.conf
65 /etc/asterisk/sip.conf
66 endef
67
68 define Package/asterisk-mini
69 $(call Package/asterisk/Default)
70 DEPENDS:=+libncurses +libpthread
71 PROVIDES:=asterisk
72 TITLE:=Minimal Open Source PBX
73 DESCRIPTION+=\\\
74 \\\
75 This package contains only the following modules: \\\
76 - app_dial\\\
77 - chan_iax2\\\
78 - chan_local\\\
79 - chan_sip\\\
80 - codec_gsm\\\
81 - codec_ulaw\\\
82 - format_gsm\\\
83 - format_pcm\\\
84 - format_wav\\\
85 - format_wav_gsm\\\
86 - pbx_config\\\
87 - res_features\\\
88 - res_musiconhold
89 endef
90
91 define Package/asterisk-mini/conffiles
92 /etc/asterisk/asterisk.conf
93 /etc/asterisk/enum.conf
94 /etc/asterisk/extconfig.conf
95 /etc/asterisk/extensions.conf
96 /etc/asterisk/features.conf
97 /etc/asterisk/iax.conf
98 /etc/asterisk/iaxprov.conf
99 /etc/asterisk/logger.conf
100 /etc/asterisk/manager.conf
101 /etc/asterisk/modules.conf
102 /etc/asterisk/musiconhold.conf
103 /etc/asterisk/rtp.conf
104 /etc/asterisk/sip.conf
105 endef
106
107 define Package/asterisk-mysql
108 $(call Package/asterisk/Default)
109 DEPENDS:=asterisk +libmysqlclient
110 TITLE:=MySQL support
111 DESCRIPTION+=\\\
112 \\\
113 This package contains MySQL support modules for Asterisk.
114 endef
115
116 define Package/asterisk-mysql/conffiles
117 /etc/asterisk/cdr_mysql.conf
118 endef
119
120 define Package/asterisk-pgsql
121 $(call Package/asterisk/Default)
122 DEPENDS:=asterisk +libpq
123 TITLE:=PostgreSQL support
124 DESCRIPTION+=\\\
125 \\\
126 This package contains PostgreSQL support modules for Asterisk.
127 endef
128
129 define Package/asterisk-pgsql/conffiles
130 /etc/asterisk/cdr_pgsql.conf
131 endef
132
133 define Package/asterisk-sqlite
134 $(call Package/asterisk/Default)
135 DEPENDS:=asterisk +libsqlite2
136 TITLE:=SQLite modules
137 DESCRIPTION+=\\\
138 \\\
139 This package contains SQLite support modules for Asterisk.
140 endef
141
142 define Package/asterisk-sounds
143 $(call Package/asterisk)
144 MENU:=0
145 DEPENDS:=asterisk
146 TITLE:=Sound files
147 DESCRIPTION+=\\\
148 \\\
149 This package contains sound files for Asterisk.
150 endef
151
152 define Package/asterisk-voicemail
153 $(call Package/asterisk/Default)
154 DEPENDS:=asterisk
155 TITLE:=Voicemail support
156 DESCRIPTION+=\\\
157 \\\
158 This package contains voicemail related modules for Asterisk.
159 endef
160
161 define Package/asterisk-voicemail/conffiles
162 /etc/asterisk/voicemail.conf
163 endef
164
165 define Package/asterisk-app-meetme
166 $(call Package/asterisk/Default)
167 DEPENDS:=asterisk +zaptel-libtonezone
168 TITLE:=MeetMe Confererencing support
169 DESCRIPTION+=\\\
170 \\\
171 This package provides the application MeetMe and conferencing support to \\\
172 Asterisk.
173 endef
174
175 define Package/asterisk-app-meetme/conffiles
176 /etc/asterisk/meetme.conf
177 endef
178
179 define Package/asterisk-chan-bluetooth
180 $(call Package/asterisk/Default)
181 DEPENDS:=asterisk +bluez-libs
182 TITLE:=Bluetooth HandsFreeProfile support for Asterisk
183 DESCRIPTION+=\\\
184 \\\
185 This package provides Bluetooth HandsFreeProfile support to Asterisk.
186 endef
187
188 define Package/asterisk-chan-bluetooth/conffiles
189 /etc/asterisk/bluetooth.conf
190 endef
191
192 define Package/asterisk-chan-h323
193 $(call Package/asterisk/Default)
194 DEPENDS:=asterisk +libopenh323 +uclibcxx
195 TITLE:=H.323 support for Asterisk
196 DESCRIPTION+=\\\
197 \\\
198 This package provides H.323 support to Asterisk.
199 endef
200
201 define Package/asterisk-chan-h323/conffiles
202 /etc/asterisk/h323.conf
203 endef
204
205 define Package/asterisk-chan-mgcp
206 $(call Package/asterisk/Default)
207 DEPENDS:=asterisk
208 TITLE:=MGCP support
209 DESCRIPTION+=\\\
210 \\\
211 This package provides MGCP (Media Gateway Control Protocol) support \\\
212 to Asterisk.
213 endef
214
215 define Package/asterisk-chan-mgcp/conffiles
216 /etc/asterisk/mgcp.conf
217 endef
218
219 define Package/asterisk-chan-oss
220 $(call Package/asterisk/Default)
221 DEPENDS:=asterisk
222 TITLE:=chan-oss
223 DESCRIPTION+=\\\
224 \\\
225 Channel driver for OSS sound cards
226 endef
227
228 define Package/asterisk-chan-oss/conffiles
229 /etc/asterisk/oss.conf
230 endef
231
232 define Package/asterisk-chan-skinny
233 $(call Package/asterisk/Default)
234 DEPENDS:=asterisk
235 TITLE:=Skinny Client Control Protocol support
236 DESCRIPTION+=\\\
237 \\\
238 This package provided Skinny Client Control Protocol support to \\\
239 Asterisk.
240 endef
241
242 define Package/asterisk-chan-skinny/conffiles
243 /etc/asterisk/skinny.conf
244 endef
245
246 define Package/asterisk-codec-ilbc
247 $(call Package/asterisk/Default)
248 DEPENDS:=asterisk
249 TITLE:=ILBC Translator
250 DESCRIPTION+=\\\
251 \\\
252 This package contains the ILBC (Internet Low Bitrate Codec) translator \\\
253 for Asterisk.
254 endef
255
256 define Package/asterisk-codec-lpc10
257 $(call Package/asterisk/Default)
258 DEPENDS:=asterisk
259 TITLE:=LPC10 2.4kbps voice codec Translator
260 DESCRIPTION+=\\\
261 \\\
262 This package contains the LPC10 (Linear Predictor Code) 2.4kbps voice \\\
263 codec translator for Asterisk.
264 endef
265
266 define Package/asterisk-codec-speex
267 $(call Package/asterisk/Default)
268 DEPENDS:=asterisk +libspeex
269 TITLE:=Speex/PCM16 Codec Translator
270 DESCRIPTION+=\\\
271 \\\
272 This package contains the Speex speech compression codec translator for \\\
273 Asterisk.
274 endef
275
276 define Package/asterisk-pbx-dundi
277 $(call Package/asterisk/Default)
278 DEPENDS:=asterisk
279 TITLE:=DUNDi support
280 DESCRIPTION+=\\\
281 \\\
282 This package provides DUNDi (Distributed Universal Number Discovery) \\\
283 support to Asterisk.
284 endef
285
286 define Package/asterisk-pbx-dundi/conffiles
287 /etc/asterisk/dundi.conf
288 endef
289
290 define Package/asterisk-res-agi
291 $(call Package/asterisk/Default)
292 DEPENDS:=asterisk
293 TITLE:=AGI support
294 DESCRIPTION+=\\\
295 \\\
296 This package provides AGI (Asterisk Gateway Interface) support to \\\
297 Asterisk.
298 endef
299
300 define Package/asterisk-res-crypto
301 $(call Package/asterisk/Default)
302 DEPENDS:=asterisk +libopenssl
303 TITLE:=Cryptographic Digital Signatures support
304 DESCRIPTION+=\\\
305 \\\
306 This package provides Cryptographic Digital Signatures support to \\\
307 Asterisk.
308 endef
309
310
311 EXTRA_CFLAGS:= -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include
312 EXTRA_LDFLAGS:= -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib
313
314 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk-mysql),)
315 EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/include/mysql
316 EXTRA_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql
317 EXTRA_APP_MODULES+= app_sql_mysql.so
318 EXTRA_CDR_MODULES+= cdr_mysql.so
319 EXTRA_RES_MODULES+= res_config_mysql.so
320 endif
321 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk-pgsql),)
322 EXTRA_APP_MODULES+= app_sql_postgres.so
323 EXTRA_CDR_MODULES+= cdr_pgsql.so
324 endif
325 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk-sqlite),)
326 EXTRA_CDR_MODULES+= cdr_sqlite.so
327 endif
328 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk-app-meetme),)
329 EXTRA_APP_MODULES+= app_meetme.so
330 endif
331 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk-chan-bluetooth),)
332 EXTRA_CHAN_MODULES+= chan_bluetooth.so
333 endif
334 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk-chan-h323),)
335 EXTRA_DEFINES+= \
336 OPENH323DIR="$(BUILD_DIR)/openh323" \
337 PWLIBDIR="$(BUILD_DIR)/pwlib" \
338 CXXLIBS="-nodefaultlibs -luClibc++ -lc -lm -lgcc"
339 EXTRA_CHAN_MODULES+= chan_h323.so
340 endif
341 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk-codec-speex),)
342 EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/include/speex
343 EXTRA_CODEC_MODULES+= codec_speex.so
344 endif
345 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk-res-crypto),)
346 EXTRA_RES_MODULES+= res_crypto.so
347 endif
348
349 define Build/Configure
350 endef
351
352 ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk-chan-h323),)
353 define Build/Compile/chan-h323
354 $(MAKE) -C "$(PKG_BUILD_DIR)/channels/h323" \
355 $(TARGET_CONFIGURE_OPTS) \
356 $(EXTRA_DEFINES) \
357 optnoshared
358 endef
359 endif
360
361 define Build/Compile
362 $(call Build/Compile/chan-h323)
363 $(MAKE) -C "$(PKG_BUILD_DIR)" \
364 CROSS_ARCH="Linux" \
365 CROSS_COMPILE="$(TARGET_CROSS)" \
366 CROSS_COMPILE_BIN="/void/" \
367 CROSS_COMPILE_TARGET="/void/" \
368 $(TARGET_CONFIGURE_OPTS) \
369 HOST_CC="$(HOSTCC)" \
370 OPTIMIZE="$(TARGET_CFLAGS)" \
371 PROC="$(ARCH)" \
372 DEBUG="" \
373 OPTIONS="-DLOW_MEMORY -Dlinux" \
374 NOCRYPTO="yes" \
375 EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
376 EXTRA_LDFLAGS="$(EXTRA_LDFLAGS)" \
377 EXTRA_APP_MODULES="$(EXTRA_APP_MODULES)" \
378 EXTRA_CDR_MODULES="$(EXTRA_CDR_MODULES)" \
379 EXTRA_CHAN_MODULES="$(EXTRA_CHAN_MODULES)" \
380 EXTRA_CODEC_MODULES="$(EXTRA_CODEC_MODULES)" \
381 EXTRA_RES_MODULES="$(EXTRA_RES_MODULES)" \
382 DESTDIR="$(PKG_INSTALL_DIR)" \
383 ASTVARLIBDIR="/usr/lib/asterisk" \
384 $(EXTRA_DEFINES) \
385 all install samples
386 $(SED) 's|/var/lib/asterisk|/usr/lib/asterisk|g' $(PKG_INSTALL_DIR)/etc/asterisk/musiconhold.conf
387 rm -f $(PKG_INSTALL_DIR)/etc/asterisk/*.old
388 endef
389
390 define Package/asterisk/install
391 $(CP) $(PKG_INSTALL_DIR)/* $(1)
392 rm -rf $(1)/usr/sbin/astgenkey
393 rm -rf $(1)/usr/bin
394 rm -rf $(1)/usr/share
395 rm -rf $(1)/usr/include
396 rm -rf $(1)/var
397 (cd $(1)/usr/lib/asterisk; \
398 rm -rf agi-bin; \
399 rm -rf images; \
400 rm -rf keys/*; \
401 rm -rf mohmp3/*.mp3; \
402 rm -rf sounds/*; \
403 cd modules; \
404 rm -rf *adsi* *festival* *modem* *meetme* *oss* *phone* *intercom* \
405 *mp3* *nbscat* *mysql* *postgres* *pgsql* *voicemail* *speex* \
406 *zapateller* *jpeg*; \
407 rm -f chan_bluetooth.so ; \
408 rm -f chan_h323.so ; \
409 rm -f chan_mgcp.so ; \
410 rm -f chan_skinny.so ; \
411 rm -f chan_oss.so ; \
412 rm -f {codec,format}_ilbc.so ; \
413 rm -f codec_lpc10.so ; \
414 rm -f pbx_dundi.so ; \
415 rm -f res_agi.so ; \
416 rm -f res_crypto.so ; \
417 )
418 (cd $(1)/etc/asterisk; \
419 rm -f *odbc* *mysql* *postgres* *pgsql* *voicemail* *adsi* *oss* *alsa* \
420 *festival* *modem* *meetme* *phone* *tds* *vofr* *rpt* *vpb* \
421 *zapata*; \
422 rm -f bluetooth.conf ; \
423 rm -f mgcp.conf ; \
424 rm -f skinny.conf ; \
425 rm -f oss.conf ; \
426 rm -f dundi.conf ; \
427 )
428 $(INSTALL_DATA) ./files/modules.conf $(1)/etc/asterisk/
429 $(INSTALL_DIR) $(1)/etc/default
430 $(INSTALL_DATA) ./files/asterisk.default $(1)/etc/default/asterisk
431 $(INSTALL_DIR) $(1)/etc/init.d
432 $(INSTALL_BIN) ./files/asterisk.init $(1)/etc/init.d/asterisk
433 endef
434
435 define Package/asterisk-mini/install
436 $(INSTALL_DIR) $(1)/etc/asterisk
437 for f in asterisk enum extconfig extensions features iax iaxprov logger manager modules musiconhold rtp sip; do \
438 $(CP) $(PKG_INSTALL_DIR)/etc/asterisk/$$$$f.conf $(1)/etc/asterisk/ ; \
439 done
440 $(INSTALL_DATA) ./files/modules.conf $(1)/etc/asterisk/
441 $(INSTALL_DIR) $(1)/usr/lib/asterisk
442 $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/firmware $(1)/usr/lib/asterisk/
443 $(INSTALL_DIR) $(1)/usr/lib/asterisk/keys
444 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
445 for f in app_dial chan_iax2 chan_local chan_sip codec_gsm codec_ulaw format_gsm format_pcm format_wav \
446 format_wav_gsm pbx_config res_features res_musiconhold; do \
447 $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/$$$$f.so $(1)/usr/lib/asterisk/modules/ ; \
448 done
449 $(INSTALL_DIR) $(1)/usr/lib/asterisk/mohmp3
450 $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds
451 $(INSTALL_DIR) $(1)/usr/sbin
452 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/asterisk $(1)/usr/sbin/
453 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/safe_asterisk $(1)/usr/sbin/
454 $(INSTALL_DIR) $(1)/etc/default
455 $(INSTALL_DATA) ./files/asterisk.default $(1)/etc/default/asterisk
456 $(INSTALL_DIR) $(1)/etc/init.d
457 $(INSTALL_BIN) ./files/asterisk.init $(1)/etc/init.d/asterisk
458 endef
459
460 define Package/asterisk-mysql/install
461 $(INSTALL_DIR) $(1)/etc/asterisk
462 $(INSTALL_CONF) $(PKG_BUILD_DIR)/configs/cdr_mysql.conf.sample $(1)/etc/asterisk/cdr_mysql.conf
463 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
464 $(INSTALL_BIN) $(PKG_BUILD_DIR)/apps/app_sql_mysql.so $(1)/usr/lib/asterisk/modules/
465 $(INSTALL_BIN) $(PKG_BUILD_DIR)/cdr/cdr_mysql.so $(1)/usr/lib/asterisk/modules/
466 endef
467
468 define Package/asterisk-pgsql/install
469 $(INSTALL_DIR) $(1)/etc/asterisk
470 $(INSTALL_CONF) $(PKG_BUILD_DIR)/configs/cdr_pgsql.conf.sample $(1)/etc/asterisk/cdr_pgsql.conf
471 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
472 $(INSTALL_BIN) $(PKG_BUILD_DIR)/apps/app_sql_postgres.so $(1)/usr/lib/asterisk/modules/
473 $(INSTALL_BIN) $(PKG_BUILD_DIR)/cdr/cdr_pgsql.so $(1)/usr/lib/asterisk/modules/
474 endef
475
476 define Package/asterisk-sqlite/install
477 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
478 $(INSTALL_BIN) $(PKG_BUILD_DIR)/cdr/cdr_sqlite.so $(1)/usr/lib/asterisk/modules/
479 endef
480
481 define Package/asterisk-sounds/install
482 $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds
483 $(CP) $(PKG_BUILD_DIR)/sounds/* $(1)/usr/lib/asterisk/sounds/
484 rm -f $(1)/usr/lib/asterisk/sounds/*.mp3
485 rm -f $(1)/usr/lib/asterisk/sounds/vm-*
486 endef
487
488 define Package/asterisk-voicemail/install
489 $(INSTALL_DIR) $(1)/etc/asterisk
490 $(INSTALL_DATA) $(PKG_BUILD_DIR)/configs/voicemail.conf.sample $(1)/etc/asterisk/voicemail.conf
491 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
492 $(INSTALL_BIN) $(PKG_BUILD_DIR)/apps/*voicemail.so $(1)/usr/lib/asterisk/modules/
493 $(INSTALL_BIN) $(PKG_BUILD_DIR)/res/res_adsi.so $(1)/usr/lib/asterisk/modules/
494 $(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds
495 $(CP) $(PKG_BUILD_DIR)/sounds/vm-*.gsm $(1)/usr/lib/asterisk/sounds/
496 endef
497
498 define Package/asterisk-app-meetme/install
499 $(INSTALL_DIR) $(1)/etc/asterisk
500 $(INSTALL_DATA) $(PKG_BUILD_DIR)/configs/meetme.conf.sample $(1)/etc/asterisk/meetme.conf
501 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
502 $(INSTALL_BIN) $(PKG_BUILD_DIR)/apps/app_meetme.so $(1)/usr/lib/asterisk/modules/
503 endef
504
505 define Package/asterisk-chan-bluetooth/install
506 $(INSTALL_DIR) $(1)/etc/asterisk
507 $(INSTALL_DATA) $(PKG_BUILD_DIR)/configs/bluetooth.conf $(1)/etc/asterisk/bluetooth.conf
508 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
509 $(INSTALL_BIN) $(PKG_BUILD_DIR)/channels/chan_bluetooth.so $(1)/usr/lib/asterisk/modules/
510 endef
511
512 define Package/asterisk-chan-h323/install
513 $(INSTALL_DIR) $(1)/etc/asterisk
514 $(INSTALL_DATA) $(PKG_BUILD_DIR)/channels/h323/h323.conf.sample $(1)/etc/asterisk/h323.conf
515 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
516 $(INSTALL_BIN) $(PKG_BUILD_DIR)/channels/chan_h323.so $(1)/usr/lib/asterisk/modules/
517 endef
518
519 define Package/asterisk-chan-mgcp/install
520 $(INSTALL_DIR) $(1)/etc/asterisk
521 $(INSTALL_DATA) $(PKG_BUILD_DIR)/configs/mgcp.conf.sample $(1)/etc/asterisk/mgcp.conf
522 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
523 $(INSTALL_BIN) $(PKG_BUILD_DIR)/channels/chan_mgcp.so $(1)/usr/lib/asterisk/modules/
524 endef
525
526 define Package/asterisk-chan-oss/install
527 $(INSTALL_DIR) $(1)/etc/asterisk
528 $(INSTALL_DATA) $(PKG_BUILD_DIR)/configs/oss.conf.sample $(1)/etc/asterisk/oss.conf
529 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
530 $(INSTALL_BIN) $(PKG_BUILD_DIR)/channels/chan_oss.so $(1)/usr/lib/asterisk/modules/
531 endef
532
533 define Package/asterisk-chan-skinny/install
534 $(INSTALL_DIR) $(1)/etc/asterisk
535 $(INSTALL_DATA) $(PKG_BUILD_DIR)/configs/skinny.conf.sample $(1)/etc/asterisk/skinny.conf
536 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
537 $(INSTALL_BIN) $(PKG_BUILD_DIR)/channels/chan_skinny.so $(1)/usr/lib/asterisk/modules/
538 endef
539
540 define Package/asterisk-code-ilbc/install
541 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
542 $(INSTALL_BIN) $(PKG_BUILD_DIR)/codecs/codec_ilbc.so $(1)/usr/lib/asterisk/modules/
543 $(INSTALL_BIN) $(PKG_BUILD_DIR)/formats/format_ilbc.so $(1)/usr/lib/asterisk/modules/
544 endef
545
546 define Package/asterisk-codec-lpc10/install
547 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
548 $(INSTALL_BIN) $(PKG_BUILD_DIR)/codecs/codec_lpc10.so $(1)/usr/lib/asterisk/modules/
549 endef
550
551 define Package/asterisk-codec-speex/install
552 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
553 $(INSTALL_BIN) $(PKG_BUILD_DIR)/codecs/codec_speex.so $(1)/usr/lib/asterisk/modules/
554 endef
555
556 define Package/asterisk-pbx-dundi/install
557 $(INSTALL_DIR) $(1)/etc/asterisk
558 $(INSTALL_DATA) $(PKG_BUILD_DIR)/configs/dundi.conf.sample $(1)/etc/asterisk/dundi.conf
559 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
560 $(INSTALL_BIN) $(PKG_BUILD_DIR)/pbx/pbx_dundi.so $(1)/usr/lib/asterisk/modules/
561 endef
562
563 define Package/asterisk-res-agi/install
564 $(INSTALL_DIR) $(1)/usr/lib/asterisk/agi-bin
565 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
566 $(INSTALL_BIN) $(PKG_BUILD_DIR)/res/res_agi.so $(1)/usr/lib/asterisk/modules/
567 endef
568
569 define Package/asterisk-res-crypto/install
570 $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
571 $(INSTALL_BIN) $(PKG_BUILD_DIR)/res/res_crypto.so $(1)/usr/lib/asterisk/modules/
572 endef
573
574 define Build/InstallDev
575 mkdir -p $(STAGING_DIR)/usr/include
576 $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk \
577 $(STAGING_DIR)/usr/include/
578 endef
579
580 define Build/UninstallDev
581 rm -rf $(STAGING_DIR)/usr/include/asterisk
582 endef
583
584 $(eval $(call BuildPackage,asterisk))
585 $(eval $(call BuildPackage,asterisk-mysql))
586 $(eval $(call BuildPackage,asterisk-pgsql))
587 $(eval $(call BuildPackage,asterisk-sqlite))
588 $(eval $(call BuildPackage,asterisk-sounds))
589 $(eval $(call BuildPackage,asterisk-voicemail))
590 $(eval $(call BuildPackage,asterisk-app-meetme))
591 $(eval $(call BuildPackage,asterisk-chan-bluetooth))
592 $(eval $(call BuildPackage,asterisk-chan-h323))
593 $(eval $(call BuildPackage,asterisk-chan-mgcp))
594 $(eval $(call BuildPackage,asterisk-chan-oss))
595 $(eval $(call BuildPackage,asterisk-chan-skinny))
596 $(eval $(call BuildPackage,asterisk-codec-ilbc))
597 $(eval $(call BuildPackage,asterisk-codec-lpc10))
598 $(eval $(call BuildPackage,asterisk-codec-speex))
599 $(eval $(call BuildPackage,asterisk-pbx-dundi))
600 $(eval $(call BuildPackage,asterisk-res-agi))
601 $(eval $(call BuildPackage,asterisk-res-crypto))
602 $(eval $(call BuildPackage,asterisk-mini))