Toshaan Bharvani
6 months ago
commit
7c7a1b1728
2 changed files with 84 additions and 0 deletions
@ -0,0 +1,84 @@
@@ -0,0 +1,84 @@
|
||||
%global module_name reporting |
||||
%global icingaweb_min_version 2.6.0 |
||||
%global basedir %{_datadir}/icingaweb2/modules/%{module_name} |
||||
%global service_name icinga-%{module_name} |
||||
%global service_user apache |
||||
|
||||
Name: icingaweb2-module-%{module_name} |
||||
Version: 1.0.1 |
||||
Release: 1%{?dist} |
||||
Summary: Reporting - Icinga Web 2 module |
||||
Group: Applications/System |
||||
License: GPLv2+ |
||||
URL: https://icinga.com |
||||
Source0: https://github.com/Icinga/icingaweb2-module-%{module_name}/archive/v%{version}.tar.gz |
||||
Source1: %{service_name}.service |
||||
BuildArch: noarch |
||||
BuildRequires: systemd-devel |
||||
Requires: systemd |
||||
Requires: icingaweb2 >= %{icingaweb_min_version} |
||||
Requires: php-Icinga >= %{icingaweb_min_version} |
||||
Requires: icingaweb2-module-reactbundle >= 0.4 |
||||
Requires: icingaweb2-module-ipl >= 0.2.1 |
||||
Requires: icingaweb2-module-pdfexport >= 0.9 |
||||
|
||||
|
||||
%description |
||||
Icinga Reporting is the central component for reporting related functionality |
||||
in the monitoring web frontend and framework Icinga Web 2. The engine allows |
||||
you to create reports over a specified time period for ad-hoc and scheduled |
||||
generation of reports. Other modules use the provided functionality in order |
||||
to provide concrete reports. |
||||
If you are looking for SLA reports for your hosts and services, please also |
||||
install the idoreports module. |
||||
|
||||
|
||||
%prep |
||||
%setup -q |
||||
|
||||
|
||||
%build |
||||
|
||||
|
||||
%install |
||||
rm -rf %{buildroot} |
||||
mkdir -p %{buildroot}%{basedir} |
||||
cp -r * %{buildroot}%{basedir} |
||||
install -d %{buildroot}%{_unitdir} |
||||
install -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{service_name}.service |
||||
# Replace user in service unit |
||||
sed -i -e 's~^User=.*~User=%{service_user}~' %{buildroot}%{_unitdir}/%{service_name}.service |
||||
|
||||
|
||||
%clean |
||||
rm -rf %{buildroot} |
||||
|
||||
|
||||
|
||||
%post |
||||
%systemd_post %{service_name}.service |
||||
|
||||
|
||||
%preun |
||||
%systemd_preun %{service_name}.service |
||||
if [ $1 == 0 ]; then |
||||
echo "Disabling icingaweb2 module '%{module_name}'" |
||||
rm -f /etc/icingaweb2/enabledModules/%{module_name} |
||||
fi |
||||
exit 0 |
||||
|
||||
|
||||
%postun |
||||
set -e |
||||
%systemd_postun_with_restart %{service_name}.service |
||||
exit 0 |
||||
|
||||
|
||||
%files |
||||
%doc README.md LICENSE |
||||
%defattr(-,root,root) |
||||
%{basedir} |
||||
%{_unitdir}/%{service_name}.service |
||||
|
||||
|
||||
%changelog |
Loading…
Reference in new issue