You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
75 lines
1.7 KiB
75 lines
1.7 KiB
%global module_name reactbundle |
|
%global icingaweb_min_version 2.6.0 |
|
%global basedir %{_datadir}/icingaweb2/modules/%{module_name} |
|
|
|
Name: icingaweb2-module-%{module_name} |
|
Version: 0.6.0 |
|
Release: 1%{?dist} |
|
Summary: Icinga PHP library module for Icinga Web 2 |
|
Group: Applications/System |
|
License: GPLv2+ |
|
URL: https://icinga.com |
|
Source0: https://github.com/Icinga/icingaweb2-module-%{module_name}/archive/v%{version}.tar.gz |
|
#/icingaweb2-module-%{module_name}-%{version}.tar.gz |
|
BuildArch: noarch |
|
Requires: icingaweb2 >= %{icingaweb_min_version} |
|
Requires: icingacli >= %{icingaweb_min_version} |
|
Requires: php-Icinga >= %{icingaweb_min_version} |
|
Requires: php-cli |
|
Requires: php-process |
|
Requires: php-pcntl |
|
Requires: php-soap |
|
|
|
|
|
%description |
|
This module provides React as a third-party library for other Icinga Web |
|
modules. |
|
|
|
|
|
%prep |
|
%setup -q |
|
|
|
|
|
%build |
|
|
|
|
|
%install |
|
rm -rf %{buildroot} |
|
mkdir -p %{buildroot}%{basedir} |
|
cp -r * %{buildroot}%{basedir} |
|
|
|
|
|
%clean |
|
rm -rf %{buildroot} |
|
|
|
|
|
%post |
|
set -e |
|
# Only for fresh installations |
|
if [ $1 == 1 ]; then |
|
if [ ! -d /etc/icingaweb2/enabledModules ]; then |
|
mkdir /etc/icingaweb2/enabledModules |
|
chmod g=rwx,o= /etc/icingaweb2/enabledModules |
|
fi |
|
echo "Enabling icingaweb2 module '%{module_name}'" |
|
ln -svf /usr/share/icingaweb2/modules/%{module_name} /etc/icingaweb2/enabledModules/%{module_name} |
|
fi |
|
exit 0 |
|
%preun |
|
set -e |
|
# Only for removal |
|
if [ $1 == 0 ]; then |
|
echo "Disabling icingaweb2 module '%{module_name}'" |
|
rm -f /etc/icingaweb2/enabledModules/%{module_name} |
|
fi |
|
exit 0 |
|
|
|
|
|
%files |
|
%doc README.md |
|
#LICENSE |
|
%defattr(-,root,root) |
|
%{basedir} |
|
|
|
|
|
%changelog
|
|
|