[packages] asterisk-1.6.x upgrade to 1.6.2.14 and add app_originate
[openwrt/svn-archive/archive.git] / net / asterisk-1.6.x / Makefile
index 1033288ab4989a166c44d5eb942fba2b58f19243..0a8baef14740fff3872b9820513ec9f99517a421 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2008-2009 OpenWrt.org
+# Copyright (C) 2008-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=asterisk
-PKG_VERSION:=1.6.2.6
+PKG_VERSION:=1.6.2.14
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://downloads.digium.com/pub/asterisk/releases/
-PKG_MD5SUM:=f068ef2433eebdc7f6dd635986f36d77
+PKG_MD5SUM:=4f0414c9b2d449222b2fc7096cbaffe7
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -125,9 +125,49 @@ $(call Package/asterisk16/Default/description)
  This package provides the channel chan_gtalk and res_jabber for GTalk
  support to Asterisk.
 endef
+
+define Package/asterisk16-curl
+$(call Package/asterisk16/Default)
+  TITLE:=CURL support
+  DEPENDS:= +asterisk16 +libcurl
+endef
+
+define Package/asterisk16-curl/description
+$(call Package/asterisk16/Default/description)
+ This package provides CURL
+ support to Asterisk.
+endef
  
+ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk16-app-meetme),)
+  CONFIGURE_ARGS+= \
+       --with-dahdi="$(STAGING_DIR)/usr"
+else
+  CONFIGURE_ARGS+= \
+       --without-dahdi
+endif
+
+ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk16-chan-gtalk),)
+  CONFIGURE_ARGS+= \
+       --with-gnutls="$(STAGING_DIR)/usr" \
+       --with-iksemel="$(STAGING_DIR)/usr"
+  SITE_VARS+= \
+       ac_cv_lib_iksemel_iks_start_sasl=yes \
+       ac_cv_lib_gnutls_gnutls_bye=yes
+else
+  CONFIGURE_ARGS+= \
+       --without-gnutls \
+       --without-iksemel
+endif
+
+ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk16-curl),)
+  CONFIGURE_ARGS+= \
+       --with-curl="$(STAGING_DIR)/usr"
+else
+  CONFIGURE_ARGS+= \
+       --without-curl
+endif
+
 CONFIGURE_ARGS+= \
-       --without-curl \
        --without-curses \
        --with-gsm=internal \
        --without-gtk \
@@ -155,31 +195,10 @@ CONFIGURE_ARGS+= \
        --without-vorbis \
        --without-vpb \
        --with-z="$(STAGING_DIR)/usr" \
-       --disable-xmldoc \
-
-ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk16-app-meetme),)
-  CONFIGURE_ARGS+= \
-       --with-dahdi="$(STAGING_DIR)/usr"
-else
-  CONFIGURE_ARGS+= \
-       --without-dahdi
-endif
-
-ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk16-chan-gtalk),)
-  CONFIGURE_ARGS+= \
-       --with-gnutls="$(STAGING_DIR)/usr" \
-       --with-iksemel="$(STAGING_DIR)/usr"
-  SITE_VARS+= \
-       ac_cv_lib_iksemel_iks_start_sasl=yes \
-       ac_cv_lib_gnutls_gnutls_bye=yes
-else
-  CONFIGURE_ARGS+= \
-       --without-gnutls \
-       --without-iksemel
-endif
+       --disable-xmldoc
 
-EXTRA_CFLAGS:= $(TARGET_CPPFLAGS)
-EXTRA_LDFLAGS:= $(TARGET_LDFLAGS)
+EXTRA_CFLAGS+= $(TARGET_CPPFLAGS)
+EXTRA_LDFLAGS+= $(TARGET_LDFLAGS)
 
 define Build/Configure
        -rm $(PKG_BUILD_DIR)/menuselect.makeopts
@@ -191,7 +210,7 @@ define Build/Compile
                include/asterisk/version.h \
                include/asterisk/buildopts.h defaults.h \
                makeopts.embed_rules
-       ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY $(TARGET_CFLAGS)" \
+       ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY" \
        ASTLDFLAGS="$(EXTRA_LDFLAGS)" \
        $(MAKE) -C "$(PKG_BUILD_DIR)" \
                ASTVARLIBDIR="/usr/lib/asterisk" \
@@ -237,7 +256,7 @@ define Package/asterisk16/install
                codec_ulaw codec_gsm \
                format_gsm format_pcm format_wav format_wav_gsm \
                pbx_config \
-               func_strings func_timeout func_callerid; do \
+               func_strings func_timeout func_callerid func_logic; do \
                $(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/$$$$f.so $(1)/usr/lib/asterisk/modules/ ; \
        done
        $(INSTALL_DIR) $(1)/usr/sbin
@@ -338,6 +357,12 @@ define Package/asterisk16-chan-gtalk/install
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_jabber.so $(1)/usr/lib/asterisk/modules/
 endef
 
+define Package/asterisk16-curl/install
+       $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/func_curl.so $(1)/usr/lib/asterisk/modules/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/res_curl.so $(1)/usr/lib/asterisk/modules/
+endef
+
 define BuildAsterisk16ModuleTemplate
 
   define Package/asterisk16-$(subst _,-,$(1))
@@ -367,6 +392,7 @@ $(eval $(call BuildPackage,asterisk16-chan-iax2))
 $(eval $(call BuildPackage,asterisk16-cdr))
 $(eval $(call BuildPackage,asterisk16-res-musiconhold))
 $(eval $(call BuildPackage,asterisk16-chan-gtalk))
+$(eval $(call BuildPackage,asterisk16-curl))
 $(eval $(call BuildAsterisk16ModuleTemplate,app_authenticate,Authenticate,support for executing arbitrary authenticate commands))
 $(eval $(call BuildAsterisk16ModuleTemplate,app_chanisavail,Channel availability check,support for checking if a channel is available))
 $(eval $(call BuildAsterisk16ModuleTemplate,app_chanspy,Channel listen in,support for listening in on any channel))
@@ -399,4 +425,11 @@ $(eval $(call BuildAsterisk16ModuleTemplate,func_global,Global variable,global v
 $(eval $(call BuildAsterisk16ModuleTemplate,func_shell,Shell,support for shell execution))
 $(eval $(call BuildAsterisk16ModuleTemplate,pbx_ael,Asterisk Extension Logic,support for symbolic Asterisk Extension Logic))
 $(eval $(call BuildAsterisk16ModuleTemplate,res_ael_share,Shareable AEL code,support for shareable AEL code mainly between internal and external modules))
+$(eval $(call BuildAsterisk16ModuleTemplate,pbx_spool,Call Spool,outgoing call spool support))
 $(eval $(call BuildAsterisk16ModuleTemplate,res_agi,Asterisk Gateway Interface,support for the Asterisk Gateway Interface extension))
+$(eval $(call BuildAsterisk16ModuleTemplate,app_alarmreceiver,Alarm receiver,Central Station Alarm receiver for Ademco Contact ID))
+$(eval $(call BuildAsterisk16ModuleTemplate,app_setcallerid,Set callerid,support for setting callerid))
+$(eval $(call BuildAsterisk16ModuleTemplate,app_verbose,Verbose logging,Verbose logging application))
+$(eval $(call BuildAsterisk16ModuleTemplate,func_channel,Channel info,Channel info dialplan function))
+$(eval $(call BuildAsterisk16ModuleTemplate,func_blacklist,Blacklist on callerid,looking up the callerid number, and see if it is blacklisted))
+$(eval $(call BuildAsterisk16ModuleTemplate,app_originate,Originate a call,originating an outbound call and connecting it to a specified extension or application))