# $Id: smeserver-freepbx.spec,v 1.32 2018/01/29 21:31:58 jpp Exp $ # Authority: vip-ire # Name: Daniel Berteaud #%define fpbxversion 2.5.0 %define version 13 %define release 16 %define name smeserver-freepbx Summary: Asterisk web GUI Name: %{name} Version: %{version} Release: %{release}%{?dist} License: GPL Group: System/Servers Source: %{name}-%{version}.tar.gz Patch0: smeserver-freepbx-13.bz9702.udpports.patch Patch1: smeserver-freepbx-13.bz9744.patch Patch2: smeserver-freepbx-13.bz9702-2.patch Patch3: smeserver-freepbx-13.bz9760.patch Patch4: smeserver-freepbx-13.bz9918.defaultUDPports.patch Patch5: smeserver-freepbx-13.bz9860.AutoUpgradeModules.patch Patch6: smeserver-freepbx-13.bz9637.backupFBX.patch Patch7: smeserver-freepbx-13.bz10120.noiseAmportal.patch Patch8: smeserver-freepbx-13.bz10268.updatetktauth.patch Patch9: smeserver-freepbx-13.bz10496.missing-tampered-files.patch Patch10: smeserver-freepbx-13.bz10503.DeviceAndUser.patch BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot URL: http://www.freepbx.org/ BuildRequires: e-smith-devtools BuildRequires: tar Requires: mysql Requires: httpd Requires: php-pear Requires: /usr/sbin/asterisk Requires: asterisk-addons Requires: dahdi-tools Requires: dahdi-linux Requires: sox Requires: mod_auth_tkt Requires: e-smith-base Requires: freepbx-src Requires: asterisk-sounds-core-en-ulaw Requires: asterisk-sounds-extra-en-ulaw Requires: asterisk-voicemail Requires: asterisk-configs Requires: ffmpeg Requires: mpg123 Requires: mysql-connector-odbc Requires: unixODBC Requires: asterisk-odbc Requires: e-smith-manager >= 2.6.0-22 #Buildarch: noarch AutoReqProv: no %description FreePBX is a Standardised Implementation of Asterisk that gives you a GUI to manage your system. If you have looked into Asterisk, you would know that it does not come with any built in programming. You cannot plug a phone into it and make it work without editing configuration files, writing dialplans, and various messing about. FreePBX simplifies this by giving you a pre-written set of dialplans that allow you to have a fully functional PBX pretty much straight away. This package provide the integration of FreePBX on SME Server. %changelog * Mon Jan 20 2020 Jean-Philipe Pialasse %{version}-16.sme - add required modules to enable cel and cdr logging and search [SME: 10620] * Mon Jan 29 2018 Jean-Philipe Pialasse 13-15.sme - fix warning tampered files in GUI [SME: 10496] - remove DeviceAndUser property [SME: 10503] * Wed May 03 2017 Jean-Philipe Pialasse 13-14.sme - update TKT auth parameter for SME 9.2 [SME: 10268] * Sat Feb 25 2017 Jean-Philipe Pialasse 13-13.sme - fix noise rebooting and restarting freepbx [SME: 10120] * Wed Jan 25 2017 Jean-Philipe Pialasse 13-11.sme - NFR: auto backup of whole FBX config during pre-backup event [SME: 9637] - both asdb and fpbx, asterisk config files, freepbx folders, voicemails are part of backup - 2 versions are kepts - weekly backup is also done. * Mon Jan 23 2017 Jean-Philipe Pialasse 13-10.sme - fix Missing HTML5 format converters [SME: 9859] - added requirement for mpg123 and ffmpeg available in smecontribs * Mon Jan 23 2017 Jean-Philipe Pialasse 13-9.sme - update framework before other modules [SME: 9860] * Mon Jan 09 2017 Jean-Philipe Pialasse 13-8.sme - autoupgrade modules [SME: 9860] * Mon Jan 09 2017 Jean-Philipe Pialasse 13-7.sme - fix wrong default UDPPorts on new install [SME: 9918] * Mon Oct 24 2016 Jean-Philipe Pialasse 13-6.sme - fix error while backup with workstation [SME: 9760] * Mon Oct 24 2016 Jean-Philipe Pialasse 13-5.sme -fix typo in smeserver-freepbx-13.bz9744.patch * Sun Oct 23 2016 Jean-Philipe Pialasse 13-4.sme - fix [SME: 9702] - corrected syntax for port range * Sun Oct 23 2016 Jean-Philipe Pialasse 13-3.sme - fix [SME: 9744] - fix wrong /tmp folder permission after update - Thank you Hsing-Foo Wang. * Tue Jul 26 2016 Jean-Philipe Pialasse 13-2.sme - fix wrong UDP ports change 1000:2000 to 10000:20000 [SME: 9702] * Mon Jun 13 2016 Jean-Philipe Pialasse 13-1.sme - bump version to current Freepbx version 13 * Mon Jun 13 2016 Jean-Philipe Pialasse -47.sme - add all needed port for Freepbx sip pjsip and RTP [SME: 9495] * Sat Jun 11 2016 Jean-Philipe Pialasse -46.sme - fix missing config files (requires asterisk-configs) [SME: 9577] - fix recuring reconfiguration error while installing digium phone module [SME: 9575] - added port 5061 for tls to TCP ports [SME: 9576] * Thu Jun 09 2016 Jean-Philipe Pialasse -45.sme - fix wrong logrotate pattern [SME: 9516] - as the contrib is only in smedev, i do not fix existing log files badly rotated * Mon May 16 2016 Jean-Philipe Pialasse 0.1-44.sme - remove fop db [SME: 9495] - add some mysql setting for freepbxdb (user, email) - smeserver-freepbx-0.1-Sme9Ast13Fpbx13-7.patch * Sun May 15 2016 Jean-Philipe Pialasse 0.1-43.sme - add path to ucp module [SME: 9495] - add 256Mo as default for freepbx php Memory - add AllowOveride All for .htaccess - remove httpd config to old FOP panel - add port 5061 for freepbx - smeserver-freepbx-0.1-Sme9Ast13Fpbx13-5.patch - configuration of amportal.conf and its mysql equivalent - smeserver-freepbx-0.1-Sme9Ast13Fpbx13-6.patch * Sun May 15 2016 Jean-Philipe Pialasse 0.1-42.sme - remove FOP patches [SME: 9495] - deleted link to expand amportal.conf - smeserver-freepbx-0.1-Sme9Ast13Fpbx13-4.patch * Sun May 15 2016 Jean-Philipe Pialasse 0.1-41.sme - remove heading of /etc/asterisk/asterisk.conf [SME: 9495] - smeserver-freepbx-0.1-Sme9Ast13Fpbx13-3.patch - bump * Sun May 15 2016 Jean-Philipe Pialasse 0.1-38.sme - remove expand template amportal.conf [SME: 9495] - chown /var/lib/asterisk - installation configuration options - smeserver-freepbx-0.1-Sme9Ast13Fpbx13-2.patch - Requires: asterisk-sounds-core-en-ulaw asterisk-sounds-extra-en-ulaw asterisk-voicemail * Sun May 15 2016 Jean-Philipe Pialasse 0.1-37.sme - new path to sql files [SME: 9495] - smeserver-freepbx-0.1-Sme9Ast13Fpbx13-1.patch * Fri May 06 2016 Jean-Philipe Pialasse 0.1-36.sme - adapt script to fpbx13 and asterisk 13 [SME: 9495] - change Requires Requires: %{_libdir}/asterisk/modules/app_addon_sql_mysql.so to - Requires: asterisk-addons as this is the paquet providing it, and it changed name to app_mysql.so * Fri May 06 2016 Jean-Philipe Pialasse 0.1-35.sme - adapt script to fpbx13 and asterisk 13 [SME: 9495] - smeserver-freepbx-0.1-Sme9Ast13Fpbx13-0.patch * Fri May 06 2016 Jean-Philipe Pialasse 0.1-34.sme - first import to SME9 [SME: 9495] * Sun May 12 2013 JP Pialasse 0.1-33.sme - buildarch removed in order to find the correct %{_libdir}/asterisk/modules/app_addon_sql_mysql.so * Thu Oct 20 2011 Daniel B. 0.1-32.sme - Protect by locations (so other alias can be defined to protect with LL::NG for example) * Mon Oct 17 2011 Daniel B. 0.1-31.sme - Add misdn.log to logrotate * Thu Oct 13 2011 Daniel B. 0.1-30.sme - Change session path [SME: 6661] * Wed Jan 05 2011 Daniel B. 0.1-29.sme - astdatadir is /var/lib/asterisk - templates for /etc/logrotate.d/asterisk * Mon Sep 20 2010 Daniel B. 0.1-28.sme - Create and populate the mysql databases in mysql.init - Templates for /etc/asterisk/asterisk.conf * Thu Jul 15 2010 Daniel B. [0.1-27] - Read ARI password from the DB (and initialize a random one) * Mon Feb 22 2010 Daniel B. [0.1-26] - Remove hard-coded dependencies on asterisk and asterisk-addons14 Depends now on asterisk binary and app_addon_sql_mysql.so files (so it can work with asterisk or asterisk14) * Mon Feb 15 2010 Daniel B. [0.1-25] - Remove /etc/logrotate.d/asterisk which is now included in asterisk14 * Tue Feb 09 2010 Daniel B. [0.1-24] - Depends now on asterisk14 and asterisk-addons14 * Wed Jan 06 2010 Daniel B. [0.1-23] - disable dynamic hints * Tue Oct 06 2009 Daniel B. [0.1-22] - include /opt/freepbx/admin/functions.inc.php in freepbx-dump-astdb action script for FreePBX 2.6 compatibility * Tue May 19 2009 Daniel B. [0.1-21] - Add CHECKREFERER=FALSE in amportal.conf to repvent error message in some modules (due to the ProxyPass configuration) * Tue Apr 28 2009 Daniel B. [0.1-20] - Fix CDR db password in cdr_mysql.conf template - Use a separate service in SME db for FOP * Thu Apr 16 2009 Daniel B. [0.1-19] - remove scoreboard directive from httpd-fpbx config - remove some modules (mod_ssl, mod_proxy) * Sat Apr 11 2009 Daniel B. [0.1-18] - templatize cdr_mysql.conf [SME: 5153] - templatize manager.conf - remove freepbx-cron-scheduler.php from root crontab so only asterisk user runs it (prevent email error sent from cron) * Fri Mar 27 2009 Daniel B. [0.1-17] - Remove obsolete /admin Alias from apache - Run the security script on bootsrape-console-save event * Mon Mar 23 2009 Daniel B. [0.1-16] - Security Fixe: put a random password for ARI admin (this should be documented) * Thu Mar 19 2009 Daniel B. [0.1-15] - Check if /opt/freepbx/admin exists (retry the install if a first one failed) - Remove tabs from spec * Wed Mar 18 2009 Daniel B. [0.1-14] - Remove speex from dependencies * Thu Mar 12 2009 Daniel B. [0.1-13] - Remove zaptel dependency, replaced with dahdi-tools and dahdi-linux * Mon Feb 23 2009 Daniel B. [0.1-12] - Fix logrotate issue (send a sigusr1 signal to httpd-fpbx) * Thu Feb 12 2009 Daniel B. [0.1-11] - Full support for the new DAHDI driver, droping zaptel * Mon Feb 09 2009 Daniel B. [0.1-10] - add support for DAHDI channel * Mon Dec 08 2008 Daniel B. [0.1-9] - move expand-templates from post-upgrade event to bootstrap-console-save * Thu Nov 27 2008 Daniel B. [0.1-8] - Add support for trunk name in mail alerts * Wed Nov 26 2008 Daniel B. [0.1-7] - Add a simple script to alert admin by mail on trunk errors * Thu Nov 20 2008 Daniel B. [0.1-6] - Use AdminPanels props so access can be configured using smeserver-userpanels contrib. AdminUsers and FopUsers props aren't used anymore * Wed Nov 19 2008 Daniel B. [0.1-5] - add logrotate default config file for asterisk's logs - spec cleanup * Thu Nov 13 2008 Daniel B. [0.1-4] - fix logrotate issue * Wed Nov 05 2008 Daniel B. [0.1-3] - split freepbx sources in a separate package (freepbx-src) - alternative genzaptelconf * Mon Oct 13 2008 Daniel B. [0.1-2] - Fix fop not being displayed in admin page * Sat Sep 20 2008 Daniel B. [0.1-1] - updated to 2.5.0 final - spec cleaning - templates cleaning - templates to update mysql informations * Mon Aug 04 2008 daniel B. [0.1-0] - initial release %prep %setup -q -n %{name}-%{version} %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p1 %patch9 -p1 %patch10 -p1 # until rebuilt of a smeserver-freepbx tar file: rm -rf root/etc/e-smith/db/configuration/defaults/freepbx/DeviceAndUser %build # Build symlinks perl createlinks %install rm -rf $RPM_BUILD_ROOT %{__mkdir_p} $RPM_BUILD_ROOT/var/lib/php/fpbx-session (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ --file /usr/share/freepbx/scripts/uninstall.sh 'attr(0750,root,root)' \ --file /usr/share/freepbx/scripts/restore-astdb.php 'attr(0750,root,root)' \ --dir /var/service/httpd-fpbx 'attr(01755,root,root)' \ --dir /var/service/httpd-fpbx/supervise 'attr(0700,root,root)' \ --dir /var/service/httpd-fpbx/log 'attr(0755,root,root)' \ --file /var/service/httpd-fpbx/log/run 'attr(0755,root,root)' \ --dir /var/service/httpd-fpbx/log/supervise 'attr(0700,root,root)' \ --dir /var/log/httpd-fpbx 'attr(0750,smelog,smelog)' \ --file /var/lib/asterisk/bin/genzaptelconf 'attr(0750,root,root)' \ --file /var/lib/asterisk/agi-bin/trunk_alert_mail.agi 'attr(0750,asterisk,asterisk)' \ --file /etc/logrotate.d/asterisk 'config(noreplace)' \ --dir /var/lib/php/fpbx-session 'attr(0770,root,asterisk)' \ > %{name}-%{version}-%{release}-filelist %clean rm -rf $RPM_BUILD_ROOT %files -f %{name}-%{version}-%{release}-filelist %defattr(-,root,root) %post #bug 9744, restore tmp permissions if [ `stat -c %U /tmp` == "asterisk" ]; then chmod o+rwxt /tmp/ chown root:root /tmp/ fi %preun if [ $1 = 0 ] ; then /etc/rc.d/init.d/freepbx stop >& /dev/null || : fi true