Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-release-src > by-pkgid > 39d2b8be2642f76f387893d7a18f0e8a > files > 26

freeswitch-1.6.17-7.mga6.src.rpm

%define _disable_ld_no_undefined 1
%define Werror_cflags %nil
%define _disable_ld_as_needed 1
%define _disable_libtoolize 1
 ######################################################################################################################	 
 #	 
 # spec file for package freeswitch	 
 #	 
 # includes module(s): freeswitch-devel freeswitch-codec-passthru-amr freeswitch-codec-passthru-amrwb freeswitch-codec-passthru-g729	 
 #                     freeswitch-codec-passthru-g7231 freeswitch-lua freeswitch-perl freeswitch-python	 
 #                     freeswitch-lan-de freeswitch-lang-en freeswitch-lang-fr freeswitch-lang-hu freeswitch-lang-ru freeswitch-freetdm	 
 #	 
 # Initial Version Copyright (C) 2007 Peter Nixon and Michal Bielicki, All Rights Reserved.	 
 #	 
 # This file is part of:	 
 # FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application	 
 # Copyright (C) 2005-2012, Anthony Minessale II <anthm@freeswitch.org>	 
 #	 
 # This file and all modifications and additions to the pristine package are under the same license as the package itself.	 
 #	 
 # Contributor(s): Mike Jerris	 
 #                 Brian West	 
 #                 Anthony Minessale II <anthm@freeswitch.org>	 
 #                 Raul Fragoso	 
 #                 Rupa Shomaker	 
 #                 Marc Olivier Chouinard	 
 #                 Raymond Chandler	 
 #                 Ken Rice <krice@freeswitch.org>	 
 #	 
 # Maintainer(s): Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
 #	 
 ######################################################################################################################	 

# Module build settings
%define build_sng_isdn 0
%define build_sng_ss7 0
%define build_sng_tc 0
%define build_py26_esl 0
%define build_timerfd 0
%define build_mod_esl 0
%define build_mod_siren 0
%define build_mod_ha_cluster 0

%{?with_sang_tc:%define build_sng_tc 1 }
%{?with_sang_isdn:%define build_sng_isdn 1 }
%{?with_sang_ss7:%define build_sng_ss7 1 }
%{?with_py26_esl:%define build_py26_esl 1 }
%{?with_timerfd:%define build_timerfd 1 }
%{?with_mod_esl:%define build_mod_esl 1 }
%{?with_mod_esl:%define build_mod_siren 1 }
%{?with_mod_ha_cluster:%define build_mod_ha_cluster 1 }

%define major 1
%define libname %mklibname %{name} %{major}
%define develname %mklibname %{name} -d
%define module skypopen

######################################################################################################################
#
# disable rpath checking
#define __arch_install_post /usr/lib/rpm/check-buildroot
%define sysconfdir	/etc/
%define _sysconfdir	%{sysconfdir}
%define runtimedir	/run/%{name}
%define _runtimedir	%{runtimedir}

%define MODINSTDIR	%{_libdir}/%{name}/mod
%define CACHEDIR        %{_var}/lib/freeswitch/cache
%define CERTSDIR     	/etc/pki/tls
%define IMAGESDIR       %{_localstatedir}/lib/%name/images
%define CACHEDIR        %{_localstatedir}/lib/%name/cache
%define STORAGEDIR      %{_localstatedir}/lib/%name/storage
%define FONTSDIR        %{_datarootdir}/%name/fonts

%define sphinxbaseversion 0.8
%define sphinxversion     0.8
%define soundsver         1.0.50

Name:         	freeswitch
Summary:      	FreeSWITCH open source telephony platform
License:      	MPLv1.1
Group:        	Communications/Telephony
Version:	1.6.17
Release:	%mkrel 7
URL:          	http://www.freeswitch.org/
Epoch:		1
Requires:	freeswitch-cli
######################################################################################################################
#
#					Source files and where to get them
#
######################################################################################################################
Source0:        http://files.freeswitch.org/%{name}-%{version}.tar.xz
Source1:	freeswitch.service
Source2:	http://git.freeswitch.org/git/freeswitch-contrib/snapshot/freeswitch-contrib-master.tar.bz2
Source10:	http://files.freeswitch.org/downloads/libs/communicator_semi_6000_20080321.tar.gz
Source11:	freeswitch-tmpfiles.conf
Source12:	check_fs_registered
Source13:	check_fs.cfg
Source20:	http://downloads.sourceforge.net/cmusphinx/pocketsphinx-%{sphinxversion}.tar.gz
Source21:	http://downloads.sourceforge.net/cmusphinx/sphinxbase-%{sphinxbaseversion}.tar.gz
Patch0:		freeswitch-1.2.3-ac_config.diff
Patch1:		freeswitch-1.2.3-fix-str-fmt.patch
Patch2:		freeswitch-1.2.3-link.patch
Patch3:		freeswitch-1.2.3-mod_ha_cluster.patch
Patch4:		freeswitch-1.2.12-dkms-skypopen.patch
Patch5:		freeswitch-mod_ha_cluster-gcc48.patch
Patch6:		freeswitch-1.2.12-mod_skypopen.patch
Patch7:		freeswitch-1.2.13-tinfo.patch
Patch8:		freeswitch-1.2.13-writestring.patch
Patch9:		freeswitch-1.2.13-python.patch
Patch10:	freeswitch-1.2.13-mod_shout-ltinfo.patch
Patch11:	perl-gcc-pedantic-define-working.diff
Patch12:	freeswitch-1.4.7-no-pedantic-perl.patch
Patch13:	freeswitch-1.4.4-gcc491-configure-lame.patch
Patch14:	freeswitch-1.4.7-pgsql-build.diff
Patch15:	freeswitch-1.4.14-mod_nibblebill-legb-hangup.diff
Patch16:	freeswitch-1.4.15-openssl-1.0.2.patch
Patch17:	freeswitch-1.6.8-mga-stop-downloading-sounds.patch
Patch18:	freeswitch-1.6.17-armv7hl-abi.patch
######################################################################################################################
#
#				Build Dependencies
#
######################################################################################################################
Requires(post):   systemd >= %{systemd_required_version}
Requires(pre):    rpm-helper
Requires(post):   rpm-helper
Requires(preun):  rpm-helper
Requires(postun): rpm-helper

BuildRequires: openldap-devel
BuildRequires: autoconf
BuildRequires: automake1.9
BuildRequires: curl-devel
BuildRequires: gcc-c++
BuildRequires: gnutls-devel
BuildRequires: libtool >= 1.5.17
BuildRequires: ncurses-devel
BuildRequires: openssl-devel >= 1.0.1e
BuildRequires: pcre-devel
BuildRequires: speex-devel
BuildRequires: pkgconfig(speexdsp)
BuildRequires: pkgconfig(silk)
BuildRequires: sqlite3-devel
BuildRequires: ldns-devel
BuildRequires: libedit-devel
BuildRequires: perl
BuildRequires: perl-devel
BuildRequires: nasm
BuildRequires: yasm
BuildRequires: pkgconfig
BuildRequires: unixODBC-devel
BuildRequires: gdbm-devel
BuildRequires: db-devel
BuildRequires: python-devel
BuildRequires: libogg-devel
BuildRequires: libvorbis-devel
BuildRequires: libjpeg-devel
#BuildRequires: mono-devel
BuildRequires: alsa-lib-devel
BuildRequires: which
BuildRequires: zlib-devel
BuildRequires: e2fsprogs-devel
BuildRequires: libtheora-devel
BuildRequires: libxml2-devel
BuildRequires: bison
BuildRequires: net-snmp-devel
BuildRequires: lzma-devel
BuildRequires: sed
BuildRequires: sox
BuildRequires: swig
BuildRequires: mariadb-embedded-devel 
BuildRequires: libmemcached-devel
BuildRequires: portaudio-devel
BuildRequires: libsndfile-devel
BuildRequires: broadvoice-devel
BuildRequires: flite-devel >= 2.0
BuildRequires: pkgconfig(codec2) >= 0.5
BuildRequires: lua5.2-devel
BuildRequires: libflac-devel
BuildRequires: opus-devel
BuildRequires: soundtouch-devel >= 1.7.1
BuildRequires: yasm
BuildRequires: fltk-devel
BuildRequires: libilbc2-devel
BuildRequires: pkgconfig(hiredis)
BuildRequires: pkgconfig(celt)
BuildRequires: pkgconfig(speexdsp)

%if %{build_py26_esl}
BuildRequires: python26-devel
Requires: python26
%endif
Requires: alsa-lib
#Requires: libogg
Requires: libvorbis
Requires: curl
#Requires: ncurses
#Requires: openssl
#Requires: unixODBC
#Requires: libjpeg
Requires: openldap
#Requires: db
Requires: gdbm
#Requires: zlib
#Requires: libtiff
Requires: python
#Requires: libtheora
#Requires: libxml2
Requires: %{name}-config
Recommends: %{name}-lang-en

######################################################################################################################
#
#					Where the packages are going to be built
#
######################################################################################################################

%description
FreeSWITCH is an open source telephony platform designed to facilitate the creation of voice 
and chat driven products scaling from a soft-phone up to a soft-switch.  It can be used as a 
simple switching engine, a media gateway or a media server to host IVR applications using 
simple scripts or XML to control the callflow. 


%package -n     %{libname}
Summary:        Main library for Freeswitch
Group:          System/Libraries

%description -n %{libname}
Mail library for Freeswitch.

%package -n %{develname}
Summary:        Development package for FreeSWITCH open source telephony platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description -n %{develname}
FreeSWITCH development files

######################################################################################################################
#				FreeSWITCH Application Modules
######################################################################################################################
%package application-abstraction
Summary:	FreeSWITCH mod_abstraction
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release


%description application-abstraction
Provide an abstraction to FreeSWITCH API calls

%package application-avmd
Summary:	FreeSWITCH voicemail detector
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-avmd
Provide an voicemail beep detector for FreeSWITCH

%package application-blacklist
Summary:	FreeSWITCH blacklist module
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-blacklist
Provide black/white listing of various fields used for routing calls in 
FreeSWITCH

%package application-callcenter
Summary:	FreeSWITCH mod_callcenter Call Queuing Application
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-callcenter
Provide Automated Call Distribution capabilities for FreeSWITCH

%package application-cidlookup
Summary:	FreeSWITCH mod_cidlookup 
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-cidlookup
Provide FreeSWITCH access to third party CallerID Name Databases via HTTP

%package application-conference
Summary:	FreeSWITCH mod_conference
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-conference
Provide FreeSWITCH Conference Bridge Services. 

%package application-curl
Summary:	FreeSWITCH mod_curl
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-curl
Provide FreeSWITCH dialplan access to CURL

%package application-db
Summary:	FreeSWITCH mod_db
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-db
mod_db implements an API and dialplan interface to a database backend for 
FreeSWITCH.  The database can either be in sqlite or ODBC.  It also provides 
support for group dialing and provides database backed limit interface. 

%package application-directory
Summary:	FreeSWITCH mod_directory
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-directory
Provides FreeSWITCH mod_directory, a dial by name directory application. 

%package application-distributor
Summary:	FreeSWITCH mod_distributor
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-distributor
Provides FreeSWITCH mod_distributor, a simple round-robbin style distribution 
to call gateways.

