%global __requires_exclude pear\\( %define svn 3773 %define frelease 3.2.0 Summary: Class 5 Freeswitch WEB Frontend Name: fusionpbx Version: %{frelease} Release: %mkrel 11 License: MPLv1.1 Group: System/Servers URL: http://fusionpbx.com/ Source0: fusionpbx-%{frelease}.tar.gz Source1: fusionpbx-odbc.ini Source2: fusionpbx-cidlookup.conf.xml Requires: apache-mod_php Requires: apache-mod_ssl Requires: php-pdo_odbc Requires: php-odbc Requires: php-pdo_sqlite Requires: freeswitch-application-callcenter Requires: freeswitch-endpoint-rtmp Requires: freeswitch-endpoint-dingaling Requires: freeswitch-application-lcr Requires: freeswitch-application-blacklist Requires: freeswitch-application-cidlookup Requires: freeswitch-asrtts-pocketsphinx Requires: freeswitch-application-voicemail-ivr Requires: freeswitch-event-snmp Requires: freeswitch-asrtts-tts-commandline Requires: freeswitch-asrtts-flite Requires: freeswitch-sounds-moh Requires: freeswitch-sounds-en Recommends: freeswitch-sounds-es Recommends: freeswitch-sounds-fr Recommends: freeswitch-sounds-ru Recommends: freeswitch-format-mod-shout Requires: php-sockets Requires: php-memcache BuildArch: noarch %description FusionPBX is an open source FreeSWITCH GUI. FusionPBX can be used as a high available single or domain based multi-tenant PBX, carrier grade switch, call center server, fax server, voip server, voicemail server, conference server, voice application server, appliance framework and more. FreeSWITCHtm is a highly scalable, multi-threaded, multi-platform communication platform. FusionPBX license is the MPL 1.1 license. It can be run on most operating systems on the hardware of your choice. It provides unlimited extensions, voicemail-to-email, music on hold, call parking, call center, call queues, analog lines or high density T1/E1 circuits and many other features. It provides the functionality your business needs and brings corporate level phone system features to small, medium and large businesses. %package mysql Summary: FusionPBX mysql support Group: System/Servers Requires: %{name} >= %{version} Requires: php-pdo_mysql %description mysql MySQL/MariaDB addon package. %package pgsql Summary: FusionPBX psgsql support Group: System/Servers Requires: %{name} >= %{version} Requires: php-pdo_pgsql Requires: psqlodbc %description pgsql PostgreSQL addon package. %package sqlite Summary: FusionPBX sqlite support Group: System/Servers Requires: %{name} >= %{version} Requires: php-pdo_sqlite %description sqlite Sqlite addon package. %prep %setup -q -n %{name} %build %install %{__install} -d -m 755 %{buildroot}%{_datadir}/%{name} #{__install} -d -m 755 %{buildroot}%{_sysconfdir}/%{name} %{__install} -D -p -m 0644 %{SOURCE1} %{buildroot}/etc/freeswitch/odbc.ini %{__install} -D -p -m 0644 %{SOURCE2} %{buildroot}/%{_datadir}/%{name}/cidlookup.conf.xml cp -aRf * %{buildroot}%{_datadir}/%{name} #pushd %{buildroot}%{_datadir}/%{name}/%{name} #ln -fs config.php ../../../%{_sysconfdir}/%{name} #popd install -d -m 755 %{buildroot}%{_webappconfdir} cat > %{buildroot}%{_webappconfdir}/%{name}.conf << EOF Alias /%{name} %{_datadir}/%{name}/%{name} <Directory %{_datadir}/%{name}/%{name}> %if %{mgaversion} < 3 Order deny,allow Deny from all Allow from 127.0.0.1 %endif %if %{mgaversion} >= 3 Require local granted %endif ErrorDocument 403 "Access denied per %{_webappconfdir}/%{name}.conf" php_flag session.auto_start 0 </Directory> <Location "/%{name}"> Options +FollowSymLinks RewriteEngine On RewriteCond %{SERVER_PORT} ^80$ RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L] </Location> EOF # new Icons #install -d %{buildroot}%{_iconsdir} #install -d %{buildroot}%{_miconsdir} #install -d %{buildroot}%{_liconsdir} #install -m0644 %{SOURCE1} %{buildroot}%{_miconsdir}/%{name}.png #install -m0644 %{SOURCE2} %{buildroot}%{_iconsdir}/%{name}.png #install -m0644 %{SOURCE3} %{buildroot}%{_liconsdir}/%{name}.png # install menu entry. # XDG menu #install -d %{buildroot}%{_datadir}/applications #cat > %{buildroot}%{_datadir}/applications/%{name}.desktop << EOF #[Desktop Entry] #Name=phpMyAdmin #Comment=%{summary} #Exec=%{_bindir}/www-browser https://localhost/%{name}/ #Icon=%{name} #Terminal=false #Type=Application #Categories=X-MandrivaLinux-MoreApplications-Databases; #EOF # fix borked permissions find %{buildroot}%{_datadir}/%{name} -type d -exec chmod 755 {} \; find %{buildroot}%{_datadir}/%{name} -type f -exec chmod 644 {} \; %pre pgsql if [ -f /etc/freeswitch/autoload_configs/cidlookup.conf.xml ] then echo Let us do a backup of /etc/freeswitch/conf/autoload_configs/cidlookup.conf.xml mv /etc/freeswitch/autoload_configs/cidlookup.conf.xml /etc/freeswitch/autoload_configs/cidlookup.conf.xml.bak.fusion fi if [ -f /etc/freeswitch/autoload_configs/switch.conf.xml ] then echo Let us do a backup of /etc/freeswitch/autoload_configs/switch.conf.xml mv /etc/freeswitch/autoload_configs/switch.conf.xml /etc/freeswitch/autoload_configs/switch.conf.xml.bak.fusion fi if [ -f /etc/freeswitch/sip_profiles/internal.xml ] then echo Let us do a backup of /etc/freeswitch/sip_profiles/internal.xml mv /etc/freeswitch/sip_profiles/internal.xml /etc/freeswitch/sip_profiles/internal.xml.bak.fusion fi if [ -f /etc/freeswitch/sip_profiles/external.xml ] then echo Let us do a backup of /etc/freeswitch/sip_profiles/external.xml mv /etc/freeswitch/sip_profiles/internal.xml /etc/freeswitch/sip_profiles/external.xml.bak.fusion fi if [ -f /etc/freeswitch/autoload_configs/voicemail.conf.xml ] then echo Let us do a backup of /etc/freeswitch/autoload_configs/voicemail.conf.xml mv /etc/freeswitch/autoload_configs/voicemail.conf.xml /etc/freeswitch/autoload_configs/voicemail.conf.xml.bak.fusion fi %post pgsql cp -f /usr/share/fusionpbx/cidlookup.conf.xml /etc/freeswitch/autoload_configs/ cp -f /usr/share/fusionpbx/fusionpbx/includes/templates/conf/sip_profiles/internal.xml /etc/freeswitch/sip_profiles/ cp -f /usr/share/fusionpbx/fusionpbx/includes/templates/conf/sip_profiles/external.xml /etc/freeswitch/sip_profiles/ /bin/sed -i -e s,'<!-- <param name="core-db-dsn" value="dsn:username:password" /> -->','<param name="core-db-dsn" value="freeswitch:freeswitch:" />', /etc/freeswitch/autoload_configs/switch.conf.xml /bin/sed -i -e s,'</settings>','<param name="odbc-dsn" value="freeswitch:freeswitch:"/></settings>', /etc/freeswitch/sip_profiles/internal.xml /bin/sed -i -e s,'</settings>','<param name="odbc-dsn" value="freeswitch:freeswitch:"/></settings>', /etc/freeswitch/sip_profiles/external.xml /bin/sed -i -e s,'<!--<param name="odbc-dsn" value="dsn:user:pass"/>-->','<param name="odbc-dsn" value="freeswitch:freeswitch:"/>', /etc/freeswitch/autoload_configs/voicemail.conf.xml %preun pgsql rm -f /etc/freeswitch/conf/autoload_configs/cidlookup.conf.xml %postun pgsql mv /etc/freeswitch/conf/autoload_configs/cidlookup.conf.xml.bak /etc/freeswitch/conf/autoload_configs/cidlookup.conf.xml %pre usermod -a -G daemon apache find /etc/freeswitch -type d -exec chmod 2755 {} \; find /etc/freeswitch -type f -exec chmod 640 {} \; find /etc/freeswitch -exec chmod daemon 640 {} \; %post chown -Rf apache /usr/share/fusionpbx/fusionpbx/includes %files %config(noreplace) %{webappconfdir}/%{name}.conf #dir %{_sysconfdir}/%{name} #attr(-,root,apache) %config(noreplace) %{_sysconfdir}/%{name}/config.php %{_datadir}/%{name} #{_iconsdir}/%{name}.png #{_miconsdir}/%{name}.png #{_liconsdir}/%{name}.png #{_datadir}/applications/*.desktop %files mysql %files pgsql %config(noreplace) %{_sysconfdir}/freeswitch/odbc.ini %files sqlite %changelog * Wed Jan 28 2015 daviddavid <daviddavid> 3.2.0-11.mga5 + Revision: 812595 - recommends freeswitch-format-mod-shout instead of Requires * as it has been moved into tainted repo it can no more be a required package * Wed Oct 15 2014 umeabot <umeabot> 3.2.0-10.mga5 + Revision: 744922 - Second Mageia 5 Mass Rebuild * Tue Sep 16 2014 umeabot <umeabot> 3.2.0-9.mga5 + Revision: 679385 - Mageia 5 Mass Rebuild + tv <tv> - use %%global for req/prov exclude - autoconvert to new prov/req excludes - s/uggests:/Recommends:/ * Sat Oct 19 2013 umeabot <umeabot> 3.2.0-8.mga4 + Revision: 522571 - Mageia 4 Mass Rebuild * Tue Mar 19 2013 dlucio <dlucio> 3.2.0-7.mga3 + Revision: 404059 - New requires for VM app * Tue Feb 19 2013 dlucio <dlucio> 3.2.0-6.mga3 + Revision: 399474 - User permitions to let installation work - we verify and do backup before overwrite * Thu Jan 24 2013 dlucio <dlucio> 3.2.0-5.mga3 + Revision: 391794 - post if conditions - post file permitions - https back - path fixed * Thu Jan 24 2013 dlucio <dlucio> 3.2.0-3.mga3 + Revision: 391787 - No https for now * Mon Jan 21 2013 dlucio <dlucio> 3.2.0-2.mga3 + Revision: 390651 - post path fixes * Mon Jan 21 2013 dlucio <dlucio> 3.2.0-1.mga3 + Revision: 390637 - build requires fixes - File location fixes - imported package fusionpbx