commit 3184ece45733e11c7ae57c94510e2049bfeb5a76 Author: Toshaan Bharvani Date: Wed Aug 14 11:53:17 2024 +0200 initial package creation Signed-off-by: Toshaan Bharvani diff --git a/SOURCES/.gitkeeper b/SOURCES/.gitkeeper new file mode 100644 index 0000000..e69de29 diff --git a/SPECS/icinga-kubernetes-web.spec b/SPECS/icinga-kubernetes-web.spec new file mode 100644 index 0000000..244fbf8 --- /dev/null +++ b/SPECS/icinga-kubernetes-web.spec @@ -0,0 +1,64 @@ +%global module_name kubernetes +%global basedir %{_datadir}/icingaweb2/modules/kubernetes +%global docdir %{_datadir}/doc/icingakubernetes + +Name: icinga-kubernetes-web +Version: 0.1.0 +Release: 1%{?dist} +Summary: Icinga Kubernetes Web +Group: Applications/System +License: AGPLv3 +URL: https://icinga.com +#Source0: https://github.com/Icinga/icinga-notifications-web/archive/v%{version}.tar.gz +BuildArch: noarch +Requires: icingaweb2 >= 2.9 +Requires: icinga-kubernetes +Requires: icinga-php-library >= 0.13.0 +Requires: icinga-php-thirdparty >= 0.120 + + +%description +Icinga for Kubernetes is a set of components for monitoring and visualizing Kubernetes resources. +This package installs Icinga for Kubernetes Web, which visualizes Kubernetes resources and their status +that are synchronized to a database by the Icinga for Kubernetes daemon. + + +%prep +%setup -q -T -c %{name}-%{version} +git clone https://github.com/Icinga/icinga-kubernetes-web . +git checkout v%{version} + + +%install +mkdir -vp %{buildroot}%{basedir} +mkdir -vp %{buildroot}%{docdir} +cp -vr application %{buildroot}%{basedir} +cp -vr library %{buildroot}%{basedir} +cp -vr public %{buildroot}%{basedir} +cp -vr configuration.php %{buildroot}%{basedir} +cp -vr module.info %{buildroot}%{basedir} + + +%clean +rm -rf %{buildroot} + + +%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 LICENSE +%defattr(-,root,root) +%{basedir} +%{docdir} + + +%changelog