%package application-easyroute
Summary:	FreeSWITCH mod_easyroute
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-easyroute
Provides FreeSWITCH mod_easyroute, a simple, easy to use DB Backed DID routing 
Engine. Uses ODBC to connect to the DB of your choice.

%package application-enum
Summary:	FreeSWITCH mod_enum
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-enum
Provides FreeSWITCH mod_enum, a ENUM dialplan, with API and Dialplan extensions 
supporting ENUM lookups.

%package application-esf
Summary:	FreeSWITCH mod_esf
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-esf
Provides FreeSWITCH mod_esf, Extra Sip Functionality such as Multicast Support

%if %{build_mod_esl}
%package application-esl
Summary:	FreeSWITCH mod_esl
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-esl
Provides FreeSWITCH mod_esl, add api commands for remote ESL commands
%endif

%package application-expr
Summary:	FreeSWITCH mod_expr
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-expr
Provides FreeSWITCH mod_expr, implements Brian Allen Vanderburg's ExprEval 
expression evaluation library for FreeSWITCH.

%package application-fifo
Summary:	FreeSWITCH mod_fifo
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-fifo
Provides FreeSWITCH mod_fifo, a parking-like app which allows you to make 
custom call queues

%package application-fsk
Summary:	FreeSWITCH mod_fsk
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-fsk
Provides FreeSWITCH mod_fsk, a module to send and receive information via 
Frequency-shift keying

%package application-fsv
Summary:	FreeSWITCH mod_fsv
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-fsv
Provides FreeSWITCH mod_fsk, implements functions to record and play back video

%package application-hash
Summary:	FreeSWITCH mod_hash
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-hash
Provides FreeSWITCH mod_hash, implements an API and application interface for 
manipulating a hash table. It also provides a limit backend. 

%package application-httapi
Summary:	FreeSWITCH mod_httapi
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-httapi
Provides FreeSWITCH mod_httapi, provides an HTTP based Telephony API using a 
standard FreeSWITCH application interface as well as a cached http file format 
interface

%package application-http-cache
Summary:	FreeSWITCH mod_http_cache
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-http-cache
Provides FreeSWITCH mod_http_cache, allows one to make a HTTP GET request to 
cache a document. The primary use case is to download and cache audio files 
from a web server. 

%package application-lcr
Summary:	FreeSWITCH mod_lcr
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-lcr
Provides FreeSWITCH mod_lcr, provide basic Least Cost Routing Services

%package application-limit
Summary:	FreeSWITCH mod_limit
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-limit
Provides FreeSWITCH mod_limit, provide application to limit both concurrent and call per time period

%package application-memcache
Summary:	FreeSWITCH mod_memcache
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-memcache
Provides FreeSWITCH mod_memcache, implements an API interface to memcached which
is a "high-performance, distributed memory object caching system, generic in 
nature, but intended for use in speeding up dynamic web applications by 
alleviating database load." 

%package application-nibblebill
Summary:	FreeSWITCH mod_nibblebill
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-nibblebill
Provides FreeSWITCH mod_nibblebill, provides a credit/debit module for 
FreeSWITCH to allow real-time debiting of credit or cash from a database 
while calls are in progress.

%package application-redis
Summary:	FreeSWITCH mod_redis
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-redis
Provides FreeSWITCH mod_redis, access to the redis key value pair db system from
FreeSWITCH

%package application-rss
Summary:	FreeSWITCH mod_rss
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-rss
Provides FreeSWITCH mod_rss, edisrse and read an XML based RSS feed, then read
the entries aloud via a TTS engine

%if %{build_mod_ha_cluster}
%package 	application-ha_cluster
Summary:	FreeSWITCH mod_ha_cluster
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-ha_cluster
Provides FreeSWITCH mod_ha_cluster, EXPERIMENTAL
%endif

%package 	application-sms
Summary:	FreeSWITCH mod_sms
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-sms
Provides FreeSWITCH mod_sms, provide a way to route messages in freeswitch, 
potentially allowing one to build a powerful chatting system like in XMPP using 
using SIP SIMPLE on SIP clients

%package application-snapshot
Summary:	FreeSWITCH mod_snapshot
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-snapshot
Provides FreeSWITCH mod_snapshot, allows recording a sliding window of audio 
and taking snapshots to disk. 

%package 	application-snom
Summary:	FreeSWITCH mod_snom
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-snom
Provides FreeSWITCH mod_snom, an application for controlling the functionality 
and appearance of the programmable softkeys on Snom phones

%package 	application-soundtouch
Summary:	FreeSWITCH mod_soundtouch
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-soundtouch
Provides FreeSWITCH mod_soundtouch, uses the soundtouch library, which can do
pitch shifting and other audio effects, so you can pipe the audio of a call
(or any other channel audio) through this module and achieve those effects. You
can specifically adjust pitch, rate, and tempo.

%package 	application-spy
Summary:	FreeSWITCH mod_spy
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-spy
Provides FreeSWITCH mod_spy, implements userspy application which provides 
persistent eavesdrop on all channels bridged to a certain user

%package application-stress
Summary:	FreeSWITCH mod_stress
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-stress
Provides FreeSWITCH mod_stress. mod_stress attempts to detect stress in a 
person's voice and generates FreeSWITCH events based on that data. 

%package application-valet_parking
Summary:	FreeSWITCH mod_valet_parking
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-valet_parking
Provides FreeSWITCH mod_valet_parking. Provides 'Call Parking' in the switch
as opposed to on the phone and allows for a number of options to handle call
retrieval

%package application-voicemail
Summary:	FreeSWITCH mod_voicemail
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-voicemail
Provides FreeSWITCH mod_voicemail. Implements Voicemail Application 

%package application-voicemail-ivr
Summary:	FreeSWITCH mod_voicemail_ivr
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description application-voicemail-ivr
Provides FreeSWITCH mod_voicemail_ivr. Provides a custimizable audio navigation 
system for backend voicemail systems

######################################################################################################################
#				FreeSWITCH ASR TTS Modules
######################################################################################################################

%package asrtts-flite
Summary:	FreeSWITCH mod_flite
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description asrtts-flite
Provides FreeSWITCH mod_flite, a interface to the flite text to speech engine

%package asrtts-pocketsphinx
Summary:	FreeSWITCH mod_pocketsphinx
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description asrtts-pocketsphinx
Provides FreeSWITCH mod_pocketsphinx, a interface to the OpenSource 
Pocketsphinx speech recognition engine

%package asrtts-tts-commandline
Summary:	FreeSWITCH mod_tts_commandline
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description asrtts-tts-commandline
Provides FreeSWITCH mod_tts_commandline, Run a command line and play the 
output file.

%package asrtts-unimrcp
Summary:	FreeSWITCH mod_unimrcp
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description asrtts-unimrcp
Provides FreeSWITCH mod_unimrcp, allows communication with Media Resource 
Control Protocol (MRCP) servers

######################################################################################################################
#				FreeSWITCH Codec Modules
######################################################################################################################

%package codec-passthru-amr
Summary:        Pass-through AMR Codec support for FreeSWITCH open source telephony platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release
Conflicts:	codec-amr

%description codec-passthru-amr
Pass-through AMR Codec support for FreeSWITCH open source telephony platform

%package codec-passthru-amrwb
Summary:        Pass-through AMR WideBand Codec support for FreeSWITCH open source telephony platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release
Conflicts:      codec-amrwb

%description codec-passthru-amrwb
Pass-through AMR WideBand Codec support for FreeSWITCH open source telephony platform

%package codec-bv
Summary:        BroadVoice16 and BroadVoice32 WideBand Codec support for FreeSWITCH open source telephony platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description codec-bv
BroadVoice16 and BroadVoice32 WideBand Codec support for FreeSWITCH open source telephony platform

#package codec-celt
#Summary:        CELT ultra low delay Codec support for FreeSWITCH open source telephony platform
#Group:          System/Libraries
#Requires:       %{name} = %epoch:%version-%release

#description codec-celt
#CELT ultra low delay Codec support for FreeSWITCH open source telephony platform

%package codec-codec2
Summary:        Codec2 Narrow Band Codec support for FreeSWITCH open source telephony platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description codec-codec2
CODEC2 narrow band codec support for FreeSWITCH open source telephony platform
CODEC2 was created by the developers of Speex.

%package codec-passthru-g723_1
Summary:        Pass-through g723.1 Codec support for FreeSWITCH open source telephony platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release
Conflicts:	codec-g723_1

%description codec-passthru-g723_1
Pass-through g723.1 Codec support for FreeSWITCH open source telephony platform

%package codec-passthru-g729
Summary:        Pass-through g729 Codec support for FreeSWITCH open source telephony platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release
Provides:	%{name}-codec-g729

%description codec-passthru-g729
Pass-through g729 Codec support for FreeSWITCH open source telephony platform

%package codec-h26x
Summary:        H.263/H.264 Video Codec support for FreeSWITCH open source telephony platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description codec-h26x
H.263/H.264 Video Codec support for FreeSWITCH open source telephony platform

%package codec-ilbc
Summary:        iLCB Codec support for FreeSWITCH open source telephony platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description codec-ilbc
iLBC Codec support for FreeSWITCH open source telephony platform

%package codec-isac
Summary:        iSAC Codec support for FreeSWITCH open source telephony platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description codec-isac
iSAC Codec support for FreeSWITCH open source telephony platform

%package codec-mp4v
Summary:        MP4V Video Codec support for FreeSWITCH open source telephony platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description codec-mp4v
MP4V Video Codec support for FreeSWITCH open source telephony platform

%package codec-opus
Summary:        Opus Codec support for FreeSWITCH open source telephony platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description codec-opus
OPUS Codec support for FreeSWITCH open source telephony platform

%if %{build_sng_tc}
%package sangoma-codec
Summary:	Sangoma D100 and D500 Codec Card Support
Group:		System/Libraries
Requires:       %{name} = %epoch:%version-%release
Requires: 	sng-tc-linux
BuildRequires: sng-tc-linux

%description sangoma-codec
Sangoma D100 and D500 Codec Card Support

%endif

%package codec-silk
Summary:        Silk Codec support for FreeSWITCH open source telephony platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description codec-silk
Silk Codec (from Skype) support for FreeSWITCH open source telephony platform

%if %{build_mod_siren}
%package codec-siren
Summary:        Siren Codec support for FreeSWITCH open source telephony platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description codec-siren
Siren Codec support for FreeSWITCH open source telephony platform. Using 
mod_siren in a commercial product will require you to acquire a patent license
directly from Polycom(R) for your company. 
see http://www.polycom.com/usa/en/company/about_us/technology/siren_g7221/siren_g7221.html 
and http://www.polycom.com/usa/en/company/about_us/technology/siren14_g7221c/siren14_g7221c.html 
At the time of this packaging, Polycom does not charge for licensing.
%endif

%package codec-speex
Summary:        Speex Codec support for FreeSWITCH open source telephony platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description codec-speex
Speex Codec support for FreeSWITCH open source telephony platform

%package codec-theora
Summary:        Theora Video Codec support for FreeSWITCH open source telephony platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description codec-theora
Theora Video Codec support for FreeSWITCH open source telephony platform

