2006-12-29 09:42:35 +01:00
#
2008-09-22 19:33:31 +02:00
# Pandora FMS Console
2006-12-29 09:42:35 +01:00
#
2009-08-19 04:34:06 +02:00
%define name pandorafms_console
2023-03-27 09:41:48 +02:00
%define version 7.0NG.770
2023-04-13 01:01:23 +02:00
%define release 230413
2006-12-29 09:42:35 +01:00
%define httpd_name httpd
# User and Group under which Apache is running
2009-08-19 04:34:06 +02:00
%define httpd_name apache2
%define httpd_user wwwrun
%define httpd_group www
2006-12-29 09:42:35 +01:00
# Evaluate PHP version
%define phpver_lt_430 %(out=`rpm -q --queryformat='%{VERSION}' php` 2>&1 >/dev/null || out=0 ; out=`echo $out | tr . : | sed s/://g` ; if [ $out -lt 430 ] ; then out=1 ; else out=0; fi ; echo $out)
2009-08-11 19:14:21 +02:00
Summary: Pandora FMS Console
2006-12-29 09:42:35 +01:00
Name: %{name}
Version: %{version}
2009-11-10 01:55:12 +01:00
Release: %{release}
2006-12-29 09:42:35 +01:00
License: GPL
2009-08-11 19:14:21 +02:00
Vendor: Artica ST <info@artica.es>
2006-12-29 09:42:35 +01:00
Source0: %{name}-%{version}.tar.gz
2011-08-22 02:44:00 +02:00
URL: http://www.pandorafms.org
Group: System/Monitoring
Packager: Sancho Lerena <slerena@artica.es>
2009-12-24 11:55:36 +01:00
Prefix: /srv/www/htdocs
2007-01-04 11:42:10 +01:00
BuildRoot: %{_tmppath}/%{name}
2011-08-22 02:44:00 +02:00
BuildArch: noarch
2006-12-29 09:42:35 +01:00
AutoReq: 0
2018-12-03 17:02:09 +01:00
Requires: apache2
2018-12-17 17:20:33 +01:00
Requires: apache2-mod_php7
2023-02-01 17:06:12 +01:00
Requires: php >= 8.0
2018-10-29 16:11:29 +01:00
Requires: php-gd, php-snmp, php-json, php-gettext
Requires: php-mysqlnd, php-ldap, php-mbstring, php
2010-09-26 19:19:51 +02:00
Requires: graphviz, xorg-x11-fonts-core, graphviz-gd
2018-10-29 16:11:29 +01:00
Requires: php-zip, php-zlib, php-curl
2006-12-29 09:42:35 +01:00
Provides: %{name}-%{version}
%description
2010-12-17 10:58:21 +01:00
Pandora FMS Console is a web application to manage Pandora FMS. Console allows to see graphical reports, state of every agent, also to access to the information sent by the agent, to see every monitored parameter and to see its evolution throughout the time, to form the different nodes, groups and users of the system. It is the part that interacts with the final user, and that will allows you to administer the system.
2006-12-29 09:42:35 +01:00
%prep
rm -rf $RPM_BUILD_ROOT
%setup -q -n pandora_console
%build
%install
rm -rf $RPM_BUILD_ROOT
2007-02-02 11:48:47 +01:00
mkdir -p $RPM_BUILD_ROOT%{prefix}/pandora_console
2020-05-19 16:27:17 +02:00
cp -aRf . $RPM_BUILD_ROOT%{prefix}/pandora_console
2009-06-25 20:55:16 +02:00
if [ -f $RPM_BUILD_ROOT%{prefix}/pandora_console/pandora_console.spec ] ; then
rm $RPM_BUILD_ROOT%{prefix}/pandora_console/pandora_console.spec
2006-12-29 09:42:35 +01:00
fi
%clean
rm -rf $RPM_BUILD_ROOT
2009-06-25 20:55:16 +02:00
2009-08-19 04:34:06 +02:00
%post
2021-06-14 13:56:42 +02:00
2019-11-05 12:01:58 +01:00
# Install pandora_websocket_engine service.
cp -pf %{prefix}/pandora_console/pandora_websocket_engine /etc/init.d/
2019-11-08 09:49:09 +01:00
chmod +x /etc/init.d/pandora_websocket_engine
2019-11-05 12:01:58 +01:00
echo "You can now start the Pandora FMS Websocket service by executing"
echo " /etc/init.d/pandora_websocket_engine start"
2009-06-25 20:55:16 +02:00
# Has an install already been done, if so we only want to update the files
# push install.php aside so that the console works immediately using existing
# configuration.
#
if [ -f %{prefix}/pandora_console/include/config.php ] ; then
mv %{prefix}/pandora_console/install.php %{prefix}/pandora_console/install.done
2023-02-01 16:26:03 +01:00
# Upgrading MR.
echo "Updating the database schema."
/usr/bin/php %{prefix}/pandora_console/godmode/um_client/updateMR.php 2>/dev/null
2009-06-25 20:55:16 +02:00
else
2009-08-11 19:14:21 +02:00
echo "Please, now, point your browser to http://your_IP_address/pandora_console/install.php and follow all the steps described on it."
2009-06-25 20:55:16 +02:00
fi
2015-11-16 17:29:58 +01:00
cp -aRf %{prefix}/pandora_console/pandora_console_logrotate_suse /etc/logrotate.d/pandora_console
2009-09-30 01:56:20 +02:00
%preun
2010-06-04 11:41:15 +02:00
# Upgrading
2021-06-14 13:56:42 +02:00
if [ "$1" -eq "1" ]; then
2010-06-04 11:41:15 +02:00
exit 0
fi
2009-09-30 01:56:20 +02:00
rm -Rf %{prefix}/pandora_console
2015-11-02 16:52:30 +01:00
%postun
# Upgrading
if [ "$1" = "1" ]; then
exit 0
fi
rm -Rf /etc/logrotate.d/pandora_console
2006-12-29 09:42:35 +01:00
%files
%defattr(0644,%{httpd_user},%{httpd_group},0755)
2007-02-02 11:48:47 +01:00
%docdir %{prefix}/pandora_console/docs
%{prefix}/pandora_console