2 # Copyright (C) 2008-2009 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
11 PKG_VERSION
:=1.6.2.0-rc6
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=http
://downloads.digium.com
/pub
/asterisk
/releases
/
16 PKG_MD5SUM
:=770a80d306ccc928481ff9030d7fec38
18 include $(INCLUDE_DIR
)/package.mk
20 define Package
/asterisk16
/Default
21 SUBMENU
:=asterisk16
(Complete Open Source PBX
), v1.6.x
24 URL
:=http
://www.asterisk.org
/
27 define Package
/asterisk16
/Default
/description
28 Asterisk is a complete PBX in software. It provides
all of the features
29 you would expect from a PBX and more. Asterisk does voice over IP in three
30 protocols
, and can interoperate with almost
all standards-based telephony
31 equipment using relatively inexpensive hardware.
35 define Package
/asterisk16
36 $(call Package
/asterisk16
/Default
)
37 TITLE
:=Complete open source PBX
38 DEPENDS
:= +libopenssl
+libncurses
+libpopt
+libpthread
+zlib @
!TARGET_avr32 @
!PACKAGE_asterisk14
41 define Package
/asterisk16
/description
42 $(call Package
/asterisk16
/Default
/description
)
45 define Package
/asterisk16-sounds
46 $(call Package
/asterisk16
/Default
)
51 define Package
/asterisk16-sounds
/description
52 $(call Package
/asterisk16
/Default
/description
)
53 This package contains sound files for Asterisk.
57 define Package
/asterisk16-voicemail
58 $(call Package
/asterisk16
/Default
)
59 TITLE
:=Voicemail support
63 define Package
/asterisk16-voicemail
/description
64 $(call Package
/asterisk16
/Default
/description
)
65 This package contains voicemail related modules for Asterisk.
68 define Package
/asterisk16-app-meetme
69 $(call Package
/asterisk16
/Default
)
70 TITLE
:=conferencing support
71 DEPENDS
:= +asterisk16
+dahdi-tools-libtonezone
+kmod-dahdi-linux
74 define Package
/asterisk16-app-meetme
/description
75 $(call Package
/asterisk16
/Default
/description
)
76 This package provides the MeetMe application driver Conferencing support to
80 define Package
/asterisk16-chan-iax2
81 $(call Package
/asterisk16
/Default
)
86 define Package
/asterisk16-chan-iax2
/description
87 $(call Package
/asterisk16
/Default
/description
)
88 This package provides IAX support to
92 define Package
/asterisk16-chan-local
93 $(call Package
/asterisk16
/Default
)
94 TITLE
:=chan_local support
98 define Package
/asterisk16-chan-local
/description
99 $(call Package
/asterisk16
/Default
/description
)
100 This package provides chan_local support to
104 define Package
/asterisk16-cdr
105 $(call Package
/asterisk16
/Default
)
107 DEPENDS
:= +asterisk16
110 define Package
/asterisk16-cdr
/description
111 $(call Package
/asterisk16
/Default
/description
)
112 This package provides Call Detail Record support to
116 define Package
/asterisk16-res-musiconhold
117 $(call Package
/asterisk16
/Default
)
119 DEPENDS
:= +asterisk16
122 define Package
/asterisk16-res-musiconhold
/description
123 $(call Package
/asterisk16
/Default
/description
)
124 This package provides Music On Hold support to
128 define Package
/asterisk16-format-g729
129 $(call Package
/asterisk16
/Default
)
131 DEPENDS
:= +asterisk16
134 define Package
/asterisk16-format-g729
/description
135 $(call Package
/asterisk16
/Default
/description
)
136 This package provides G
.729 support to
140 define Package
/asterisk16-chan-gtalk
141 $(call Package
/asterisk16
/Default
)
143 DEPENDS
:= +asterisk16
+libiksemel
146 define Package
/asterisk16-chan-gtalk
/description
147 $(call Package
/asterisk16
/Default
/description
)
148 This package provides the channel chan_gtalk and res_jabber for GTalk
152 define Package
/asterisk16-app-system
153 $(call Package
/asterisk16
/Default
)
154 TITLE
:=System exec support
155 DEPENDS
:= +asterisk16
158 define Package
/asterisk16-app-system
/description
159 $(call Package
/asterisk16
/Default
/description
)
160 This package provides support for executing system commands in Asterisk.
166 --with-gsm
=internal \
173 --with-ncurses
="$(STAGING_DIR)/usr" \
179 --with-popt
="$(STAGING_DIR)/usr" \
191 --with-z
="$(STAGING_DIR)/usr" \
194 ifneq ($(SDK
)$(CONFIG_PACKAGE_asterisk16-app-meetme
),)
196 --with-dahdi
="$(STAGING_DIR)/usr"
202 ifneq ($(SDK
)$(CONFIG_PACKAGE_asterisk16-chan-gtalk
),)
204 --with-gnutls
="$(STAGING_DIR)/usr" \
205 --with-iksemel
="$(STAGING_DIR)/usr"
207 ac_cv_lib_iksemel_iks_start_sasl
=yes \
208 ac_cv_lib_gnutls_gnutls_bye
=yes
215 EXTRA_CFLAGS
:= $(TARGET_CPPFLAGS
)
216 EXTRA_LDFLAGS
:= $(TARGET_LDFLAGS
)
218 define Build
/Configure
219 -rm $(PKG_BUILD_DIR
)/menuselect.makeopts
220 $(call Build
/Configure
/Default
,,$(SITE_VARS
))
224 $(MAKE
) -C
"$(PKG_BUILD_DIR)" \
225 include/asterisk
/version.h \
226 include/asterisk
/buildopts.h defaults.h \
228 ASTCFLAGS
="$(EXTRA_CFLAGS) -DLOW_MEMORY $(TARGET_CFLAGS)" \
229 ASTLDFLAGS
="$(EXTRA_LDFLAGS)" \
230 $(MAKE
) -C
"$(PKG_BUILD_DIR)" \
231 ASTVARLIBDIR
="/usr/lib/asterisk" \
235 DESTDIR
="$(PKG_INSTALL_DIR)" \
237 $(SED
) 's|/var/lib/asterisk|/usr/lib/asterisk|g' $(PKG_INSTALL_DIR
)/etc
/asterisk
/musiconhold.conf
240 #define Build/InstallDev
241 # $(INSTALL_DIR) $(1)/usr/include/asterisk/
242 # $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk/*.h $(1)/usr/include/asterisk/
243 # $(CP) $(PKG_INSTALL_DIR)/usr/include/asterisk.h $(1)/usr/include/
246 define Package
/asterisk16
/conffiles
247 /etc
/asterisk
/asterisk.conf
248 /etc
/asterisk
/modules.conf
249 /etc
/asterisk
/extensions.conf
250 /etc
/asterisk
/sip.conf
251 /etc
/asterisk
/sip_notify.conf
252 /etc
/asterisk
/features.conf
253 /etc
/asterisk
/logger.conf
254 /etc
/asterisk
/manager.conf
255 /etc
/asterisk
/rtp.conf
256 /etc
/default
/asterisk
260 define Package
/asterisk16
/install
261 $(INSTALL_DIR
) $(1)/etc
/asterisk
262 for f in asterisk extensions features \
263 logger manager modules \
264 sip sip_notify rtp
; do \
265 $(CP
) $(PKG_INSTALL_DIR
)/etc
/asterisk
/$$$$f.conf
$(1)/etc
/asterisk
/ ; \
267 $(INSTALL_DIR
) $(1)/usr
/lib
/asterisk
/modules
268 for f in app_dial app_echo app_playback app_macro \
270 codec_ulaw codec_gsm \
271 format_gsm format_pcm format_wav format_wav_gsm \
273 func_strings func_timeout func_callerid
; do \
274 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/modules
/$$$$f.so
$(1)/usr
/lib
/asterisk
/modules
/ ; \
276 $(INSTALL_DIR
) $(1)/usr
/sbin
277 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/asterisk
$(1)/usr
/sbin
/
278 $(INSTALL_DIR
) $(1)/etc
/default
279 $(INSTALL_DATA
) .
/files
/asterisk.default
$(1)/etc
/default
/asterisk
280 $(INSTALL_DIR
) $(1)/etc
/init.d
281 $(INSTALL_BIN
) .
/files
/asterisk.init
$(1)/etc
/init.d
/asterisk
284 define Package
/asterisk16-sounds
/install
285 $(INSTALL_DIR
) $(1)/usr
/lib
/asterisk
/sounds
/
286 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/sounds
/en
/* $(1)/usr
/lib
/asterisk
/sounds
/
287 rm -f
$(1)/usr
/lib
/asterisk
/sounds
/vm-
*
288 rm -f
$(1)/usr
/lib
/asterisk
/sounds
/conf-
*
292 define Package
/asterisk16-voicemail
/conffiles
293 /etc
/asterisk
/voicemail.conf
296 define Package
/asterisk16-voicemail
/install
297 $(INSTALL_DIR
) $(1)/etc
/asterisk
298 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/etc
/asterisk
/voicemail.conf
$(1)/etc
/asterisk
/
299 $(INSTALL_DIR
) $(1)/usr
/lib
/asterisk
/modules
300 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/modules
/*voicemail.so
$(1)/usr
/lib
/asterisk
/modules
/
301 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/modules
/res_adsi.so
$(1)/usr
/lib
/asterisk
/modules
/
302 $(INSTALL_DIR
) $(1)/usr
/lib
/asterisk
/sounds
/
303 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/sounds
/en
/vm-
*.gsm
$(1)/usr
/lib
/asterisk
/sounds
/
306 define Package
/asterisk16-app-meetme
/conffiles
307 /etc
/asterisk
/meetme.conf
310 define Package
/asterisk16-app-meetme
/install
311 $(INSTALL_DIR
) $(1)/etc
/asterisk
312 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/etc
/asterisk
/meetme.conf
$(1)/etc
/asterisk
/
313 $(INSTALL_DIR
) $(1)/usr
/lib
/asterisk
/modules
314 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/modules
/app_meetme.so
$(1)/usr
/lib
/asterisk
/modules
/
315 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/modules
/chan_dahdi.so
$(1)/usr
/lib
/asterisk
/modules
/
316 $(INSTALL_DIR
) $(1)/usr
/lib
/asterisk
/sounds
/
317 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/sounds
/en
/conf-
*.gsm
$(1)/usr
/lib
/asterisk
/sounds
/
320 define Package
/asterisk16-chan-iax2
/conffiles
321 /etc
/asterisk
/iax.conf
322 /etc
/asterisk
/iaxprov.conf
325 define Package
/asterisk16-cdr
/conffiles
326 /etc
/asterisk
/cdr.conf
327 /etc
/asterisk
/cdr_custom.conf
328 /etc
/asterisk
/cdr_manager.conf
329 /etc
/asterisk
/cdr_odbc.conf
330 /etc
/asterisk
/cdr_pgsql.conf
331 /etc
/asterisk
/cdr_tds.conf
334 define Package
/asterisk16-res-musiconhold
/conffiles
335 /etc
/asterisk
/musiconhold.conf
338 define Package
/asterisk16-chan-iax2
/install
339 $(INSTALL_DIR
) $(1)/etc
/asterisk
340 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/etc
/asterisk
/iax.conf
$(1)/etc
/asterisk
/
341 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/etc
/asterisk
/iaxprov.conf
$(1)/etc
/asterisk
/
342 $(INSTALL_DIR
) $(1)/usr
/lib
/asterisk
/modules
343 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/modules
/chan_iax2.so
$(1)/usr
/lib
/asterisk
/modules
/
346 define Package
/asterisk16-chan-local
/install
347 $(INSTALL_DIR
) $(1)/usr
/lib
/asterisk
/modules
348 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/modules
/chan_local.so
$(1)/usr
/lib
/asterisk
/modules
/
351 define Package
/asterisk16-cdr
/install
352 $(INSTALL_DIR
) $(1)/etc
/asterisk
353 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/etc
/asterisk
/cdr
*.conf
$(1)/etc
/asterisk
/
354 $(INSTALL_DIR
) $(1)/usr
/lib
/asterisk
/modules
355 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/modules
/*cdr
*.so
$(1)/usr
/lib
/asterisk
/modules
/
358 define Package
/asterisk16-res-musiconhold
/install
359 $(INSTALL_DIR
) $(1)/etc
/asterisk
360 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/etc
/asterisk
/musiconhold.conf
$(1)/etc
/asterisk
/
361 $(INSTALL_DIR
) $(1)/usr
/lib
/asterisk
/modules
362 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/modules
/res_musiconhold.so
$(1)/usr
/lib
/asterisk
/modules
/
365 define Package
/asterisk16-format-g729
/install
366 $(INSTALL_DIR
) $(1)/usr
/lib
/asterisk
/modules
367 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/modules
/format_g729.so
$(1)/usr
/lib
/asterisk
/modules
/
370 define Package
/asterisk16-chan-gtalk
/conffiles
371 /etc
/asterisk
/gtalk.conf
372 /etc
/asterisk
/jabber.conf
375 define Package
/asterisk16-chan-gtalk
/install
376 $(INSTALL_DIR
) $(1)/etc
/asterisk
377 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/etc
/asterisk
/gtalk.conf
$(1)/etc
/asterisk
/
378 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/etc
/asterisk
/jabber.conf
$(1)/etc
/asterisk
/
379 $(INSTALL_DIR
) $(1)/usr
/lib
/asterisk
/modules
380 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/modules
/chan_gtalk.so
$(1)/usr
/lib
/asterisk
/modules
/
381 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/modules
/res_jabber.so
$(1)/usr
/lib
/asterisk
/modules
/
384 define Package
/asterisk16-app-system
/install
385 $(INSTALL_DIR
) $(1)/usr
/lib
/asterisk
/modules
386 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/asterisk
/modules
/app_system.so
$(1)/usr
/lib
/asterisk
/modules
/
389 $(eval
$(call BuildPackage
,asterisk16
))
390 $(eval
$(call BuildPackage
,asterisk16-voicemail
))
391 $(eval
$(call BuildPackage
,asterisk16-sounds
))
392 #$(eval $(call BuildPackage,asterisk16-app-meetme))
393 $(eval
$(call BuildPackage
,asterisk16-chan-iax2
))
394 $(eval
$(call BuildPackage
,asterisk16-chan-local
))
395 $(eval
$(call BuildPackage
,asterisk16-cdr
))
396 $(eval
$(call BuildPackage
,asterisk16-res-musiconhold
))
397 $(eval
$(call BuildPackage
,asterisk16-format-g729
))
398 $(eval
$(call BuildPackage
,asterisk16-chan-gtalk
))
399 $(eval
$(call BuildPackage
,asterisk16-app-system
))