######################################################################################################################
#				FreeSWITCH Directory Modules
######################################################################################################################

%package directory-ldap
Summary:        LDAP Directory support for FreeSWITCH open source telephony platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description directory-ldap
LDAP Directory support for FreeSWITCH open source telephony platform

######################################################################################################################
#				FreeSWITCH Endpoint Modules
######################################################################################################################

%package endpoint-dingaling
Summary:        Generic XMPP support for FreeSWITCH open source telephony platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description endpoint-dingaling
XMPP support for FreeSWITCH open source telephony platform. Allows FreeSWITCH
to be used as a client for GoogleTalk or other XMPP Servers.

#%package endpoint-gsmopen
#Summary:        Generic GSM enpoint support for FreeSWITCH open source telephony platform
#Group:          System/Libraries
#Requires:        %epoch:%version-%release
#
#%description endpoint-gsmopen
#GSMopen is an endpoint (channel driver) that allows an SMS to be sent or 
#received from FreeSWITCH as well as incoming and outgoing GSM voice calls.
#SMS is handled via the standard CHAT API in FreeSWITCH.

#%package endpoint-h323
#Summary:        H.323 enpoint support for FreeSWITCH open source telephony platform
#Group:          System/Libraries
#Requires:        %epoch:%version-%release
#
#%description endpoint-h323
#H.323 enpoint support for FreeSWITCH open source telephony platform

#%package endpoint-khomp
#Summary:        khomp endpoint support for FreeSWITCH open source telephony platform
#Group:          System/Libraries
#Requires:        %epoch:%version-%release
#
#%description endpoint-khomp
#Khomp hardware endpoint support for FreeSWITCH open source telephony platform

%package endpoint-portaudio
Summary:        PortAudio endpoint support for FreeSWITCH open source telephony platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release
Requires:	alsa-lib
BuildRequires:	alsa-lib-devel

%description endpoint-portaudio
PortAudio endpoint support for FreeSWITCH open source telephony platform

%package endpoint-rtmp
Summary:        RTPM Endpoint support for FreeSWITCH open source telephony platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description endpoint-rtmp
RTMP Endpoint support for FreeSWITCH open source telephony platform. Allows FreeSWITCH
to be used from a RTMP client. See http://wiki.freeswitch.org/wiki/Mod_rtmp#Flex_Client
for the OpenSouce FreeSWITCH backed Client.

%package endpoint-skinny
Summary:        Skinny/SCCP endpoint support for FreeSWITCH open source telephony platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description endpoint-skinny
SCCP/Skinny support for FreeSWITCH open source telephony platform

%package freetdm
Summary:	Provides a unified interface to hardware TDM cards and ss7 stacks for FreeSWITCH
Group:		System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description freetdm
FreeTDM

%if %{build_sng_isdn}

%package freetdm-sng-isdn
Summary:	Sangoma ISDN Module for FreeTDM
Group:		System/Libraries
Requires:       %{name} = %epoch:%version-%release
Requires:       %{name}-freetdm = %epoch:%{version}-%{release}
Requires: 	wanpipe 
Requires: 	libsng_isdn 
BuildRequires: 	wanpipe 
BuildRequires: 	libsng_isdn 

%description freetdm-sng-isdn
Sangoma ISDN Module for freetdm

%endif

%if %{build_sng_ss7}

%package freetdm-sng-ss7
Summary:	Provides a unified interface to hardware TDM cards and ss7 stacks for FreeSWITCH, Sangoma SS7 Module
Group:		System/Libraries
Requires:       %{name} = %epoch:%version-%release
Requires:       %{name}-freetdm = %epoch:%{version}-%{release}
Requires: 	wanpipe 
Requires: 	libsng_ss7 
BuildRequires: 	wanpipe 
BuildRequires: 	libsng_ss7 

%description freetdm-sng-ss7
Sangoma SMG-SS7 drivers for FreeTDM

%endif

%package endpoint-skypopen
Summary:	Skype Endpoint
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release
BuildRequires:	libx11-devel
Requires:	dkms-skypopen

%description endpoint-skypopen
This software (Skypopen) uses the Skype API but is not endorsed, certified or 
otherwise approved in any way by Skype.  Skypopen is an endpoint (channel 
driver) that uses the Skype client as an interface to the Skype network, and 
allows incoming and outgoing Skype calls to/from FreeSWITCH (that can be 
bridged, originated, answered, etc. as in all other endpoints, e.g. Sofia-SIP).

%package -n dkms-skypopen
Summary:	Skype Endpoint kernel module
Group:		System/Kernel and hardware
BuildArch:      noarch
Requires:       dkms
Requires(post): dkms
Requires(preun): dkms

%description -n dkms-skypopen
This is a kernel module needed to bridge Skype and FreeSWITCH.

######################################################################################################################
#				FreeSWITCH Event Handler Modules
######################################################################################################################

%package event-cdr-mongodb
Summary:	MongoDB CDR Logger for the FreeSWITCH open source telephony platform
Group:		System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description event-cdr-mongodb
MongoDB CDR Logger for FreeSWITCH

%package event-cdr-pg-csv
Summary:	PostgreSQL CDR Logger for the FreeSWITCH open source telephony platform
Group:		System/Libraries
Requires:       %{name} = %epoch:%version-%release
Requires:	postgresql-libs
BuildRequires:	postgresql-devel

%description event-cdr-pg-csv
PostgreSQL CDR Logger for FreeSWITCH.

%package event-cdr-sqlite
Summary:	SQLite CDR Logger for the FreeSWITCH open source telephony platform
Group:		System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description event-cdr-sqlite
SQLite CDR Logger for FreeSWITCH.

%package event-erlang-event
Summary:	Erlang Event Module for the FreeSWITCH open source telephony platform
Group:		System/Libraries
Requires:       %{name} = %epoch:%version-%release
Requires:	erlang
BuildRequires:	erlang
BuildRequires:  erlang-erl_interface

%description event-erlang-event
Erlang Event Module for FreeSWITCH.

%package event-multicast
Summary:	Multicast Event System for the FreeSWITCH open source telephony platform
Group:		System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description event-multicast
Multicast Event System for FreeSWITCH.

#%package event-zmq
#Summary:	ZeroMQ Event System for the FreeSWITCH open source telephony platform
#Group:		System/Libraries
#Requires:	 %{name} = %{version}-%{release}
#
#%description event-zmq
#ZeroMQ Event System for FreeSWITCH.

%package event-json-cdr
Summary:	JSON CDR Logger for the FreeSWITCH open source telephony platform
Group:		System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description event-json-cdr
JSON CDR Logger for FreeSWITCH.

%package event-snmp
Summary:	SNMP stats reporter for the FreeSWITCH open source telephony platform
Group:		System/Libraries
Requires:       %{name} = %epoch:%version-%release
Requires:	net-snmp
BuildRequires:	net-snmp-devel

%description event-snmp
SNMP stats reporter for the FreeSWITCH open source telephony platform

######################################################################################################################
#				FreeSWITCH Media Format Modules
######################################################################################################################

%package format-local-stream
Summary:	Local File Streamer for the FreeSWITCH open source telephony platform
Group:		System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description format-local-stream
Local File Streamer for FreeSWITCH. It streams files from a directory and 
multiple channels connected to the same stream will hear the same (looped) 
file playback .. similar to a shoutcast stream. Useful for Music-on-hold type 
scenarios. 

%package format-native-file
Summary:	Native Media File support for the FreeSWITCH open source telephony platform
Group:		System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description format-native-file
The native file module is designed to make it easy to play sound files where no
transcoding is necessary. The default FreeSWITCH sound files are in wav format.
Generally, these require transcoding when being played to callers. However, if
a native format sound file is available then FreeSWITCH can use it. 

%package format-portaudio-stream
Summary:	PortAudio Media Steam support for the FreeSWITCH open source telephony platform
Group:		System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description format-portaudio-stream
Portaudio Streaming interface Audio for FreeSWITCH

%package format-shell-stream
Summary:	Implements Media Steaming from arbitrary shell commands for the FreeSWITCH open source telephony platform
Group:		System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description format-shell-stream
Mod shell stream is a FreeSWITCH module to allow you to stream audio from an 
arbitrary shell command. You could use it to read audio from a database, from 
a soundcard, etc. 

%if "%distro_section" == "tainted"
%package format-mod-shout
Summary:	Implements Media Steaming from arbitrary shell commands for the FreeSWITCH open source telephony platform
Group:		System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description format-mod-shout
Mod Shout is a FreeSWITCH module to allow you to stream audio from MP3s or a
shoutcast stream.
%endif

%package format-tone-stream
Summary:	Implements TGML Tone Generation for the FreeSWITCH open source telephony platform
Group:		System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description format-tone-stream
Implements TGML Tone Generation for the FreeSWITCH open source telephony platform

######################################################################################################################
#				FreeSWITCH Programing Language Modules
######################################################################################################################

%package lua
Summary:	Lua support for the FreeSWITCH open source telephony platform
Group:		System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description	lua
Lua language support.

%package	perl
Summary:	Perl support for the FreeSWITCH open source telephony platform
Group:		System/Libraries
Requires:       %{name} = %epoch:%version-%release
Requires:	perl

%description	perl
Perl language support.

%package        python
Summary:        Python support for the FreeSWITCH open source telephony platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release
Requires:	python

%description    python
Support for Python scripts.

#package spidermonkey
#Summary:	JavaScript support for the FreeSWITCH open source telephony platform
#Group:		System/Libraries
#Requires:       %{name} = %epoch:%version-%release

#description spidermonkey
#Support for Javascript server-side.

######################################################################################################################
#				FreeSWITCH Say Modules
######################################################################################################################

%package lang-en
Summary:	Provides english language dependand modules and speech config for the FreeSWITCH Open Source telephone platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release
Recommends:	%{name}-sounds-en

%description lang-en
English language phrases module and directory structure for say module and voicemail

%package lang-es
Summary:	Provides spanish language dependand modules and speech config for the FreeSWITCH Open Source telephone platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release
Recommends:	%{name}-sounds-es

%description lang-es
Spanish language phrases module and directory structure for say module and voicemail

%package lang-pt
Summary:	Provides portugese language dependand modules and speech config for the FreeSWITCH Open Source telephone platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description lang-pt
Portuguese language phrases module and directory structure for say module and voicemail

%package lang-ru
Summary:        Provides russian language dependand modules and speech config for the FreeSWITCH Open Source telephone platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release
Recommends:	%{name}-sounds-ru

%description lang-ru
Russian language phrases module and directory structure for say module and voicemail

%package lang-fr
Summary:        Provides french language dependend modules and speech config for the FreeSWITCH Open Source telephone platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release
Recommends:	%{name}-sounds-fr

%description lang-fr
French language phrases module and directory structure for say module and voicemail

%package lang-de
Summary:        Provides german language dependend modules and speech config for the FreeSWITCH Open Source telephone platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description lang-de
German language phrases module and directory structure for say module and voicemail

%package lang-he
Summary:        Provides hebrew language dependend modules and speech config for the FreeSWITCH Open Source telephone platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description lang-he
Hebrew language phrases module and directory structure for say module and voicemail

