PKG_NAME:=asterisk13
PKG_VERSION:=13.17.0
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://downloads.asterisk.org/pub/telephony/asterisk/releases/
$(call Package/asterisk13/Default)
TITLE:=Complete open source PBX, v$(PKG_VERSION)
MENU:=1
- DEPENDS:=+jansson +libncurses +libopenssl +libpopt +libsqlite3 +libstdcpp +libuuid +libxml2 +libxslt +zlib
+ DEPENDS:=+jansson +libedit +libncurses +libopenssl +libpopt +libsqlite3 +libstdcpp +libuuid +libxml2 +libxslt +zlib
endef
define Package/asterisk13/description
--without-tonezone
endif
-TARGET_LDFLAGS+= \
- $(if $(CONFIG_PACKAGE_$(PKG_NAME)-pbx-lua),-ldl -lcrypt)
-
-EXTRA_CFLAGS+=$(TARGET_CPPFLAGS)
-EXTRA_LDFLAGS+=$(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
+# Pass CPPFLAGS in the CFLAGS as otherwise the build system will
+# ignore them.
+TARGET_CFLAGS+=$(TARGET_CPPFLAGS)
CONFIGURE_ARGS+= \
--without-execinfo \
--without-bluetooth \
--without-cap \
- $(if $(CONFIG_PACKAGE_$(PKG_NAME)-curl),--with-libcurl="$(STAGING_DIR)/usr",--without-curl) \
+ $(if $(CONFIG_PACKAGE_$(PKG_NAME)-curl),--with-libcurl="$(STAGING_DIR)/usr") \
--without-curses \
--with-gsm=internal \
--without-gtk2 \
--without-nbs \
--without-neon \
--without-neon29 \
+ --with-libedit="$(STAGING_DIR)/usr" \
--with-libxml2 \
--with-ncurses="$(STAGING_DIR)/usr" \
--without-netsnmp \
--without-tds \
--without-termcap \
--without-tinfo \
- --with-uuid="$(STAGING_DIR)/usr" \
--without-vorbis \
--without-vpb \
--with-z="$(STAGING_DIR)/usr" \
ac_cv_lib_srtp2_srtp_init=no \
ac_cv_path_ac_pt_CONFIG_LIBXML2=$(STAGING_DIR)/host/bin/xml2-config
+MAKE_FLAGS+= \
+ ASTDATADIR="/usr/share/asterisk" \
+ DESTDIR="$(PKG_INSTALL_DIR)"
+
+# show full gcc arguments instead of [CC] and [LD]
+MAKE_FLAGS+= \
+ NOISY_BUILD="yes"
+
+# don't let asterisk mess with build flags
+MAKE_FLAGS+= \
+ AST_FORTIFY_SOURCE="" \
+ DEBUG="" \
+ OPTIMIZE=""
+
AST_MENUSELECT_OPTS = \
--without-newt \
--without-curses \
endef
define Build/Configure
- (cd $(PKG_BUILD_DIR); \
- ./bootstrap.sh; \
- );
- $(call Build/Configure/Default,,$(SITE_VARS))
- (cd $(PKG_BUILD_DIR)/menuselect; \
+ cd $(PKG_BUILD_DIR); \
+ ./bootstrap.sh
+ $(call Build/Configure/Default)
+ cd $(PKG_BUILD_DIR)/menuselect; \
./bootstrap.sh; \
CC="$(HOSTCC)" \
CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR_HOSTPKG)/include/libxml2" \
ac_cv_path_ac_pt_CONFIG_LIBXML2=$(STAGING_DIR_HOSTPKG)/bin/xml2-config \
./configure \
$(HOST_CONFIGURE_ARGS) \
- $(AST_MENUSELECT_OPTS) \
- );
+ $(AST_MENUSELECT_OPTS)
endef
define Build/Compile
--disable BUILD_NATIVE \
$(if $(CONFIG_ASTERISK13_LOW_MEMORY),--enable LOW_MEMORY) \
menuselect.makeopts
- $(MAKE) -C "$(PKG_BUILD_DIR)" \
- include/asterisk/version.h \
- include/asterisk/buildopts.h defaults.h
- ASTCFLAGS="$(EXTRA_CFLAGS)" \
- ASTLDFLAGS="$(EXTRA_LDFLAGS)" \
- $(MAKE) -C "$(PKG_BUILD_DIR)" \
- ASTDATADIR="/usr/share/asterisk" \
- NOISY_BUILD="yes" \
- DEBUG="" \
- OPTIMIZE="" \
- DESTDIR="$(PKG_INSTALL_DIR)" \
- all install samples
+ $(call Build/Compile/Default,all install samples)
endef
define Build/InstallDev
$(eval $(call BuildAsterisk13Module,codec-lpc10,Linear to LPC10 translation,translate between signed linear and LPC10,,,codec_lpc10,,))
$(eval $(call BuildAsterisk13Module,codec-resample,resample sLinear audio,resample sLinear audio,,,codec_resample,,))
$(eval $(call BuildAsterisk13Module,codec-ulaw,Signed linear to ulaw translation,translation between signed linear and ulaw codecs,,,codec_ulaw,,))
-$(eval $(call BuildAsterisk13Module,curl,CURL,CURL support,+libcurl,,func_curl res_curl,,))
+$(eval $(call BuildAsterisk13Module,curl,CURL,CURL support,+libcurl,,func_curl res_config_curl res_curl,,))
$(eval $(call BuildAsterisk13Module,format-g726,G.726,support for headerless G.726 16/24/32/40kbps data format,,,format_g726,,))
$(eval $(call BuildAsterisk13Module,format-g729,G.729,support for raw headerless G729 data,,,format_g729,,))
$(eval $(call BuildAsterisk13Module,format-gsm,GSM format,support for GSM format,,,format_gsm,,))
$(eval $(call BuildAsterisk13Module,func-module,Simple module check function,Simple module check function,,,func_module,))
$(eval $(call BuildAsterisk13Module,func-periodic-hook,Periodic dialplan hooks,Execute a periodic dialplan hook into the audio of a call,,,func_periodic_hook,,))
$(eval $(call BuildAsterisk13Module,func-presencestate,Hinted presence state,Gets or sets a presence state in the dialplan,,,func_presencestate,,))
+$(eval $(call BuildAsterisk13Module,func-rand,RAND dialplan function,RAND dialplan function,,,func_rand,,))
$(eval $(call BuildAsterisk13Module,func-realtime,REALTIME dialplan function,REALTIME dialplan function,,,func_realtime,,))
$(eval $(call BuildAsterisk13Module,func-shell,Shell,support for shell execution,,,func_shell,,))
$(eval $(call BuildAsterisk13Module,func-uri,URI encoding and decoding,Encodes and decodes URI-safe strings,,,func_uri,,))
$(eval $(call BuildAsterisk13Module,func-vmcount,vmcount dialplan,a vmcount dialplan function,,,func_vmcount,,))
-$(eval $(call BuildAsterisk13Module,odbc,ODBC,ODBC support,+libpthread +libc +unixodbc,cdr_adaptive_odbc.conf cdr_odbc.conf cel_odbc.conf func_odbc.conf res_odbc.conf,cdr_adaptive_odbc cdr_odbc cel_odbc func_odbc res_config_odbc res_odbc,,))
+$(eval $(call BuildAsterisk13Module,odbc,ODBC,ODBC support,+libpthread +libc +unixodbc,cdr_adaptive_odbc.conf cdr_odbc.conf cel_odbc.conf func_odbc.conf res_odbc.conf,cdr_adaptive_odbc cdr_odbc cel_odbc func_odbc res_config_odbc res_odbc res_odbc_transaction,,))
$(eval $(call BuildAsterisk13Module,pbx-ael,Asterisk Extension Logic,support for symbolic Asterisk Extension Logic,,extensions.ael,pbx_ael,,))
$(eval $(call BuildAsterisk13Module,pbx-dundi,Dundi,provides Dundi Lookup service for Asterisk,,dundi.conf,pbx_dundi,,))
+$(eval $(call BuildAsterisk13Module,pbx-lua,Lua,provides Lua resources for Asterisk,+liblua,extensions.lua,pbx_lua,,))
$(eval $(call BuildAsterisk13Module,pbx-realtime,Realtime Switch,realtime switch support,,,pbx_realtime,,))
$(eval $(call BuildAsterisk13Module,pbx-spool,Call Spool,outgoing call spool support,,,pbx_spool,,))
$(eval $(call BuildAsterisk13Module,pgsql,PostgreSQL,PostgreSQL support,+libpq @!arc,cel_pgsql.conf cdr_pgsql.conf res_pgsql.conf,cel_pgsql cdr_pgsql res_config_pgsql,,))