From 8510c786c050daa26ca40d9455e2fa130dd3fb08 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Fri, 9 Mar 2018 12:55:25 +0100 Subject: [PATCH 1/4] asterisk-15.x: add missing util dependencies The AEL utils need the pbx-ael module selected, otherwise they won't be built. Signed-off-by: Sebastian Kemper --- net/asterisk-15.x/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/asterisk-15.x/Makefile b/net/asterisk-15.x/Makefile index 088b7cd..3a50ae8 100644 --- a/net/asterisk-15.x/Makefile +++ b/net/asterisk-15.x/Makefile @@ -724,13 +724,13 @@ $(eval $(call BuildAsterisk15Module,voicemail,Voicemail,voicemail related module ################################ # $(eval $(call BuildAsterisk15Util,Utility,Description,Dependencies,Configuration Files)) -$(eval $(call BuildAsterisk15Util,aelparse,Check extensions.ael file.,,)) +$(eval $(call BuildAsterisk15Util,aelparse,Check extensions.ael file.,+$(PKG_NAME)-pbx-ael,)) $(eval $(call BuildAsterisk15Util,astcanary,Assures Asterisk no threads have gone missing.,,)) $(eval $(call BuildAsterisk15Util,astdb2sqlite3,Convert astdb to SQLite 3.,,)) $(eval $(call BuildAsterisk15Util,astdb2bdb,Convert astdb back to Berkeley DB 1.86.,,)) $(eval $(call BuildAsterisk15Util,check_expr,Expression checker [older version].,,)) $(eval $(call BuildAsterisk15Util,check_expr2,Expression checker [newer version].,,)) -$(eval $(call BuildAsterisk15Util,conf2ael,Convert .conf to .ael.,,)) +$(eval $(call BuildAsterisk15Util,conf2ael,Convert .conf to .ael.,+$(PKG_NAME)-pbx-ael,)) $(eval $(call BuildAsterisk15Util,muted,Listens for AMI events. Mutes soundcard during call.,,muted.conf)) $(eval $(call BuildAsterisk15Util,smsq,Send messages from command line.,,)) $(eval $(call BuildAsterisk15Util,stereorize,Merge two mono WAV-files to one stereo WAV-file.,,)) From dc40ee03e4179e4f79599b55a741c8c3f9df4ac1 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Fri, 9 Mar 2018 12:57:45 +0100 Subject: [PATCH 2/4] asterisk-15.x: update compile stage - define Build/menuselect for reuse - call the default Compile define for menuselect-tree Signed-off-by: Sebastian Kemper --- net/asterisk-15.x/Makefile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/net/asterisk-15.x/Makefile b/net/asterisk-15.x/Makefile index 3a50ae8..6ba714f 100644 --- a/net/asterisk-15.x/Makefile +++ b/net/asterisk-15.x/Makefile @@ -379,6 +379,13 @@ AST_MENUSELECT_OPTS = \ --without-curses \ --with-libxml2="$(STAGING_DIR_HOSTPKG)/usr" +define Build/menuselect + CC="$(HOSTCC)" \ + CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR_HOSTPKG)/include/libxml2" \ + LDFLAGS="$(HOST_LDFLAGS) -Wl,-rpath,$(STAGING_DIR_HOSTPKG)/lib" \ + $(MAKE) -C "$(PKG_BUILD_DIR)/menuselect" +endef + define Build/Configure cd $(PKG_BUILD_DIR); \ ./bootstrap.sh @@ -396,11 +403,9 @@ define Build/Configure endef define Build/Compile - CC="$(HOSTCC)" \ - CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR_HOSTPKG)/include/libxml2" \ - LDFLAGS="$(HOST_LDFLAGS) -Wl,-rpath,$(STAGING_DIR_HOSTPKG)/lib" \ - $(MAKE) -C "$(PKG_BUILD_DIR)/menuselect" - $(MAKE) -C "$(PKG_BUILD_DIR)" menuselect-tree + $(call Build/menuselect) + $(call Build/Compile/Default,menuselect-tree) + cd "$(PKG_BUILD_DIR)" && MENUSELECT_ARGS= && \ for cat in $(MENUSELECT_CATEGORIES); do \ MENUSELECT_ARGS="$$$$MENUSELECT_ARGS --disable-category $$$$cat"; \ From ec4ecc032dfcc581408bef3ba861623c601f1c82 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Fri, 9 Mar 2018 12:59:36 +0100 Subject: [PATCH 3/4] asterisk-15.x: remove .lastclean hack Remove the hack. Instead just call make with .lastclean and afterward make menuselect again. If .lastclean was not removed by menuselect this will not do anything, which is nice. Signed-off-by: Sebastian Kemper --- net/asterisk-15.x/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/net/asterisk-15.x/Makefile b/net/asterisk-15.x/Makefile index 6ba714f..a5e60b9 100644 --- a/net/asterisk-15.x/Makefile +++ b/net/asterisk-15.x/Makefile @@ -425,13 +425,15 @@ define Build/Compile --disable BUILD_NATIVE \ $(if $(CONFIG_ASTERISK15_LOW_MEMORY),--enable LOW_MEMORY) \ menuselect.makeopts - # Hack: + # When changing anything in MENUSELECT_CFLAGS the file ".lastclean" # gets deleted. E.g. when compiling on x86 for x86 "--disable # BUILD_NATIVE" changes MENUSELECT_CFLAGS and the file gets removed. # But that will result in a rebuild attempt of menuselect which will - # likely fail. Prevent that by recreating ".lastclean". - $(CP) "$(PKG_BUILD_DIR)/.cleancount" "$(PKG_BUILD_DIR)/.lastclean" + # likely fail. Prevent that by recreating ".lastclean" and menuselect. + $(call Build/Compile/Default,.lastclean) + $(call Build/menuselect) + $(call Build/Compile/Default,all install samples) endef From 59edf25bc1fa98c42f8ee092b7db180647be9c21 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Fri, 9 Mar 2018 13:01:29 +0100 Subject: [PATCH 4/4] asterisk-15.x: add PKG_CONFIG_DEPENDS The module and util lists are necessary, unfortunately. But having working PKG_CONFIG_DEPENDS is nice and the lists rarely need updating. Signed-off-by: Sebastian Kemper --- net/asterisk-15.x/Makefile | 282 ++++++++++++++++++++++++++++++++++++- 1 file changed, 281 insertions(+), 1 deletion(-) diff --git a/net/asterisk-15.x/Makefile b/net/asterisk-15.x/Makefile index a5e60b9..66aa265 100644 --- a/net/asterisk-15.x/Makefile +++ b/net/asterisk-15.x/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=asterisk15 PKG_VERSION:=15.2.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://downloads.asterisk.org/pub/telephony/asterisk/releases @@ -37,8 +37,288 @@ MENUSELECT_CATEGORIES:= \ MENUSELECT_UTILS \ MENUSELECT_AGIS +MODULES_AVAILABLE:= \ + app-adsiprog \ + app-agent-pool \ + app-alarmreceiver \ + app-amd \ + app-authenticate \ + app-bridgeaddchan \ + app-bridgewait \ + app-celgenuserevent \ + app-chanisavail \ + app-channelredirect \ + app-chanspy \ + app-confbridge \ + app-controlplayback \ + app-dahdiras \ + app-dictate \ + app-directed_pickup \ + app-directory \ + app-disa \ + app-dumpchan \ + app-exec \ + app-externalivr \ + app-festival \ + app-flash \ + app-followme \ + app-getcpeid \ + app-ices \ + app-image \ + app-ivrdemo \ + app-milliwatt \ + app-minivm \ + app-mixmonitor \ + app-morsecode \ + app-mp3 \ + app-originate \ + app-page \ + app-playtones \ + app-privacy \ + app-queue \ + app-read \ + app-readexten \ + app-record \ + app-saycounted \ + app-sayunixtime \ + app-senddtmf \ + app-sendtext \ + app-skel \ + app-sms \ + app-softhangup \ + app-speech \ + app-stack \ + app-stasis \ + app-statsd \ + app-stream-echo \ + app-system \ + app-talkdetect \ + app-test \ + app-transfer \ + app-url \ + app-userevent \ + app-verbose \ + app-waitforring \ + app-waitforsilence \ + app-waituntil \ + app-while \ + app-zapateller \ + bridge-builtin-features \ + bridge-builtin-interval-features \ + bridge-holding \ + bridge-native-rtp \ + bridge-simple \ + bridge-softmix \ + cdr \ + cdr-csv \ + cdr-sqlite3 \ + cel-custom \ + cel-manager \ + cel-sqlite3-custom \ + chan-alsa \ + chan-bridge-media \ + chan-console \ + chan-dahdi \ + chan-iax2 \ + chan-mgcp \ + chan-mobile \ + chan-motif \ + chan-ooh323 \ + chan-oss \ + chan-phone \ + chan-rtp \ + chan-sip \ + chan-skinny \ + chan-unistim \ + codec-a-mu \ + codec-adpcm \ + codec-alaw \ + codec-dahdi \ + codec-g722 \ + codec-g726 \ + codec-gsm \ + codec-ilbc \ + codec-lpc10 \ + codec-resample \ + codec-speex \ + codec-ulaw \ + curl \ + format-g719 \ + format-g723 \ + format-g726 \ + format-g729 \ + format-gsm \ + format-h263 \ + format-h264 \ + format-ilbc \ + format-jpeg \ + format-mp3 \ + format-ogg-speex \ + format-ogg-vorbis \ + format-pcm \ + format-siren14 \ + format-siren7 \ + format-sln \ + format-vox \ + format-wav \ + format-wav-gsm \ + func-aes \ + func-base64 \ + func-blacklist \ + func-callcompletion \ + func-channel \ + func-config \ + func-cut \ + func-db \ + func-devstate \ + func-dialgroup \ + func-dialplan \ + func-enum \ + func-env \ + func-extstate \ + func-frame-trace \ + func-global \ + func-groupcount \ + func-hangupcause \ + func-holdintercept \ + func-iconv \ + func-jitterbuffer \ + func-lock \ + func-math \ + func-md5 \ + func-module \ + func-periodic-hook \ + func-pitchshift \ + func-presencestate \ + func-rand \ + func-realtime \ + func-sha1 \ + func-shell \ + func-sorcery \ + func-speex \ + func-sprintf \ + func-srv \ + func-sysinfo \ + func-talkdetect \ + func-uri \ + func-version \ + func-vmcount \ + func-volume \ + odbc \ + pbx-ael \ + pbx-dundi \ + pbx-loopback \ + pbx-lua \ + pbx-realtime \ + pbx-spool \ + pgsql \ + pjsip \ + res-adsi \ + res-ael-share \ + res-agi \ + res-ari \ + res-ari-applications \ + res-ari-asterisk \ + res-ari-bridges \ + res-ari-channels \ + res-ari-device-states \ + res-ari-endpoints \ + res-ari-events \ + res-ari-mailboxes \ + res-ari-model \ + res-ari-playbacks \ + res-ari-recordings \ + res-ari-sounds \ + res-calendar \ + res-calendar-caldav \ + res-calendar-ews \ + res-calendar-exchange \ + res-calendar-icalendar \ + res-chan-stats \ + res-clialiases \ + res-clioriginate \ + res-config-ldap \ + res-config-mysql \ + res-config-sqlite3 \ + res-convert \ + res-endpoint-stats \ + res-hep \ + res-hep-pjsip \ + res-hep-rtcp \ + res-fax-spandsp \ + res-fax \ + res-format-attr-celt \ + res-format-attr-g729 \ + res-format-attr-h263 \ + res-format-attr-h264 \ + res-format-attr-ilbc \ + res-format-attr-opus \ + res-format-attr-silk \ + res-format-attr-siren14 \ + res-format-attr-siren7 \ + res-format-attr-vp8 \ + res-http-media-cache \ + res-http-websocket \ + res-limit \ + res-manager-devicestate \ + res-manager-presencestate \ + res-monitor \ + res-musiconhold \ + res-mutestream \ + res-mwi-external \ + res-mwi-external-ami \ + res-parking \ + res-phoneprov \ + res-pjsip-phoneprov \ + res-pjproject \ + res-pktccops \ + res-realtime \ + res-resolver-unbound \ + res-rtp-asterisk \ + res-rtp-multicast \ + res-sdp-translator-pjmedia \ + res-security-log \ + res-smdi \ + res-snmp \ + res-sorcery \ + res-sorcery-memory-cache \ + res-speech \ + res-srtp \ + res-stasis \ + res-stasis-answer \ + res-stasis-device-state \ + res-stasis-mailbox \ + res-stasis-playback \ + res-stasis-recording \ + res-stasis-snoop \ + res-statsd \ + res-stun-monitor \ + res-timing-dahdi \ + res-timing-pthread \ + res-timing-timerfd \ + res-xmpp \ + voicemail + +UTILS_AVAILABLE:= \ + aelparse \ + astcanary \ + astdb2sqlite3 \ + astdb2bdb \ + check_expr \ + check_expr2 \ + conf2ael \ + muted \ + smsq \ + stereorize \ + streamplayer + AST_ENABLE:= +PKG_CONFIG_DEPENDS:= \ + $(patsubst %,CONFIG_PACKAGE_$(PKG_NAME)-%,$(MODULES_AVAILABLE)) \ + $(patsubst %,CONFIG_PACKAGE_$(PKG_NAME)-util-%,$(UTILS_AVAILABLE)) \ + CONFIG_ASTERISK15_LOW_MEMORY + include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/host-build.mk