%package lang-sv
Summary:        Provides swedish language dependend modules and speech config for the FreeSWITCH Open Source telephone platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release
Recommends:     %{name}-sounds-sv

%description lang-sv
Swedish language phrases module and directory structure for say module and voicemail

######################################################################################################################
#				FreeSWITCH Timer Modules
######################################################################################################################

%package timer-posix
Summary:        Provides posix timer for the FreeSWITCH Open Source telephone platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description timer-posix
Provides posix timer for the FreeSWITCH Open Source telephone platform.

%if %{build_timerfd}
%package timer-timerfd
Summary:        Provides Linux Timerfs based timer for the FreeSWITCH Open Source telephone platform.
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description timer-timerfd
Provides Linux Timerfs based timer for the FreeSWITCH Open Source telephone 
platform.
%endif

######################################################################################################################
#				FreeSWITCH XML INT Modules
######################################################################################################################

%package xml-cdr
Summary:        Provides XML CDR interface for the FreeSWITCH Open Source telephone platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description xml-cdr
Provides XML CDR interface for the FreeSWITCH Open Source telephone platform.

%package xml-curl
Summary:        Provides XML Curl interface for the FreeSWITCH Open Source telephone platform
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description xml-curl
Provides XML Curl interface for the FreeSWITCH Open Source telephone platform.
Pull dynamic XML configs for FreeSWITCH over HTTP.

%package xml-rpc
Summary:        Provides XML-RPC interface for the FreeSWITCH Open Source telephone platform.
Group:          System/Libraries
Requires:       %{name} = %epoch:%version-%release

%description xml-rpc
Provides XML-RPC interface for the FreeSWITCH Open Source telephone platform.

######################################################################################################################
#                               FreeSWITCH Client
######################################################################################################################

%package cli
Summary:	Provides the fs_cli client
Group:		System/Libraries
Requires:	%{name} = %{epoch}:%{version}-%{release}

%description cli
Provides the fs_clie client for the FreeSWITCH Open Source telephone platform.

######################################################################################################################
#				FreeSWITCH basic config module
######################################################################################################################

%package config-vanilla
Summary:        Basic vanilla config set for the FreeSWITCH Open Source telephone platform
Group:          System/Libraries
BuildArch: 	noarch
Provides:	%{name}-config
Requires:       %{name} = %epoch:%version-%release
Requires:	%{name}-application-abstraction
Requires:	%{name}-application-avmd
Requires:	%{name}-application-blacklist
Requires:	%{name}-application-callcenter
Requires:	%{name}-application-cidlookup
Requires:	%{name}-application-conference
Requires:	%{name}-application-curl
Requires:	%{name}-application-db
Requires:	%{name}-application-directory
Requires:	%{name}-application-distributor
Requires:	%{name}-application-easyroute
Requires:	%{name}-application-enum
Requires:	%{name}-application-esf
Requires:	%{name}-application-expr
Requires:	%{name}-application-fifo
Requires:	%{name}-application-fsk
Requires:	%{name}-application-fsv
Requires:	%{name}-application-hash
Requires:	%{name}-application-httapi
Requires:	%{name}-application-http-cache
Requires:	%{name}-application-lcr
Requires:	%{name}-application-limit
Requires:	%{name}-application-memcache
Requires:	%{name}-application-nibblebill
Requires:	%{name}-application-redis
Requires:	%{name}-application-rss
Requires:	%{name}-application-sms
Requires:	%{name}-application-snapshot
Requires:	%{name}-application-snom
Requires:	%{name}-application-soundtouch
Requires:	%{name}-application-spy
Requires:	%{name}-application-stress
Requires:	%{name}-application-valet_parking
Requires:	%{name}-application-voicemail
Requires:	%{name}-application-voicemail-ivr
Requires:	%{name}-codec-passthru-amr
Requires:	%{name}-codec-bv
Requires:	%{name}-codec-passthru-g723_1
Requires:	%{name}-codec-g729
Requires:	%{name}-codec-h26x
Requires:	%{name}-codec-ilbc
%if %{build_mod_siren}
Requires:	%{name}-codec-siren
%endif
Requires:	%{name}-codec-speex
Requires:	%{name}-format-local-stream
Requires:	%{name}-format-native-file
Requires:	%{name}-format-portaudio-stream
Requires:	%{name}-format-tone-stream
Requires:	%{name}-lang-en

%description config-vanilla
Basic vanilla config set for the FreeSWITCH Open Source telephone platform.

%package -n nagios-check_freeswitch
Summary:	Provides standar nagios checkings
Group:		Networking/Other
BuildArch:	noarch
Requires:	freeswitch
Requires:	nagios-plugins

%description -n nagios-check_freeswitch
Provides plugins to check Freeswitch

######################################################################################################################
#
#				Unpack and prepare Source archives, copy stuff around etc ..
#
######################################################################################################################

%prep
%setup -q
#patch0 -p0 -b .acconfig
#patch1 -p1 -b .str
#patch2 -p1 -b .link
cp %{SOURCE10} libs/
%if %{build_mod_ha_cluster}
tar -jxf %{SOURCE2}
%patch5 -p0 -b .gccmemset
mv freeswitch-contrib-master/mod/applications/mod_ha_cluster src/mod/applications/
%patch3 -p0 -b .mod_ha_cluster
%endif
%patch4 -p1 -b .dkms
#patch6 -p1 -b .skypopengcc48
#patch7 -p0 -b .tinfo
%patch8 -p0 -b .writestring
#patch9 -p0 -b .hack
#patch10 -p0 -b .tinfo_mod_shout
#patch11 -p1 -b .mod_perl
#patch12 -p0 -b .perl-pedantic
#patch14 -p0 -b .postresql
#patch15 -p0
#patch16 -p1
%patch17 -p1 -b .sounds
%patch18 -p1 -b .armabi

######################################################################################################################
#
#						Start the Build process
#
######################################################################################################################
%build

#
# Do not register for ClueCon during build
#
touch noreg

#
# Do not download external packages during build, bundle them instead.
#
pushd libs
tar -axf %{SOURCE20} 
tar -axf %{SOURCE21}
popd

######################################################################################################################
#
#				Here the modules that will be build get defined
#
######################################################################################################################
######################################################################################################################
#
#						Application Modules
#
######################################################################################################################
APPLICATION_MODULES_AC="applications/mod_abstraction applications/mod_avmd applications/mod_blacklist \
			applications/mod_callcenter  applications/mod_cidlookup \
			applications/mod_commands applications/mod_conference applications/mod_curl"
APPLICATION_MODULES_DE="applications/mod_db applications/mod_directory applications/mod_distributor \
			applications/mod_dptools applications/mod_easyroute applications/mod_enum applications/mod_esf \
			applications/mod_expr "

%if %{build_mod_esl}
APPLICATION_MODULES_DE+="applications/mod_esl"
%endif

APPLICATION_MODULES_FR="applications/mod_fifo applications/mod_fsk applications/mod_fsv applications/mod_hash \
			applications/mod_httapi applications/mod_http_cache applications/mod_lcr applications/mod_limit \
			applications/mod_memcache applications/mod_nibblebill applications/mod_redis applications/mod_rss " 

%if %{build_mod_ha_cluster}
APPLICATION_MODULES_FR+="applications/mod_ha_cluster"
%endif

APPLICATION_MODULES_SZ="applications/mod_sms applications/mod_snapshot applications/mod_snom applications/mod_soundtouch \
			applications/mod_spandsp applications/mod_spy applications/mod_stress \
			applications/mod_valet_parking applications/mod_voicemail \
			applications/mod_voicemail_ivr"

APPLICATIONS_MODULES="$APPLICATION_MODULES_AC $APPLICATION_MODULES_DE $APPLICATION_MODULES_FR $APPLICATION_MODULES_SZ"

######################################################################################################################
#
#				Automatic Speech Recognition and Text To Speech Modules
#
######################################################################################################################
ASR_TTS_MODULES="asr_tts/mod_flite asr_tts/mod_pocketsphinx asr_tts/mod_tts_commandline asr_tts/mod_unimrcp"

######################################################################################################################
#
#						Codecs
#
######################################################################################################################
CODECS_MODULES="codecs/mod_amr codecs/mod_amrwb codecs/mod_bv codecs/mod_celt codecs/mod_codec2 codecs/mod_g723_1 \
		codecs/mod_g729 codecs/mod_h26x codecs/mod_ilbc codecs/mod_isac codecs/mod_mp4v codecs/mod_opus codecs/mod_silk \
		codecs/mod_speex codecs/mod_theora "

%if %{build_mod_siren}
CODECS_MODULES+="codecs/mod_siren "
%endif

%if %{build_sng_tc}
CODECS_MODULES+="codecs/mod_sangoma_codec"
%endif

######################################################################################################################
#
#					Dialplan Modules
#
######################################################################################################################
DIALPLANS_MODULES="dialplans/mod_dialplan_directory dialplans/mod_dialplan_xml"
#DISABLED DIALPLANS dialplans/mod_dialplan_asterisk 
######################################################################################################################
#
#					Directory Modules
#
######################################################################################################################
DIRECTORIES_MODULES=""

######################################################################################################################
#
#						Endpoints
#
######################################################################################################################
ENDPOINTS_MODULES="endpoints/mod_dingaling ../../libs/freetdm/mod_freetdm \
			endpoints/mod_loopback endpoints/mod_portaudio endpoints/mod_rtmp \
			endpoints/mod_skinny endpoints/mod_skypopen endpoints/mod_sofia"

## DISABLED MODULES DUE TO BUILD ISSUES endpoints/mod_gsmopen endpoints/mod_h323 endpoints/mod_khomp 
 
######################################################################################################################
#
#						Event Handlers
#
######################################################################################################################
EVENT_HANDLERS_MODULES="event_handlers/mod_cdr_csv event_handlers/mod_cdr_pg_csv event_handlers/mod_cdr_sqlite \
			event_handlers/mod_cdr_mongodb event_handlers/mod_erlang_event event_handlers/mod_event_multicast \
			event_handlers/mod_event_socket event_handlers/mod_json_cdr event_handlers/mod_snmp"

#### BUILD ISSUES NET RESOLVED FOR RELEASE event_handlers/mod_event_zmq 
######################################################################################################################
#
#					File and Audio Format Handlers
#
######################################################################################################################
FORMATS_MODULES="formats/mod_local_stream formats/mod_native_file formats/mod_portaudio_stream \
                 formats/mod_shell_stream formats/mod_sndfile formats/mod_tone_stream"

%if "%distro_section" == "tainted"
FORMATS_MODULES+="formats/mod_shout "
%endif

######################################################################################################################
#
#						Embedded Languages
#
######################################################################################################################
LANGUAGES_MODULES="languages/mod_lua languages/mod_perl languages/mod_python "
#LANGUAGES_MODULES="languages/mod_lua  languages/mod_python "

######################################################################################################################
#
#						Logging Modules
#
######################################################################################################################
LOGGERS_MODULES="loggers/mod_console loggers/mod_logfile loggers/mod_syslog"

######################################################################################################################
#
#						Phrase engine language modules
#
######################################################################################################################
SAY_MODULES="say/mod_say_de say/mod_say_en say/mod_say_fr say/mod_say_he say/mod_say_ru say/mod_say_es say/mod_say_pt"

