From 6e6b4d7419ff28dc93d6878a9a48a1af5e8988f0 Mon Sep 17 00:00:00 2001 From: Toshaan Bharvani Date: Thu, 30 May 2024 11:48:56 +0200 Subject: [PATCH] initial package creation Signed-off-by: Toshaan Bharvani --- SOURCES/.gitkeeper | 0 SPECS/icingaweb2-module-graphite.spec | 54 +++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 SOURCES/.gitkeeper create mode 100644 SPECS/icingaweb2-module-graphite.spec diff --git a/SOURCES/.gitkeeper b/SOURCES/.gitkeeper new file mode 100644 index 0000000..e69de29 diff --git a/SPECS/icingaweb2-module-graphite.spec b/SPECS/icingaweb2-module-graphite.spec new file mode 100644 index 0000000..2643c34 --- /dev/null +++ b/SPECS/icingaweb2-module-graphite.spec @@ -0,0 +1,54 @@ +%global module_name graphite +%global icingaweb_min_version 2.9.0 +%global basedir %{_datadir}/icingaweb2/modules/%{module_name} + +Name: icingaweb2-module-%{module_name} +Version: 1.2.4 +Release: 1%{?dist} +Summary: Audit - 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 +BuildArch: noarch +Requires: icingaweb2 >= %{icingaweb_min_version} +Requires: php-Icinga >= %{icingaweb_min_version} + + +%description +Graphite module for Icinga Web 2. + + +%prep +%setup -q + + +%build + + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}%{basedir} +cp -r * %{buildroot}%{basedir} + + +%clean +rm -rf %{buildroot} + + +%preun +set -e +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