Search
j0ke.net Open Build Service
>
Projects
>
server:telephony
>
freePBX
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 9
[-]
[+]
Changed
freepbx.spec
@@ -25,6 +25,15 @@ Requires: mysql php5-cli php5-pear ruby bash coreutils sed Provides: perl(retrieve_parse_amportal_conf.pl) +%if 0%{?suse_version} +%define _srvroot /srv/www +%else +%define _srvroot /var/www +%endif + +%define _cgidir %{_srvroot}/cgi-bin +%define _docroot %{_srvroot}/htdocs + %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. @@ -66,14 +75,11 @@ /usr/bin/mysql --user=root --password=passw0rd asterisk < /usr/src/%{name}-%{version}/SQL/newinstall.sql cp /usr/src/%{name}-%{version}/amportal.conf %{_sysconfdir} - %if 0%{?suse_version} - #AMPWEBROOT=/var/www/html - #AMPCGIBIN=/var/www/cgi-bin - #FOPWEBROOT=/var/www/html/panel - sed -i s@AMPWEBROOT=/var/www/html@AMPWEBROOT=/srv/www/htdocs@g %{_sysconfdir}/amportal.conf - sed -i s@AMPCGIBIN=/var/www/cgi-bin@AMPCGIBIN=/srv/www/cgi-bin@g %{_sysconfdir}/amportal.conf - sed -i s@FOPWEBROOT=/var/www/html/panel@FOPWEBROOT=/srv/www/htdocs/panel@g %{_sysconfdir}/amportal.conf - %endif + + sed -i s@AMPWEBROOT=/var/www/html@AMPWEBROOT=%{_docroot}@g %{_sysconfdir}/amportal.conf + sed -i s@AMPCGIBIN=/var/www/cgi-bin@AMPCGIBIN=%{_cgidir}@g %{_sysconfdir}/amportal.conf + sed -i s@FOPWEBROOT=/var/www/html/panel@FOPWEBROOT=i%{_docroot}/panel@g %{_sysconfdir}/amportal.conf + echo " *** Installing FreePBX.org app" cd /usr/src/%{name}-%{version} echo a | ./install_amp @@ -86,8 +92,8 @@ echo a | ./install_amp fi -touch /var/www/html/panel/op_buttons_additional.cfg -touch /var/www/html/panel/op_buttons_custom.cfg +touch %{_docroot}/panel/op_buttons_additional.cfg +touch %{_docroot}/panel/op_buttons_custom.cfg touch /var/log/asterisk/cdr-csv/Master.csv chmod 777 /var/log/asterisk/cdr-csv/Master.csv