######################################################################################################################
#
#							Timers
#
######################################################################################################################
TIMERS_MODULES="timers/mod_posix_timer "
%if %{build_timerfd}
TIMERS_MODULES+="timers/mod_timerfd"
%endif

######################################################################################################################
#
#						XML Modules
#
######################################################################################################################
XML_INT_MODULES="xml_int/mod_xml_cdr xml_int/mod_xml_curl xml_int/mod_xml_rpc"

######################################################################################################################
#
#				Create one environment variable out of all the module defs
#
######################################################################################################################
MYMODULES="$APPLICATIONS_MODULES $CODECS_MODULES $DIALPLANS_MODULES $DIRECTORIES_MODULES \
$ENDPOINTS_MODULES $ASR_TTS_MODULES $EVENT_HANDLERS_MODULES $FORMATS_MODULES $LANGUAGES_MODULES $LOGGERS_MODULES \
$SAY_MODULES $TIMERS_MODULES $XML_INT_MODULES"

######################################################################################################################
#
#					Create Modules build list and set variables
#
######################################################################################################################

export MODULES=$MYMODULES
test ! -f  modules.conf || rm -f modules.conf
touch modules.conf
for i in $MODULES; do echo $i >> modules.conf; done
export VERBOSE=yes
export DESTDIR=%{buildroot}/
export PKG_CONFIG_PATH=/usr/bin/pkg-config:$PKG_CONFIG_PATH
export ACLOCAL_FLAGS="-I /usr/share/aclocal"
#export LDFLAGS="${LDFLAGS:-%optflags} -Wpedantic -Wnoerror=implicit-function-declaration"  SWITCH_AM_CFLAGS
#export SWITCH_AM_CFLAGS='-Wall -std=c99 -Wdeclaration-after-statement'
export SWITCH_ANSI_CFLAGS='-Wall -std=c99  -Wdeclaration-after-statement'
%ifarch x86_64
export CFLAGS="$CFLAGS -msse2"
%endif

######################################################################################################################
#
#				Bootstrap, Configure and Build the whole enchilada
#
######################################################################################################################

#if test ! -f Makefile.in 
#then 
#   ./bootstrap.sh
#fi
./rebootstrap.sh
#libtoolize --force
#aclocal
#autoheader
#automake --force-missing --add-missing
#autoconf
find src/mod -name 'configure*'  | xargs sed -i 's/-pedantic//g'
export LDFLAGS="-ltinfo -lm -ldl -lasound -lrt -lz -lcurl -fPIC"
export CFLAGS=`echo %{optflags} | sed -e 's/-pedantic//'`
export perldir=%{perl_vendorarch}
#export CFLAGS='-Wpedantic'
export CFLAGS="$CFLAGS -fPIC"
export LIBS='-ltinfo -lm -ldl -lasound -lrt -lz -lcurl'
export CONFIGURE_TOP=.
pushd libs/apr

  %{?!_disable_libtoolize:%{?__libtoolize_configure:%{__libtoolize_configure};}} \
  $CONFIGURE_TOP/configure %{_target_platform} \
        --program-prefix=%{?_program_prefix} \
        --prefix=%{_prefix} \
        --exec-prefix=%{_exec_prefix} \
        --bindir=%{_bindir} \
        --sbindir=%{_sbindir} \
        --sysconfdir=%{_sysconfdir} \
        --datadir=%{_datadir} \
        --includedir=%{_includedir} \
        --libdir=%{_libdir} \
        --libexecdir=%{_libexecdir} \
        --localstatedir=%{_localstatedir} \
        --sharedstatedir=%{_sharedstatedir} \
        --mandir=%{_mandir} \
        --infodir=%{_infodir} \
	--disable-shared \
	--enable-static \
    $CONFIGURE_XPATH
make
popd

export THISDIR=$(pwd)
export PATH=$PATH:$THISDIR/libs/apr
export LDFLAGS="-ltinfo -lm -ldl -lasound -lrt -lz -lcurl -L$THISDIR/libs/apr -L$THISDIR/libs/apr/.libs -lapr-1 -fPIC"
  %{?!_disable_libtoolize:%{?__libtoolize_configure:%{__libtoolize_configure};}} \
  [ -f $CONFIGURE_TOP/configure.in -o -f $CONFIGURE_TOP/configure.ac ] && \
  CONFIGURE_XPATH="--x-includes=%{_prefix}/include --x-libraries=%{_prefix}/%{_lib}" \
  $CONFIGURE_TOP/configure %{_target_platform} \
        --program-prefix=%{?_program_prefix} \
        --prefix=%{_prefix} \
        --exec-prefix=%{_exec_prefix} \
        --bindir=%{_bindir} \
        --sbindir=%{_sbindir} \
        --sysconfdir=%{_sysconfdir} \
        --datadir=%{_datadir} \
        --includedir=%{_includedir} \
        --libdir=%{_libdir} \
        --libexecdir=%{_libexecdir} \
        --localstatedir=%{_localstatedir} \
        --sharedstatedir=%{_sharedstatedir} \
        --mandir=%{_mandir} \
        --infodir=%{_infodir} \
    $CONFIGURE_XPATH \
	--enable-shared \
	--enable-static \
	--enable-zrtp \
	--with-logfiledir=%{_logdir}/%{name} \
	--with-modinstdir=%{MODINSTDIR} \
	--with-rundir=%{_runtimedir} \
	--with-dbdir=%{_localstatedir}/lib/%{name}/db \
	--with-htdocsdir=%{_datarootdir}/%{name}/htdocs \
	--with-soundsdir=%{_datarootdir}/%{name}/sounds \
	--with-cachedir=%{CACHEDIR} \
	--with-certsdir=%{CERTSDIR} \
	--enable-core-odbc-support \
	--enable-core-libedit-support \
	--with-grammardir=%{_datarootdir}/%{name}/grammar \
	--with-scriptdir=%{_datarootdir}/%{name}/scripts \
	--with-recordingsdir=%{_localstatedir}/lib/%{name}/recordings \
	--with-pkgconfigdir=%{_datarootdir}/pkgconfig \
	--with-storagedir=%{_localstatedir}/lib/%{name}/storage \
	--with-odbc \
	--with-erlang \
	--with-openssl \
	--with-devrandom=/dev/random --enable-threads \
	--enable-core-pgsql-support \
	--enable-system-xmlrpc-c \
	--enable-system-lua \
	--with-storagedir=%{STORAGEDIR} \
	--with-cachedir=%{CACHEDIR}  \
	--with-imagesdir=%{IMAGESDIR} \
	--enable-timerfd-wrapper 

find -name 'Makefile*' -print0 | xargs -0 sed -i 's/-pedantic//g'
find -name 'Makefile*' -print0 | xargs -0 sed -i 's/\(-Werror \)\|\(-Werror$\)/ /g'

unset MODULES
#{__make}
make V=1
cd libs/esl
##{__make} pymod
make pymod V=1

######################################################################################################################
#
#				Install it and create some required dirs and links
#
######################################################################################################################
%install
##%makeinstall_std
%make_install
#####################################################################################################################
#
#				DKMS
#
####################################################################################################################
%{__install} -d -m755 %{buildroot}%{_usrsrc}/%{module}-%{version}-%{release}
pushd src/mod/endpoints/mod_skypopen/oss
cp -r * %{buildroot}%{_usrsrc}/%{module}-%{version}-%{release}
popd

cat > %{buildroot}%{_usrsrc}/%{module}-%{version}-%{release}/dkms.conf <<EOF
PACKAGE_NAME="%module"
PACKAGE_VERSION="%version-%release"
DEST_MODULE_LOCATION[0]="/kernel/%module"
BUILT_MODULE_NAME[0]="%module"
MAKE[0]="make KDIR=\${kernel_source_dir}"
AUTOINSTALL="yes"
EOF


%{__install} -D -p -m 0644 %{SOURCE11} %{buildroot}%{_tmpfilesdir}/%{name}.conf
mkdir -p %{buildroot}/%{_sysconfdir}/odbc
rm -rf  %{buildroot}/%{_sysconfdir}/freeswitch/autoload_configs
%{__make} DESTDIR=%{buildroot} config-vanilla
%{__make} DESTDIR=%{buildroot} install
mkdir -p %{buildroot}/%{_datadir}/%{name}/sounds

# Create a log dir
%{__mkdir} -p %{buildroot}/%{_logdir}/%{name}

# SSL & Cachedir
%{__mkdir} -p %{buildroot}/%{CERTSDIR}
%{__mkdir} -p %{buildroot}/%{CACHEDIR}

#install the esl stuff
cd libs/esl
%{__make} DESTDIR=%{buildroot} pymod-install

%if %{build_py26_esl}
#install esl for python 26
%{__make} clean
sed -i s/python\ /python26\ /g python/Makefile
%{__make} pymod
mkdir -p %{buildroot}/usr/lib/python2.6/site-packages
%{__make} DESTDIR=%{buildroot} pymod-install
%endif

cd ../..

