# HG changeset patch # User Michael Schloh von Bennewitz # Date 1346171525 -7200 # Node ID e568963742d62d04dbb465a1c75ad60991473c52 # Parent d7ae7fd8a21473e3e175007bb0463afb9a9f5ea4 Correct detection of GCC sync_fetch_and_add atomic builtins, update the version, modernize packaging, add new prompts, and correct sound paths. The vendor configure script checks for sync_fetch_and_add and reports success because strangely GCC only fails when returning the return value of the builtin function in the consumer function. diff -r d7ae7fd8a214 -r e568963742d6 asterisk/asterisk.patch --- a/asterisk/asterisk.patch Tue Aug 28 18:32:00 2012 +0200 +++ b/asterisk/asterisk.patch Tue Aug 28 18:32:05 2012 +0200 @@ -255,7 +255,7 @@ static char imapparentfolder[64] = "\0"; static char greetingfolder[64]; static char authuser[32]; -@@ -2524,7 +2525,7 @@ +@@ -2527,7 +2528,7 @@ } /* Build up server information */ @@ -264,7 +264,7 @@ /* Add authentication user if present */ if (!ast_strlen_zero(authuser)) -@@ -6186,6 +6187,7 @@ +@@ -6193,6 +6194,7 @@ /* simple. huh? */ char sequence[10]; char mailbox[256]; @@ -272,7 +272,7 @@ int res; /* get the real IMAP message number for this message */ -@@ -6201,10 +6203,24 @@ +@@ -6208,10 +6210,24 @@ mail_setflag(vms->mailstream, sequence, "\\Unseen"); mail_clearflag(vms->mailstream, sequence, "\\Seen"); } @@ -299,7 +299,7 @@ /* Create the folder if it don't exist */ imap_mailbox_name(mailbox, sizeof(mailbox), vms, box, 1); /* Get the full mailbox name */ ast_debug(5, "Checking if folder exists: %s\n", mailbox); -@@ -10478,6 +10494,10 @@ +@@ -10517,6 +10533,10 @@ #ifndef IMAP_STORAGE } else if (!cmd) { vms.deleted[vms.curmsg] = 1; @@ -310,7 +310,7 @@ #endif } else { vms.deleted[vms.curmsg] = 0; -@@ -11996,6 +12016,15 @@ +@@ -12046,6 +12066,15 @@ } else { ast_copy_string(imapfolder, "INBOX", sizeof(imapfolder)); } @@ -379,10 +379,10 @@ /* Unique ID */ if (!rc_avpair_add(rh, tosend, PW_ACCT_SESSION_ID, &cdr->uniqueid, strlen(cdr->uniqueid), 0)) -Index: chan_capi-1.1.5.20120324/chan_capi20.h -diff -Nau chan_capi-1.1.5.20120324/chan_capi20.h.orig chan_capi-1.1.5.20120324/chan_capi20.h ---- chan_capi-1.1.5.20120324/chan_capi20.h.orig 2005-09-20 20:33:40.000000000 +0200 -+++ chan_capi-1.1.5.20120324/chan_capi20.h 2012-03-18 17:47:07.888451260 +0100 +Index: chan_capi-1.1.5.20120615/chan_capi20.h +diff -Nau chan_capi-1.1.5.20120615/chan_capi20.h.orig chan_capi-1.1.5.20120615/chan_capi20.h +--- chan_capi-1.1.5.20120615/chan_capi20.h.orig 2005-09-20 20:33:40.000000000 +0200 ++++ chan_capi-1.1.5.20120615/chan_capi20.h 2012-03-18 17:47:07.888451260 +0100 @@ -4,10 +4,13 @@ * first. Else the checks below will fail. */ @@ -406,10 +406,10 @@ #ifndef HEADER_CID #define HEADER_CID(x) ((x)->adr.adrNCCI) #endif -Index: chan_capi-1.1.5.20120324/chan_capi_utils.c -diff -Nau chan_capi-1.1.5.20120324/chan_capi_utils.c.orig chan_capi-1.1.5.20120324/chan_capi_utils.c ---- chan_capi-1.1.5.20120324/chan_capi_utils.c.orig 2011-08-07 16:31:05.000000000 +0200 -+++ chan_capi-1.1.5.20120324/chan_capi_utils.c 2012-03-18 17:47:07.888451260 +0100 +Index: chan_capi-1.1.5.20120615/chan_capi_utils.c +diff -Nau chan_capi-1.1.5.20120615/chan_capi_utils.c.orig chan_capi-1.1.5.20120615/chan_capi_utils.c +--- chan_capi-1.1.5.20120615/chan_capi_utils.c.orig 2011-08-07 16:31:05.000000000 +0200 ++++ chan_capi-1.1.5.20120615/chan_capi_utils.c 2012-03-18 17:47:07.888451260 +0100 @@ -1160,6 +1160,9 @@ { MESSAGE_EXCHANGE_ERROR error; @@ -420,10 +420,10 @@ unsigned char manbuf[CAPI_MANUFACTURER_LEN]; _cmsg CMSG; -Index: chan_capi-1.1.5.20120324/libcapi20/capi20.c -diff -Nau chan_capi-1.1.5.20120324/libcapi20/capi20.c.orig chan_capi-1.1.5.20120324/libcapi20/capi20.c ---- chan_capi-1.1.5.20120324/libcapi20/capi20.c.orig 2010-02-17 20:10:53.000000000 +0100 -+++ chan_capi-1.1.5.20120324/libcapi20/capi20.c 2012-03-18 17:47:07.888451260 +0100 +Index: chan_capi-1.1.5.20120615/libcapi20/capi20.c +diff -Nau chan_capi-1.1.5.20120615/libcapi20/capi20.c.orig chan_capi-1.1.5.20120615/libcapi20/capi20.c +--- chan_capi-1.1.5.20120615/libcapi20/capi20.c.orig 2010-02-17 20:10:53.000000000 +0100 ++++ chan_capi-1.1.5.20120615/libcapi20/capi20.c 2012-03-18 17:47:07.888451260 +0100 @@ -19,8 +19,10 @@ #include #include @@ -717,10 +717,10 @@ } /* * functions added to the CAPI2.0 spec -Index: chan_capi-1.1.5.20120324/libcapi20/convert.c -diff -Nau chan_capi-1.1.5.20120324/libcapi20/convert.c.orig chan_capi-1.1.5.20120324/libcapi20/convert.c ---- chan_capi-1.1.5.20120324/libcapi20/convert.c.orig 2010-09-14 21:54:25.000000000 +0200 -+++ chan_capi-1.1.5.20120324/libcapi20/convert.c 2012-03-18 17:47:07.888451260 +0100 +Index: chan_capi-1.1.5.20120615/libcapi20/convert.c +diff -Nau chan_capi-1.1.5.20120615/libcapi20/convert.c.orig chan_capi-1.1.5.20120615/libcapi20/convert.c +--- chan_capi-1.1.5.20120615/libcapi20/convert.c.orig 2010-09-14 21:54:25.000000000 +0200 ++++ chan_capi-1.1.5.20120615/libcapi20/convert.c 2012-03-18 17:47:07.888451260 +0100 @@ -11,7 +11,14 @@ #include #include @@ -736,11 +736,11 @@ #include "capi20.h" -Index: chan_capi-1.1.5.20120324/Makefile -diff -Nau chan_capi-1.1.5.20120324/Makefile.orig chan_capi-1.1.5.20120324/Makefile ---- chan_capi-1.1.5.20120324/Makefile.orig 2011-02-04 18:41:46.000000000 +0100 -+++ chan_capi-1.1.5.20120324/Makefile 2012-03-18 17:47:07.888451260 +0100 -@@ -114,6 +114,9 @@ +Index: chan_capi-1.1.5.20120615/Makefile +diff -Nau chan_capi-1.1.5.20120615/Makefile.orig chan_capi-1.1.5.20120615/Makefile +--- chan_capi-1.1.5.20120615/Makefile.orig 2011-02-04 18:41:46.000000000 +0100 ++++ chan_capi-1.1.5.20120615/Makefile 2012-03-18 17:47:07.888451260 +0100 +@@ -115,6 +115,9 @@ CFLAGS+=-O2 CFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) CFLAGS+=$(shell if uname -m | grep -q "ppc\|arm\|s390"; then echo "-fsigned-char"; fi) @@ -754,7 +754,7 @@ diff -Nau channels/chan_sip.c.orig channels/chan_sip.c --- channels/chan_sip.c.orig 2012-02-28 18:53:34.000000000 +0100 +++ channels/chan_sip.c 2012-03-18 17:47:07.898462166 +0100 -@@ -12034,7 +12034,16 @@ +@@ -12104,7 +12104,16 @@ } else { if (sipmethod == SIP_NOTIFY && !ast_strlen_zero(p->theirtag)) { /* If this is a NOTIFY, use the From: tag in the subscribe (RFC 3265) */ @@ -792,7 +792,7 @@ diff -Nau configure.orig configure --- configure.orig 2012-01-14 17:40:17.000000000 +0100 +++ configure 2012-03-18 17:47:32.518450837 +0100 -@@ -4716,11 +4716,6 @@ +@@ -4711,11 +4711,6 @@ esac case "${host_os}" in @@ -804,7 +804,7 @@ openbsd*) ac_default_prefix=/usr/local if test ${prefix} = '/usr/local' || test ${prefix} = 'NONE'; then -@@ -18904,8 +18899,8 @@ +@@ -18994,8 +18989,8 @@ if test -f "${IMAP_TK_DIR}/c-client/LDFLAGS"; then imap_ldflags=`cat ${IMAP_TK_DIR}/c-client/LDFLAGS` fi @@ -815,7 +815,7 @@ CPPFLAGS="${CPPFLAGS} ${imap_include}" LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}` cat confdefs.h - <<_ACEOF >conftest.$ac_ext -@@ -26681,7 +26676,7 @@ +@@ -26771,7 +26766,7 @@ pbxlibdir="-L${SQLITE_DIR}" fi fi @@ -828,7 +828,7 @@ diff -Nau formats/format_pcm.c.orig formats/format_pcm.c --- formats/format_pcm.c.orig 2011-07-14 22:13:06.000000000 +0200 +++ formats/format_pcm.c 2012-03-18 17:47:07.898462166 +0100 -@@ -354,6 +354,7 @@ +@@ -376,6 +376,7 @@ ast_log(LOG_WARNING, "Unable to write header\n"); return -1; } @@ -840,7 +840,7 @@ diff -Nau formats/format_wav.c.orig formats/format_wav.c --- formats/format_wav.c.orig 2011-11-09 16:25:33.000000000 +0100 +++ formats/format_wav.c 2012-03-18 17:47:07.898462166 +0100 -@@ -308,6 +308,7 @@ +@@ -310,6 +310,7 @@ ast_log(LOG_WARNING, "Unable to write header\n"); return -1; } @@ -891,33 +891,33 @@ diff -Nau main/features.c.orig main/features.c --- main/features.c.orig 2012-01-23 21:30:21.000000000 +0100 +++ main/features.c 2012-03-18 17:47:07.898462166 +0100 -@@ -2067,6 +2067,10 @@ - snprintf(args, len, "%s,%s,m", S_OR(touch_format, "wav"), touch_filename); - } +@@ -2127,6 +2127,10 @@ + snprintf(args, len, "%s,%s,m", S_OR(touch_format, "wav"), touch_filename); + } -+ for(x = 0; x < strlen(touch_filename); x++) { -+ if (args[x] == '/') -+ args[x] = '-'; -+ } - for(x = 0; x < strlen(args); x++) { - if (args[x] == '/') - args[x] = '-'; -@@ -2183,6 +2187,10 @@ - snprintf(args, len, "%s.%s,b", touch_filename, S_OR(touch_format, "wav")); - } ++ for(x = 0; x < strlen(touch_filename); x++) { ++ if (args[x] == '/') ++ args[x] = '-'; ++ } + for(x = 0; x < strlen(args); x++) { + if (args[x] == '/') + args[x] = '-'; +@@ -2239,6 +2243,10 @@ + snprintf(args, len, "%s.%s,b", touch_filename, S_OR(touch_format, "wav")); + } -+ for( x = 0; x < strlen(touch_filename); x++) { -+ if (args[x] == '/') -+ args[x] = '-'; -+ } - for( x = 0; x < strlen(args); x++) { - if (args[x] == '/') - args[x] = '-'; ++ for( x = 0; x < strlen(touch_filename); x++) { ++ if (args[x] == '/') ++ args[x] = '-'; ++ } + for( x = 0; x < strlen(args); x++) { + if (args[x] == '/') + args[x] = '-'; Index: main/file.c diff -Nau main/file.c.orig main/file.c --- main/file.c.orig 2012-01-05 23:06:46.000000000 +0100 +++ main/file.c 2012-03-18 17:47:07.898462166 +0100 -@@ -256,7 +256,7 @@ +@@ -260,7 +260,7 @@ char *fn = NULL; if (!strcmp(ext, "wav49")) @@ -930,7 +930,7 @@ diff -Nau main/Makefile.orig main/Makefile --- main/Makefile.orig 2011-09-19 22:27:03.000000000 +0200 +++ main/Makefile 2012-03-18 17:47:07.898462166 +0100 -@@ -69,10 +69,7 @@ +@@ -66,10 +66,7 @@ endif ifeq ($(OSARCH),FreeBSD) @@ -946,7 +946,7 @@ diff -Nau main/tcptls.c.orig main/tcptls.c --- main/tcptls.c.orig 2011-11-30 22:41:31.000000000 +0100 +++ main/tcptls.c 2012-03-18 17:47:07.898462166 +0100 -@@ -372,6 +372,7 @@ +@@ -391,6 +391,7 @@ if (!ast_strlen_zero(cfg->cafile) || !ast_strlen_zero(cfg->capath)) { if (SSL_CTX_load_verify_locations(cfg->ssl_ctx, S_OR(cfg->cafile, NULL), S_OR(cfg->capath,NULL)) == 0) ast_verb(0, "SSL CA file(%s)/path(%s) error\n", cfg->cafile, cfg->capath); @@ -958,7 +958,7 @@ diff -Nau main/udptl.c.orig main/udptl.c --- main/udptl.c.orig 2011-10-06 19:49:38.000000000 +0200 +++ main/udptl.c 2012-03-18 17:47:07.898462166 +0100 -@@ -98,6 +98,18 @@ +@@ -101,6 +101,18 @@ #define UDPTL_BUF_MASK 15 @@ -981,14 +981,11 @@ diff -Nau Makefile.orig Makefile --- Makefile.orig 2011-10-05 00:54:15.000000000 +0200 +++ Makefile 2012-03-18 17:47:07.898462166 +0100 -@@ -230,15 +230,6 @@ - _ASTCFLAGS+=-fsigned-char +@@ -186,12 +186,6 @@ + _ASTCFLAGS+=-isystem /usr/local/include endif -ifeq ($(OSARCH),FreeBSD) -- ifeq ($(PROC),i386) -- _ASTCFLAGS+=-march=i686 -- endif - # -V is understood by BSD Make, not by GNU make. - BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk) - _ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi) diff -r d7ae7fd8a214 -r e568963742d6 asterisk/asterisk.patch.proxymwi --- a/asterisk/asterisk.patch.proxymwi Tue Aug 28 18:32:00 2012 +0200 +++ b/asterisk/asterisk.patch.proxymwi Tue Aug 28 18:32:05 2012 +0200 @@ -2,7 +2,7 @@ diff -Nau channels/chan_sip.c.orig channels/chan_sip.c --- channels/chan_sip.c.orig 2011-01-14 18:32:52.000000000 +0100 +++ channels/chan_sip.c 2011-03-13 14:34:29.000000000 +0100 -@@ -25085,6 +25085,7 @@ +@@ -25791,6 +25791,7 @@ struct sip_pvt *p; int newmsgs = 0, oldmsgs = 0; const char *vmexten = NULL; @@ -10,7 +10,7 @@ ao2_lock(peer); -@@ -25138,6 +25139,11 @@ +@@ -25852,6 +25853,11 @@ } /* Recalculate our side, and recalculate Call ID */ ast_sip_ouraddrfor(&p->sa, &p->ourip, p); @@ -20,5 +20,5 @@ + if (s != NULL) + *s = 0; build_via(p); - ao2_t_unlink(dialogs, p, "About to change the callid -- remove the old name"); - build_callid_pvt(p); + + ao2_lock(peer); diff -r d7ae7fd8a214 -r e568963742d6 asterisk/asterisk.patch.xfersips --- a/asterisk/asterisk.patch.xfersips Tue Aug 28 18:32:00 2012 +0200 +++ b/asterisk/asterisk.patch.xfersips Tue Aug 28 18:32:05 2012 +0200 @@ -2,7 +2,7 @@ diff -Nau channels/chan_sip.c.orig channels/chan_sip.c --- channels/chan_sip.c.orig 2011-05-23 17:35:28.358543497 +0200 +++ channels/chan_sip.c 2011-05-23 17:57:05.948534524 +0200 -@@ -28839,6 +28839,7 @@ +@@ -29733,6 +29733,7 @@ \todo Fix this function so that we wait for reply to the REFER and react to errors, denials or other issues the other end might have. */ @@ -10,16 +10,16 @@ static int sip_sipredirect(struct sip_pvt *p, const char *dest) { char *cdest; -@@ -28847,7 +28848,7 @@ +@@ -29741,7 +29742,7 @@ cdest = ast_strdupa(dest); - + extension = strsep(&cdest, "@"); -- domain = strsep(&cdest, ":"); +- domain = cdest; + domain = strsep(&cdest, ":"); /* MSvB: Could begin with '@' if SIPS */ if (ast_strlen_zero(extension)) { ast_log(LOG_ERROR, "Missing mandatory argument: extension\n"); return 0; -@@ -28879,7 +28880,14 @@ +@@ -29773,7 +29774,14 @@ } } diff -r d7ae7fd8a214 -r e568963742d6 asterisk/asterisk.spec --- a/asterisk/asterisk.spec Tue Aug 28 18:32:00 2012 +0200 +++ b/asterisk/asterisk.spec Tue Aug 28 18:32:05 2012 +0200 @@ -22,23 +22,24 @@ ## # package version -%define V_opkg 1.8.11.0 -%define V_asterisk 1.8.11.0 +%define V_opkg 1.8.15.0 +%define V_asterisk 1.8.15.0 %define V_asterisk_fax_subdir 1.8.4 -%define V_asterisk_fax_digium 1.8.4_1.3.0 +%define V_asterisk_fax_digium 1.8.4_1.3.1 %define V_asterisk_sounds_core 1.4.22 %define V_asterisk_sounds_extra 1.4.11 %define V_asterisk_sounds_amoogab 1.4 %define V_asterisk_sounds_amootts current %define V_asterisk_sounds_custom 1.0 %define V_asterisk_sounds_mohop 2.03 +%define V_asterisk_sounds_newpro july_2012 %define V_asterisk_addons_mp3dec 1 -%define V_fswitch_sounds_en 1.0.16 -%define V_fswitch_sounds_fr 1.0.14 +%define V_fswitch_sounds_en 1.0.20 +%define V_fswitch_sounds_fr 1.0.16 %define V_fswitch_sounds_ru 1.0.13 %define V_fswitch_music 1.0.8 %define V_asterisk_codecs_ilbc 20110104 -%define V_chan_capi 1.1.5.20120324 +%define V_chan_capi 1.1.5.20120615 # package information Name: asterisk @@ -51,7 +52,7 @@ Group: VoIP License: GPL Version: %{V_opkg} -Release: 20120330 +Release: 20120800 # package options %option with_dahdi no @@ -80,7 +81,6 @@ Source0: http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-%{V_asterisk}.tar.gz Source1: ftp://ftp.chan-capi.org/chan-capi/chan_capi-%{V_chan_capi}.tar.gz Source2: ftp://ftp.europalab.com/pub/sfw/machsnds/asterisk-moh-freeplay-sln16.tar.gz - Source3: http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-moh-opsound-sln16-%{V_asterisk_sounds_mohop}.tar.gz Source4: http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-core-sounds-en-sln16-%{V_asterisk_sounds_core}.tar.gz Source5: http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-core-sounds-es-sln16-%{V_asterisk_sounds_core}.tar.gz @@ -89,32 +89,31 @@ Source8: http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-core-sounds-ru-sln16-%{V_asterisk_sounds_core}.tar.gz Source9: http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-en-sln16-%{V_asterisk_sounds_extra}.tar.gz Source10: http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-extra-sounds-fr-sln16-%{V_asterisk_sounds_extra}.tar.gz -Source11: http://www.amooma.de/asterisk/sprachbausteine/asterisk-%{V_asterisk_sounds_amoogab}-de-prompts.tar.gz -Source12: http://www.amooma.de/asterisk/sprachbausteine/asterisk-core-sounds-de-gsm-current.tar.gz -Source13: ftp://ftp.europalab.com/pub/sfw/machsnds/de-digits/de-digits-%{V_asterisk_sounds_custom}.tar.bz2 -Source14: ftp://ftp.europalab.com/pub/sfw/machsnds/de-sounds/astmultisnds-de-sln16-%{V_asterisk_sounds_custom}.tar.bz2 -Source15: ftp://ftp.europalab.com/pub/sfw/machsnds/msvbsnds-sln16-%{V_asterisk_sounds_custom}.tar.bz2 -Source16: http://files.freeswitch.org/freeswitch-sounds-en-us-callie-48000-%{V_fswitch_sounds_en}.tar.gz -Source17: http://files.freeswitch.org/freeswitch-sounds-es-mx-maria-44100.tar.gz -Source18: http://files.freeswitch.org/freeswitch-sounds-fr-ca-june-48000-%{V_fswitch_sounds_fr}.tar.gz -Source19: http://files.freeswitch.org/freeswitch-sounds-ru-RU-elena-48000-%{V_fswitch_sounds_ru}.tar.gz -Source20: http://files.freeswitch.org/freeswitch-sounds-music-48000-%{V_fswitch_music}.tar.gz -Source21: http://svn.digium.com/svn/thirdparty/mp3/trunk/addons/mp3-%{V_asterisk_addons_mp3dec}.tar.gz -Source22: http://downloads.digium.com/pub/telephony/fax/res_fax_digium/asterisk-%{V_asterisk_fax_subdir}/x86-64/res_fax_digium-%{V_asterisk_fax_digium}-generic_64.tar.gz -Source23: http://downloads.digium.com/pub/telephony/fax/res_fax_digium/asterisk-%{V_asterisk_fax_subdir}/x86-32/res_fax_digium-%{V_asterisk_fax_digium}-generic_32.tar.gz -Source24: ilbc-20110104.tar.gz -Source25: asterisk.txt -Source26: rc.asterisk -Source27: wakeup.agi +Source11: http://www.asterisk.org/files/new_prompts_%{V_asterisk_sounds_newpro}.zip +Source12: http://www.amooma.de/asterisk/sprachbausteine/asterisk-%{V_asterisk_sounds_amoogab}-de-prompts.tar.gz +Source13: http://www.amooma.de/asterisk/sprachbausteine/asterisk-core-sounds-de-gsm-current.tar.gz +Source14: ftp://ftp.europalab.com/pub/sfw/machsnds/de-digits/de-digits-%{V_asterisk_sounds_custom}.tar.bz2 +Source15: ftp://ftp.europalab.com/pub/sfw/machsnds/de-sounds/astmultisnds-de-sln16-%{V_asterisk_sounds_custom}.tar.bz2 +Source16: ftp://ftp.europalab.com/pub/sfw/machsnds/msvbsnds-sln16-%{V_asterisk_sounds_custom}.tar.bz2 +Source17: http://files.freeswitch.org/freeswitch-sounds-en-us-callie-48000-%{V_fswitch_sounds_en}.tar.gz +Source18: http://files.freeswitch.org/freeswitch-sounds-es-mx-maria-44100.tar.gz +Source19: http://files.freeswitch.org/freeswitch-sounds-fr-ca-june-48000-%{V_fswitch_sounds_fr}.tar.gz +Source20: http://files.freeswitch.org/freeswitch-sounds-ru-RU-elena-48000-%{V_fswitch_sounds_ru}.tar.gz +Source21: http://files.freeswitch.org/freeswitch-sounds-music-48000-%{V_fswitch_music}.tar.gz +Source22: http://svn.digium.com/svn/thirdparty/mp3/trunk/addons/mp3-%{V_asterisk_addons_mp3dec}.tar.gz +Source23: http://downloads.digium.com/pub/telephony/fax/res_fax_digium/asterisk-%{V_asterisk_fax_subdir}/x86-64/res_fax_digium-%{V_asterisk_fax_digium}-generic_64.tar.gz +Source24: http://downloads.digium.com/pub/telephony/fax/res_fax_digium/asterisk-%{V_asterisk_fax_subdir}/x86-32/res_fax_digium-%{V_asterisk_fax_digium}-generic_32.tar.gz +Source25: ilbc-%{V_asterisk_codecs_ilbc}.tar.gz +Source26: asterisk.txt +Source27: rc.asterisk +Source28: wakeup.agi Patch0: asterisk.patch Patch1: asterisk.patch.xfersips Patch2: asterisk.patch.proxymwi # build information -Prefix: %{l_prefix} -BuildRoot: %{l_buildroot} -BuildPreReq: OpenPKG, openpkg >= 20060823, bison, gcc, make, grep, pkgconfig -PreReq: OpenPKG, openpkg >= 20060823, MTA +BuildPreReq: OpenPKG, openpkg >= 20100101, bison, gcc, make, grep, pkgconfig +PreReq: OpenPKG, openpkg >= 20100101, MTA BuildPreReq: zlib, curl, openssl, ncurses, speex, sox, popt, gmime, libxml PreReq: zlib, curl, openssl, ncurses, speex, sox, popt, gmime, libxml %if "%{with_ogg}" == "yes" @@ -172,10 +171,8 @@ PreReq: libpri > 1.4.11.5 %endif %if "%{with_esounds}" == "yes" -BuildPreReq: sox +BuildPreReq: sox, infozip %endif -AutoReq: no -AutoReqProv: no %description Asterisk is a complete Private Branch Exchange (PBX) in software. @@ -220,6 +217,11 @@ url = http://downloads.asterisk.org/pub/telephony/sounds/releases/ regex = asterisk-core-sounds-en-sln16-(\d+\.\d+(\.\d+)+)\.tar\.gz } + prog asterisk:sounds_newpro = { + version = %{V_asterisk_sounds_newpro} + url = http://www.asterisk.org/files/ + regex = new_prompts_(__VER__)\.zip + } prog asterisk:sounds_extra = { version = %{V_asterisk_sounds_extra} url = http://downloads.asterisk.org/pub/telephony/sounds/releases/ @@ -266,8 +268,8 @@ %setup -q -n asterisk-%{V_asterisk} -D -T -a 1 %setup -q -n asterisk-%{V_asterisk} -D -T -a 2 %if "%{with_fax}" == "yes" - %setup -q -n asterisk-%{V_asterisk} -D -T -a 22 %setup -q -n asterisk-%{V_asterisk} -D -T -a 23 + %setup -q -n asterisk-%{V_asterisk} -D -T -a 24 %endif ( cd addons %{l_tar} zxf %{_sourcedir}/mp3-%{V_asterisk_addons_mp3dec}.tar.gz @@ -306,6 +308,9 @@ -e 's;\(sh\) \(bash\) ksh sh5;\2 \1;' \ configure %{l_shtool} subst \ + -e 's/int foo2 = \(__sync_fetch_and_add(\&foo1, 1);\)/return \1/' \ + configure + %{l_shtool} subst \ -e 's;^\(#define DEFAULT_DB .*\${ASTDBDIR}\)/astdb;\1/asterisk.db;' \ build_tools/make_defaults_h %{l_shtool} subst \ @@ -331,7 +336,6 @@ -e 's;\(\)no\(\);\1yes\2;g' \ apps/app_ivrdemo.c \ apps/app_saycounted.c \ - apps/app_rpt.c \ utils/utils.xml \ agi/agi.xml %{l_shtool} subst \ @@ -598,7 +602,6 @@ %install # install program - rm -rf $RPM_BUILD_ROOT %{l_make} %{l_mflags} install \ DESTDIR=$RPM_BUILD_ROOT \ INSTALL_PREFIX=%{l_prefix} @@ -641,12 +644,20 @@ %endif ( echo 'Start of sound installation block (OpenPKG)' + # create main sound directory hierarchy + ( cd $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/sounds + %{l_shtool} mkdir -f -p -m 755 en es fr en_AU + ) || exit $? %if "%{with_esounds}" == "yes" - # create sound directory hierarchy - for sndir in en es fr ru en_AU moh; do - %{l_shtool} mkdir -f -p -m 755 \ - $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/sounds/$sndir - done + # create extra sound directory hierarchy + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/sounds/ru + $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/sounds/moh + + # install humorous 'new' prompts + cd $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/sounds/en + %{l_prefix}/bin/unzip %{_sourcedir}/new_prompts_%{V_asterisk_sounds_newpro}.zip + # install freeswitch sound prompt files, expecting # identical sound filenames to be overwritten later cd $RPM_BUILD_ROOT%{l_prefix}/share/asterisk/sounds/en @@ -828,7 +839,6 @@ %files -f files %clean - rm -rf $RPM_BUILD_ROOT %post %if "%{with_dahdi}" == "yes"