mkdir -p  %{buildroot}/%{perl_vendorarch}
mkdir -p  %{buildroot}/%{perl_vendorarch}/auto
%{__install} src/mod/languages/mod_perl/freeswitch.pm %{buildroot}/%{perl_vendorarch}
#{__install} src/mod/languages/mod_perl/freeswitch.so %{buildroot}/%{perl_vendorarch}/auto
mv  %{buildroot}/usr/perl/* %{buildroot}/%{perl_vendorarch}
rm -rf %{buildroot}/usr/perl/
mkdir -p %{buildroot}/%{_localstatedir}/lib/%{name}/recordings
mkdir -p %{buildroot}/%{_localstatedir}/lib/%{name}/storage/voicemail
%{__install} -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/freeswitch.service
# Add the sysconfiguration file
%{__install} -D -m 744 build/freeswitch.sysconfig %{buildroot}/etc/sysconfig/freeswitch
# Add monit file
%{__install} -D -m 644 build/freeswitch.monitrc %{buildroot}/etc/monit.d/freeswitch.monitrc
######################################################################################################################
#
#                               Remove files that are not wanted if they exist
#
######################################################################################################################

%if %{build_sng_ss7}
#do not delete a thing
%else
%{__rm} -f %{buildroot}/%{MODINSTDIR}/ftmod_sangoma_ss7*
%endif
%if %{build_sng_isdn}
#do not delete a thing
%else
%{__rm} -f %{buildroot}/%{MODINSTDIR}/ftmod_sangoma_isdn*
%endif


# Nasty work around, please suggest a fix
%{__mv}  %{buildroot}/etc/autoload_configs %{buildroot}/%{_sysconfdir}/%{name}/autoload_configs/freetdm.conf.xml
%{__mv}  %{buildroot}/etc/freetdm.conf %{buildroot}/%{_sysconfdir}/%{name}/
%{__mv}  %{buildroot}/etc/pika.conf %{buildroot}/%{_sysconfdir}/%{name}/
%{__mv}  %{buildroot}/etc/tones.conf %{buildroot}/%{_sysconfdir}/%{name}/
%{__mv}  %{buildroot}/etc/wanpipe.conf %{buildroot}/%{_sysconfdir}/%{name}/
%{__mv}  %{buildroot}/etc/zt.conf %{buildroot}/%{_sysconfdir}/%{name}/

install -d -m0755 %{buildroot}%{_libdir}/nagios/plugins/
install -m0755 %{SOURCE12} %{buildroot}%{_libdir}/nagios/plugins/check_fs_registered

install -d -m0755 %{buildroot}/etc/nagios/plugins.d
install -m0755 %{SOURCE13} %{buildroot}/etc/nagios/plugins.d

perl -pi -e 's|\@libexecdir\@|%{_libdir}/nagios/plugins|g' \
    %{buildroot}%{_sysconfdir}/nagios/plugins.d/*


######################################################################################################################
#
#			Add a freeswitch user with group daemon that will own the whole enchilada
#
######################################################################################################################
%pre
%_pre_useradd %{name} /dev/null /bin/false


%preun
%_preun_service %{name}


%post
chown freeswitch:daemon /var/log/freeswitch
%_tmpfilescreate %{name}
%_post_service %{name}

%postun
%_postun_userdel %{name}

%post -n dkms-skypopen
dkms add        -m %{module} -v %{version}-%{release} --rpm_safe_upgrade &&
dkms build      -m %{module} -v %{version}-%{release} --rpm_safe_upgrade &&
dkms install    -m %{module} -v %{version}-%{release} --rpm_safe_upgrade
true

%preun -n dkms-skypopen
dkms remove  -m %{module} -v %{version}-%{release} --all --rpm_safe_upgrade
true


%files
%{_tmpfilesdir}/%{name}.conf
######################################################################################################################
#
#			What to install where ... first set default permissions
#
######################################################################################################################
%defattr(0755,freeswitch,daemon)
######################################################################################################################
#
#							Directories
#
######################################################################################################################
#
#################################### Basic Directory Structure #######################################################
#
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}
%dir %attr(0750, freeswitch, daemon) %{_localstatedir}/lib/%name
%dir %attr(2770, freeswitch, daemon) %{_localstatedir}/lib/%{name}/db
%dir %attr(2770, freeswitch, daemon) %{_localstatedir}/lib/%{name}/recordings
%dir %attr(2770, freeswitch, daemon) %{_localstatedir}/lib/%{name}/storage/voicemail
%dir %attr(2770, freeswitch, daemon) %{_datarootdir}/%{name}/grammar
%dir %attr(0750, freeswitch, daemon) %{_datarootdir}/%{name}/htdocs
%dir %attr(0750, freeswitch, daemon) %{_logdir}/%{name}
%dir %attr(0750, freeswitch, daemon) %{_datarootdir}/%{name}/scripts
%dir %attr(2775, freeswitch, daemon) %{CACHEDIR}
%dir %attr(0755, freeswitch, daemon) %{_datarootdir}/%{name}/sounds
#
#################################### Config Directory Structure #######################################################
#
#dir %attr(0750, freeswitch, daemon) %{_sysconfdir}/dialplan
#dir %attr(0750, freeswitch, daemon) %{_sysconfdir}/dialplan/default
#dir %attr(0750, freeswitch, daemon) %{_sysconfdir}/dialplan/public
#dir %attr(0750, freeswitch, daemon) %{_sysconfdir}/dialplan/skinny-patterns
#dir %attr(0750, freeswitch, daemon) %{_sysconfdir}/directory
#dir %attr(0750, freeswitch, daemon) %{_sysconfdir}/directory/default
#dir %attr(0750, freeswitch, daemon) %{_sysconfdir}/jingle_profiles
#dir %attr(0750, freeswitch, daemon) %{_sysconfdir}/lang
#dir %attr(0750, freeswitch, daemon) %{_sysconfdir}/mrcp_profiles
#dir %attr(0750, freeswitch, daemon) %{_sysconfdir}/sip_profiles
#dir %attr(0750, freeswitch, daemon) %{_sysconfdir}/sip_profiles/external
#dir %attr(0750, freeswitch, daemon) %{_sysconfdir}/sip_profiles/internal
#dir %attr(0750, freeswitch, daemon) %{_sysconfdir}/skinny_profiles

#
#################################### Grammar Directory Structure #####################################################
#
%dir %attr(0750, freeswitch, daemon) %{_datarootdir}/%{name}/grammar/model
%dir %attr(0750, freeswitch, daemon) %{_datarootdir}/%{name}/grammar/model/communicator
%config(noreplace) %attr(0644, freeswitch, daemon) /etc/monit.d/freeswitch.monitrc


######################################################################################################################
#
#						Other Fíles
#
######################################################################################################################
%config(noreplace) %attr(0640, freeswitch, daemon) %{_datarootdir}/%{name}/htdocs/*
#/etc/rc.d/init.d/freeswitch
%{_unitdir}/freeswitch.service
%attr(0644,root,root) %config(noreplace) /etc/sysconfig/freeswitch
%dir %attr(0755, root, root) /etc/monit.d
######################################################################################################################
#
#						Binaries
#
######################################################################################################################
%attr(0755, freeswitch, daemon) %{_bindir}/*
%exclude %{_bindir}/fs_cli

%attr(0644, freeswitch, daemon) %{FONTSDIR}/*
%attr(0644, freeswitch, daemon) %{IMAGESDIR}/*


%files -n %{libname}
%{_libdir}/libfreeswitch*.so.*
######################################################################################################################
#
#			Modules in Alphabetical Order, please keep them that way..
#
######################################################################################################################
%{MODINSTDIR}/mod_cdr_csv.so*
%{MODINSTDIR}/mod_console.so*
%{MODINSTDIR}/mod_commands.so*
%{MODINSTDIR}/mod_dialplan_directory.so* 
%{MODINSTDIR}/mod_dialplan_xml.so* 
%{MODINSTDIR}/mod_dptools.so*
%{MODINSTDIR}/mod_event_socket.so*
%{MODINSTDIR}/mod_logfile.so*
%{MODINSTDIR}/mod_loopback.so*
#{MODINSTDIR}/mod_native_file.so*
%{MODINSTDIR}/mod_sndfile.so*
%{MODINSTDIR}/mod_sofia.so*
#{MODINSTDIR}/mod_sofia.a
%{MODINSTDIR}/mod_spandsp.so*
#{MODINSTDIR}/mod_spandsp.a
%{MODINSTDIR}/mod_syslog.so*
#{MODINSTDIR}/mod_tone_stream.so*
%{MODINSTDIR}/mod_xml_rpc.so* 
######################################################################################################################
#
#						Package for the developer
#
######################################################################################################################
%files -n %{develname}
%defattr(-, freeswitch, daemon)
%{_libdir}/libfreeswitch*.so
%{_libdir}/libfreeswitch*.a
#{_libdir}/*.a
%{_libdir}/*.la
%{_datarootdir}/pkgconfig/*
#{MODINSTDIR}/*.a
%{MODINSTDIR}/*.la
%{_includedir}/*.h

######################################################################################################################
#						Vanilla Config Files
######################################################################################################################
%files config-vanilla
%config(noreplace) %attr(0750, freeswitch, daemon) %{_sysconfdir}/freeswitch/autoload_configs
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/chatplan/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/dialplan/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/dialplan/public/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/dialplan/skinny-patterns/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/*.conf
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/*.ttml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/*.tpl
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/ivr_menus/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/jingle_profiles/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/de/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/de/demo/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/de/vm/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/en/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/en/demo/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/en/dir/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/en/ivr/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/en/vm/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/es/demo/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/es/dir/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/es/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/es/vm/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/fr/demo/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/fr/dir/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/fr/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/fr/vm/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/he/demo/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/he/dir/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/he/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/he/vm/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/pt/demo/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/pt/dir/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/pt/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/pt/vm/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/ru/demo/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/ru/dir/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/ru/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/ru/vm/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/mime.types
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/mrcp_profiles/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/sip_profiles/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/sip_profiles/external/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/sip_profiles/external-ipv6/example.xml
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/sip_profiles/internal/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/skinny_profiles/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/dialplan/default/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/directory/default/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/directory/*.xml

%config(noreplace) %attr(0660, freeswitch, daemon) %{_datarootdir}/%{name}/grammar/default.dic
%config(noreplace) %attr(0660, freeswitch, daemon) %{_datarootdir}/%{name}/grammar/model/communicator/*

### END OF config-vanilla

######################################################################################################################
#
#						Application Packages
#
######################################################################################################################
%files application-abstraction
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_abstraction.so*

%files application-avmd
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_avmd.so*

%files application-blacklist
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_blacklist.so*

%files application-callcenter
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_callcenter.so*

%files application-cidlookup
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_cidlookup.so*

%files application-conference
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_conference.so*

%files application-curl
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_curl.so*

%files application-db
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_db.so*

%files application-directory
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_directory.so*

%files application-distributor
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_distributor.so*

%files application-easyroute
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_easyroute.so*

%files application-enum
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_enum.so*

%files application-esf
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_esf.so*

%if %{build_mod_esl}
%files application-esl
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_esl.so*
%endif

%files application-expr
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_expr.so*
#{MODINSTDIR}/mod_expr.a

%files application-fifo
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_fifo.so*

%files application-fsk
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_fsk.so*

%files application-fsv
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_fsv.so*

%files application-hash
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_hash.so*
#{MODINSTDIR}/mod_hash.a

%files application-httapi
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_httapi.so*

%files application-http-cache
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_http_cache.so*

%files application-lcr
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_lcr.so*

%files application-limit
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_limit.so*

%files application-memcache
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_memcache.so*

%files application-nibblebill
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_nibblebill.so*

%files application-redis
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_redis.so*

%files application-rss
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_rss.so*

%if %{build_mod_ha_cluster}
%files application-ha_cluster
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_ha_cluster.so*
%endif

%files application-sms
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_sms.so*

%files application-snapshot
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_snapshot.so*

%files application-snom
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_snom.so*

%files application-soundtouch
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_soundtouch.so*

%files application-spy
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_spy.so*

%files application-stress
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_stress.so*
#{MODINSTDIR}/mod_stress.a

%files application-valet_parking
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_valet_parking.so*

%files application-voicemail
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_voicemail.so*

%files application-voicemail-ivr
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_voicemail_ivr.so*

######################################################################################################################
#
#						ASR RRS Packages
#
######################################################################################################################
%files asrtts-flite
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_flite.so*

%files asrtts-pocketsphinx
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_pocketsphinx.so*

%files asrtts-tts-commandline
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_tts_commandline.so*

%files asrtts-unimrcp
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_unimrcp.so*
#{MODINSTDIR}/mod_unimrcp.a

######################################################################################################################
#
#						CODEC Packages
#
######################################################################################################################

%files codec-passthru-amr
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_amr.so*

%files codec-passthru-amrwb
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_amrwb.so*

%files codec-bv
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_bv.so*

#files codec-celt
#defattr(-,freeswitch,daemon)
#{MODINSTDIR}/mod_celt.so*

%files codec-codec2
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_codec2.so*


%files codec-passthru-g723_1
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_g723_1.so*

%files codec-passthru-g729
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_g729.so*

%files codec-h26x
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_h26x.so*

%files codec-ilbc
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_ilbc.so*

%files codec-isac
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_isac.so*

%files codec-mp4v
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_mp4v.so*

%files codec-opus
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_opus.so*

%if %{build_sng_tc}
%files sangoma-codec
%defattr(-, freeswitch, daemon)
%{MODINSTDIR}/mod_sangoma_codec.so*
%endif

%files codec-silk
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_silk.so*

%if %{build_mod_siren}
%files codec-siren
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_siren.so*
%endif

%files codec-speex
%defattr(-,freeswitch,daemon)
#{MODINSTDIR}/mod_speex.so*

%files codec-theora
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_theora.so*

######################################################################################################################
#
#						FreeSWITCH Directory Modules
#
######################################################################################################################

%files directory-ldap
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_theora.so*

######################################################################################################################
#
#						FreeSWITCH endpoint Modules
#
######################################################################################################################

%files endpoint-dingaling
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_dingaling.so*

#%files endpoint-gsmopen
#%defattr(-,freeswitch,daemon)
#%{MODINSTDIR}/mod_gsmopen.so*

#%files endpoint-h323
#%defattr(-,freeswitch,daemon)
#%{MODINSTDIR}/mod_h323.so*

#%files endpoint-khomp
#%defattr(-,freeswitch,daemon)
#%{MODINSTDIR}/mod_khomp.so*

%files endpoint-portaudio
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_portaudio.so*
#{MODINSTDIR}/mod_portaudio.a

%files endpoint-rtmp
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_rtmp.so*

%files endpoint-skinny
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_skinny.so*
#{MODINSTDIR}/mod_skinny.a

%files endpoint-skypopen
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_skypopen.so*
#{MODINSTDIR}/mod_skypopen.a

%files -n dkms-skypopen
%{_usrsrc}/%{module}-%{version}-%{release}

######################################################################################################################
#
#						FreeTDM Module for TDM Interaction
#
######################################################################################################################
%files freetdm
%defattr(-, freeswitch, daemon)
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/tones.conf
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/autoload_configs/freetdm.conf.xml
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/pika.conf
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/freetdm.conf
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/wanpipe.conf
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/zt.conf
%{_libdir}/libfreetdm.so*
%{_libdir}/libfreetdm.a
%{MODINSTDIR}/mod_freetdm.so*
%{MODINSTDIR}/ftmod_skel*.so*
%{MODINSTDIR}/ftmod_[a-r,t-z]*.so*
#{MODINSTDIR}/ftmod_*.a

%if %{build_sng_ss7}
%files freetdm-sng-ss7
%defattr(-, freeswitch, daemon)
%{MODINSTDIR}/ftmod_sangoma_ss7.so*
%endif

%if %{build_sng_isdn}
%files freetdm-sng-isdn
%defattr(-, freeswitch, daemon)
%{MODINSTDIR}/ftmod_sangoma_isdn.so*
%endif

######################################################################################################################
#
#					Event Modules
#
######################################################################################################################

%files event-cdr-mongodb
%defattr(-, freeswitch, daemon)
%{MODINSTDIR}/mod_cdr_mongodb.so*

%files event-cdr-pg-csv
%defattr(-, freeswitch, daemon)
%{MODINSTDIR}/mod_cdr_pg_csv.so*

%files event-cdr-sqlite
%defattr(-, freeswitch, daemon)
%{MODINSTDIR}/mod_cdr_sqlite.so*

%files event-erlang-event
%defattr(-, freeswitch, daemon)
%{MODINSTDIR}/mod_erlang_event.so*

%files event-multicast
%defattr(-, freeswitch, daemon)
%{MODINSTDIR}/mod_event_multicast.so*

#%files event-zmq
#%defattr(-, freeswitch, daemon)
#%{MODINSTDIR}/mod_xmq.so*

%files event-json-cdr
%defattr(-, freeswitch, daemon)
%{MODINSTDIR}/mod_json_cdr.so*

%files event-snmp
%defattr(-, freeswitch, daemon)
%{MODINSTDIR}/mod_snmp.so*

######################################################################################################################
#
#					Event Modules
#
######################################################################################################################

%files format-local-stream
%defattr(-, freeswitch, daemon)
%{MODINSTDIR}/mod_local_stream.so*

%files format-native-file
%defattr(-, freeswitch, daemon)
%{MODINSTDIR}/mod_native_file.so*

%files format-portaudio-stream
%defattr(-, freeswitch, daemon)
%{MODINSTDIR}/mod_portaudio_stream.so*
#{MODINSTDIR}/mod_portaudio_stream.a

%files format-shell-stream
%defattr(-, freeswitch, daemon)
%{MODINSTDIR}/mod_shell_stream.so*

%if "%distro_section" == "tainted"
%files format-mod-shout
%defattr(-, freeswitch, daemon)
%{MODINSTDIR}/mod_shout.so*
%endif

%files format-tone-stream
%defattr(-, freeswitch, daemon)
%{MODINSTDIR}/mod_tone_stream.so*

######################################################################################################################
#
#					Embedded Language Modules
#
######################################################################################################################
%files lua
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_lua*.so*
#{MODINSTDIR}/mod_lua*.a
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/autoload_configs/lua.conf.xml

%files perl
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_perl*.so*
%{perl_vendorarch}/*
#exclude %{_prefix}/perl/*
%dir %attr(0750, freeswitch, daemon) %{_sysconfdir}/freeswitch/autoload_configs
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/autoload_configs/perl.conf.xml

%files python
%defattr(-,freeswitch,daemon)
%{MODINSTDIR}/mod_python*.so*
%attr(0644, root, bin) /usr/lib/python2.7/site-packages/freeswitch.py*
%attr(0755, root, bin) %{python2_sitearch}/_ESL.so*
%attr(0755, root, bin) %{python2_sitearch}/ESL.py*
%dir %attr(0750, freeswitch, daemon) %{_sysconfdir}/freeswitch/autoload_configs
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/autoload_configs/python.conf.xml

#files spidermonkey
#defattr(-,freeswitch,daemon)
#{MODINSTDIR}/mod_spidermonkey*.so*
#{MODINSTDIR}/mod_spidermonkey*.a
#{_libdir}/libjs.so*
#{_libdir}/libjs.a
#{_libdir}/libnspr4.so
#{_libdir}/libplds4.so
#{_libdir}/libplc4.so
#dir %attr(0750, freeswitch, daemon) %{_sysconfdir}/freeswitch/autoload_configs
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/autoload_configs/spidermonkey.conf.xml
#exclude %{_libdir}/libnspr4.a
#exclude %{_libdir}/libplc4.a
#exclude %{_libdir}/libplds4.a


######################################################################################################################
#
#						Language Modules
#
######################################################################################################################
%files lang-en
%defattr(-, freeswitch, daemon)
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/en
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/en/demo
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/en/vm
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/en/dir
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/en/ivr
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/en/*.xml
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/en/demo/*.xml
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/en/vm/*.xml
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/en/dir/*.xml
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/en/ivr/*.xml
%{MODINSTDIR}/mod_say_en.so*

%files lang-es
%defattr(-, freeswitch, daemon)
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/es
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/es/demo
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/es/vm
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/es/dir
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/es/ivr
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/es/*.xml
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/es/demo/*.xml
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/es/vm/*.xml
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/es/dir/*.xml
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/es/ivr/*.xml
%{MODINSTDIR}/mod_say_es.so*

%files lang-pt
%defattr(-, freeswitch, daemon)
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/pt
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/pt/demo
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/pt/vm
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/pt/dir
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/pt/ivr
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/pt/*.xml
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/pt/demo/*.xml
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/pt/vm/*.xml
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/pt/dir/*.xml
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/pt/ivr/*.xml
%{MODINSTDIR}/mod_say_pt.so*

%files lang-de
%defattr(-, freeswitch, daemon)
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/de
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/de/demo
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/de/vm
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/de/*.xml
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/de/demo/*.xml
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/de/vm/*.xml
%{MODINSTDIR}/mod_say_de.so*

%files lang-fr
%defattr(-, freeswitch, daemon)
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/fr
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/fr/demo
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/fr/vm
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/fr/dir
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/fr/*.xml
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/fr/demo/*.xml
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/fr/vm/*.xml
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/fr/dir/*.xml
%{MODINSTDIR}/mod_say_fr.so*

%files lang-ru
%defattr(-, freeswitch, daemon)
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/ru
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/ru/demo
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/ru/vm
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/ru/dir
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/ru/*.xml
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/ru/demo/*.xml
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/ru/vm/*.xml
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/ru/dir/*.xml
%{MODINSTDIR}/mod_say_ru.so*

%files lang-he
%defattr(-, freeswitch, daemon)
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/he/
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/he/demo
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/he/vm
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/he/dir
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/he/*.xml
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/he/demo/*.xml
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/he/vm/*.xml
#config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/lang/he/dir/*.xml
%{MODINSTDIR}/mod_say_he.so*

%files lang-sv
%defattr(-, freeswitch, daemon)
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/he/
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/he/demo
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/he/vm
#dir %attr(2770, freeswitch, daemon) %{_sysconfdir}/lang/he/dir
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/sv/*.xml
%config(noreplace) %attr(0660, freeswitch, daemon) %{_sysconfdir}/freeswitch/lang/sv/vm/*.xml

######################################################################################################################
#
#					Timer Modules
#
######################################################################################################################

%files timer-posix
%defattr(-, freeswitch, daemon)
%{MODINSTDIR}/mod_posix_timer.so*

%if %{build_timerfd}
%files timer-timerfd
%defattr(-, freeswitch, daemon)
%{MODINSTDIR}/mod_timerfd.so*
%endif

######################################################################################################################
#
#					XMLINT  Modules
#
######################################################################################################################

%files xml-cdr
%defattr(-, freeswitch, daemon)
%{MODINSTDIR}/mod_xml_cdr.so*

%files xml-curl
%defattr(-, freeswitch, daemon)
%{MODINSTDIR}/mod_xml_curl.so*

%files -n nagios-check_freeswitch
%config(noreplace) /etc/nagios/plugins.d/check_fs.cfg
%{_libdir}/nagios/plugins/check_fs_registered

%files cli
%attr(0755,-,-) %{_prefix}/bin/fs_cli



%changelog
* Sat Jun 10 2017 akien <akien> 1:1.6.17-7.mga6
+ Revision: 1107448
- Rebuild in core/release

* Fri Jun 09 2017 dlucio <dlucio> 1:1.6.17-6.mga6
+ Revision: 1107374
- Systemd tuning

* Fri Jun 09 2017 dlucio <dlucio> 1:1.6.17-5.mga6
+ Revision: 1107369
- NOTE: use double quotes
- NOTE: trying to tell where is the apr static lib

* Fri Jun 09 2017 dlucio <dlucio> 1:1.6.17-3.mga6
+ Revision: 1107359
- more tipos fixed
- experimental way to fix the linking issue

* Thu Jun 08 2017 dlucio <dlucio> 1:1.6.17-2.mga6
+ Revision: 1107276
- 1.6.17
- P18 rediffed
- BR flite-devel >= 2.0

* Tue May 30 2017 pterjan <pterjan> 1:1.6.8-11.mga6
+ Revision: 1105620
- Apply the patch and do not set sse2 on other architectures

* Tue May 30 2017 pterjan <pterjan> 1:1.6.8-10.mga6
+ Revision: 1105605
- Fix abi on armv7hl

* Tue May 30 2017 solbu <solbu> 1:1.6.8-9.mga6
+ Revision: 1105564
- Remove downloading of sounds from the spec file
- Cleanup spec
- Don't ship /usr/bin/fs_cli in freeswitch and freeswitch-cli (mga#17252)
- Don't download tarballs during build, bundle them instead

  + neoclust <neoclust>
    - Rebuild with fixed deps
    - Add BR on speexdsp

  + dlucio <dlucio>
    - new nagios script release
    - author credits
    - perl script formating
    - slik-devel as BR
    - 1.6.8
    - apr from the bundle, not system lib

  + tv <tv>
    - fix file list
    - BR flite-devel
    - BR libcodec2-devel
    - add some BRs from upstream
    - BR pkgconfig(broadvoice)
    - BR: yasm+nasm
    - new release

  + barjac <barjac>
    - BR pkgconfig(codec2) >= 0.5

  + umeabot <umeabot>
    - Rebuild for openssl
    - Mageia 6 Mass Rebuild

  + oden <oden>
    - rebuilt for postgresql 9.5.x

  + daviddavid <daviddavid>
    - rebuild with new separate speexdsp package

* Thu Jul 02 2015 dlucio <dlucio> 1:1.4.20-1.mga6
+ Revision: 849598
- 1.4.20

* Fri Jun 26 2015 tv <tv> 1:1.4.19-3.mga6
+ Revision: 844622
- rebuild with soname-ified perl

* Tue Jun 23 2015 sander85 <sander85> 1:1.4.19-2.mga6
+ Revision: 840773
- Rebuild for perl 5.22

* Sun Jun 21 2015 dlucio <dlucio> 1:1.4.19-1.mga6
+ Revision: 838285
- 1.4.19
- P16 rediffed
- now using system LUA and XMLRPC-C

* Wed Apr 08 2015 luigiwalser <luigiwalser> 1:1.4.15-3.mga5
+ Revision: 819919
- add upstream patch to fix build with openssl 1.0.2 (FS-7314)
- do not own /etc/pki/tls as this is owned by openssl and conflicts

* Thu Jan 29 2015 daviddavid <daviddavid> 1:1.4.15-2.mga5
+ Revision: 812668
- fix missing %%{epoch} for cli sub-package

* Tue Jan 27 2015 dlucio <dlucio> 1:1.4.15-1.mga5
+ Revision: 812441
- 1.4.15
- P1 for nibblebill
- not dot at the end of summary
- new cli sub-package
- 1.4.14
- P12 & P14 merged upstream
- new BR
- new config params
- filelist update
- sounds es-mx-maria now in 48 kHz
- 1.4.7
- P12 rediffed
- New P14
- filelist fixed

  + cjw <cjw>
    - rebuild against postgresql9.4

  + umeabot <umeabot>
    - Second Mageia 5 Mass Rebuild
    - Mageia 5 Mass Rebuild

  + tv <tv>
    - rebuild for missing pythoneggs deps
    - s/uggests:/Recommends:/

* Mon Jun 30 2014 dlucio <dlucio> 1:1.4.6-6.mga5
+ Revision: 641610
- since lame is only for tainted, there will be freeswitch for tainted too
- dirty workarround to have first FS complete
- 1.4.6
- lets use apr-1 from bundle
- P13 to fix gcc inline error
- P1, P2, P7, P9, P10 & P11 disabled
- P12 added
- we use  now lua5.2

  + fwang <fwang>
    - rebuild for new perl

  + pterjan <pterjan>
    - Rebuild for new Python

* Mon Oct 21 2013 umeabot <umeabot> 1:1.2.14-2.mga4
+ Revision: 540553
- Mageia 4 Mass Rebuild

  + dlucio <dlucio>
    - 1.2.14

* Wed Oct 09 2013 dlucio <dlucio> 1:1.2.13-1.mga4
+ Revision: 493853
- add makeinstall_std
- no parallel build at all
- no parallel build
- swig fixed
- 1.2.13
- P7, P8, P9, P10 added to fix termcap split and gcc48
- swigh as new BR

* Fri Sep 06 2013 dlucio <dlucio> 1:1.2.12-6.mga4
+ Revision: 475340
- fix filelist

* Thu Sep 05 2013 dlucio <dlucio> 1:1.2.12-5.mga4
+ Revision: 475229
- make vanilla-config
- fixe filelist

* Sat Aug 24 2013 dlucio <dlucio> 1:1.2.12-3.mga4
+ Revision: 470409
- autoload_config file moved to vanilla
- fixes from #10743

* Sat Aug 17 2013 dlucio <dlucio> 1:1.2.12-2.mga4
+ Revision: 467339
- P6 for gcc48 and skypopen
- P5 to allow memset to work in gcc48
- 1.2.12
- P4 to fix skypopen dkms build
- missing voicemail dir
- g729 conflicts fixed

* Thu Jul 25 2013 dlucio <dlucio> 1:1.2.11-1.mga4
+ Revision: 458071
-1.2.11
- new updates for sound packages
- fix a problem with mod_com_g729

* Sat Jun 08 2013 fwang <fwang> 1:1.2.8-3.mga4
+ Revision: 440496
- simplify br

* Wed May 29 2013 fwang <fwang> 1:1.2.8-2.mga4
+ Revision: 430390
- rebuild for new perl

* Mon Apr 08 2013 dlucio <dlucio> 1:1.2.8-1.mga3
+ Revision: 409131
- 1.2.8
- fix a DoS
- P0 merged upstream

* Sat Mar 30 2013 dlucio <dlucio> 1:1.2.3-22.mga3
+ Revision: 406797
- config no replace to autoload_configs

* Sun Mar 24 2013 colin <colin> 1:1.2.3-21.mga3
+ Revision: 404859
- Add systemd requires and general post/pre fixes (mga#9302)

* Fri Mar 08 2013 dlucio <dlucio> 1:1.2.3-20.mga3
+ Revision: 401746
- DKMS subpackage for Skypopen

* Fri Feb 15 2013 dlucio <dlucio> 1:1.2.3-19.mga3
+ Revision: 398609
- S12 & S13 to add basic nagios support

* Mon Feb 11 2013 dlucio <dlucio> 1:1.2.3-18.mga3
+ Revision: 397914
- new S2 to let us play with EXPERIMENTAL built-in HA

* Mon Feb 11 2013 dlucio <dlucio> 1:1.2.3-17.mga3
+ Revision: 397825
- file permitions into monit directory

* Sat Jan 19 2013 fwang <fwang> 1:1.2.3-16.mga3
+ Revision: 389690
- fix install
- disable Werror as mpg123 does not like it
- more linkage
- more fix
- more link fix
- fix linkage
- more format fix
- do not extract twice
- fix str fmt
- try building with system ldflags

* Fri Jan 18 2013 dlucio <dlucio> 1:1.2.3-15.mga3
+ Revision: 389430
- .so and .a into devel

* Thu Jan 17 2013 dlucio <dlucio> 1:1.2.3-14.mga3
+ Revision: 389049
- Lets use LUA 5.1

* Thu Jan 17 2013 dlucio <dlucio> 1:1.2.3-13.mga3
+ Revision: 388991
- Preparing for the ODBC support in MGA4, we wont ship FS 1.2.5.3 in MGA3 (ask me if you need that)
- S1 updated

  + colin <colin>
    - Tidy up tmpfiles a bit (fix perms to be same as was in spec)

* Mon Jan 14 2013 dlucio <dlucio> 1:1.2.3-11.mga3
+ Revision: 386870
- More SPEC cleanings and policy
- minor listfile fix that prevents tone_stream to be installed

* Fri Jan 11 2013 umeabot <umeabot> 1:1.2.3-10.mga3
+ Revision: 350939
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Fri Jan 11 2013 dlucio <dlucio> 1:1.2.3-9.mga3
+ Revision: 347827
- trying to fix #8245
- new spanish, french sounds

* Thu Jan 10 2013 dlucio <dlucio> 1:1.2.3-8.mga3
+ Revision: 344777
- fix filelist
- sed as BR
- P0 updated
- P0 to try to fix ac_config_headers
- Lets use automake 1.9 for now, until i figure out a way to change a macro
- bump release

* Tue Dec 11 2012 dlucio <dlucio> 1:1.2.3-7.mga3
+ Revision: 329826
- some more fixes on directory to let fusion project work

* Mon Dec 10 2012 dlucio <dlucio> 1:1.2.3-6.mga3
+ Revision: 329429
- perl modules are now in correct place
- log directory was creating twice in wrong place
- licence tipo
- new lib subpackage
- rundir points to /run
- too many cleanups
- mod_siren is not optional
- mod_spidermonkey is disabled

  + solbu <solbu>
    - Spec cleanup
    - Fix license tag

* Sat Dec 08 2012 dlucio <dlucio> 1:1.2.3-5.mga3
+ Revision: 328084
- Let us enable static, .so needs them
- file permition to let the fusionpbx work

* Fri Dec 07 2012 fwang <fwang> 1:1.2.3-4.mga3
+ Revision: 327734
- fix requires

* Wed Dec 05 2012 dlucio <dlucio> 1:1.2.3-3.mga3
+ Revision: 327058
- fix requires

* Wed Dec 05 2012 dlucio <dlucio> 1:1.2.3-2.mga3
+ Revision: 327043
- fix requires

* Wed Dec 05 2012 dlucio <dlucio> 1:1.2.3-1.mga3
+ Revision: 327027
- fix file list
- 1.2.3
- Developers say that this is more stable

* Thu Nov 29 2012 dlucio <dlucio> 1.2.5.1-1.mga3
+ Revision: 323073
- 1.2.5.1

* Thu Nov 29 2012 dlucio <dlucio> 1.2.5-3.mga3
+ Revision: 323063
- snmp enabled

* Thu Nov 29 2012 dlucio <dlucio> 1.2.5-2.mga3
+ Revision: 322846
- lzma as BR
- no pgsql for now
- Postgresql support
- Some file permitions tunnings

* Fri Nov 23 2012 dlucio <dlucio> 1.2.5-1.mga3
+ Revision: 321236
- 1.2.5
- New sounds subpackages

* Wed Nov 21 2012 dlucio <dlucio> 1.2.3-4.mga3
+ Revision: 320348
- systemd service compatible
- SPEC cleaning, we took out all non Mageia if conditions
- More macros instead hardcoded paths

* Wed Nov 21 2012 dlucio <dlucio> 1.2.3-3.mga3
+ Revision: 319952
- Fix some paths

* Tue Nov 20 2012 dlucio <dlucio> 1.2.3-2.mga3
+ Revision: 319850
- Some cleanup specs

* Mon Nov 19 2012 dlucio <dlucio> 1.2.3-1.mga3
+ Revision: 319641
- We exclude to pack .a files
- Missing subpackages for ES and PT languages
- More filelist fixes
- No .a in filelist
- we add ld macros
- net-snmp-devel as BR
- Perl-devel as BR
- More LDFLAGS tunes
- we disable static flags at configure
- SPEC fixes
- imported package freeswitch

  + fwang <fwang>
    - use configure2_5x