File glances.spec of Package glances
#
# spec file for package glances
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2026 Boian Berberov
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: glances
Version: 4.4.1
Release: 0%{?dist}
Summary: Cross-platform monitoring tool
License: LGPL-3.0-only
URL: https://github.com/nicolargo/%{name}
Source0: %{url}/archive/refs/tags/v%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: %{python_module base >= 3.10}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
Requires: glances-common = %{version}
Requires: python-defusedxml
Requires: python-jinja2
Requires: python-packaging
Requires: python-psutil >= 5.3.0
Requires: python-shtab
Requires(post): update-alternatives
Requires(postun): update-alternatives
Recommends: python-requests
Provides: python-glances = %{version}
Obsoletes: python-glances < %{version}
Provides: glances
BuildArch: noarch
%if 0%{?is_opensuse}
%python_subpackages
%endif
%description
It allows real-time monitoring of various aspects of your system such as CPU, memory, disk, network usage etc. It also allows monitoring of running processes, logged in users, temperatures, voltages, fan speeds etc. It also supports container monitoring, it supports different container management systems such as Docker, LXC. The information is presented in an easy to read dashboard and can also be used for remote monitoring of systems via a web interface or command line interface.
%package -n glances-common
Summary: Service and firewalld files for glances
%description -n glances-common
It allows real-time monitoring of various aspects of your system such as CPU, memory, disk, network usage etc. It also allows monitoring of running processes, logged in users, temperatures, voltages, fan speeds etc. It also supports container monitoring, it supports different container management systems such as Docker, LXC. The information is presented in an easy to read dashboard and can also be used for remote monitoring of systems via a web interface or command line interface.
This packages contains the service file to start a glances server from systemd and a firewalld file to open the default port.
%prep
%setup -q
%__sed -i \
-e '/"AUTHORS",/d;' \
-e '/"COPYING",/d;' \
-e '/"NEWS.rst",/d;' \
-e '/"README.rst",/d;' \
-e '/"README-pypi.rst",/d;' \
-e '/"SECURITY.md",/d;' \
-e '/"CONTRIBUTING.md",/d;' \
pyproject.toml
%build
%pyproject_wheel
%install
%pyproject_install
# NOTE: Don't use %%{name} for filenames with %%python_clone
%python_clone -a %{buildroot}%{_bindir}/glances
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%__install -d %{buildroot}%{_defaultdocdir} %{buildroot}%{_defaultdocdir}
%__mv %{buildroot}%{_datadir}/doc/glances %{buildroot}%{_defaultdocdir}/glances-common
%post
# NOTE: Don't use %%{name} for filenames with %%python_install_alternative
%python_install_alternative glances
%postun
# NOTE: Don't use %%{name} for filenames with %%python_install_alternative
%python_uninstall_alternative glances
%files %{python_files}
%license COPYING
# NOTE: Don't use %%{name} for filenames with %%python_alternative
%python_alternative %{_bindir}/glances
%{python_sitelib}/glances
%{python_sitelib}/[Gg]lances-%{version}.dist-info
%files -n glances-common
%dir %{_defaultdocdir}/glances-common
%{_defaultdocdir}/glances-common/glances.conf
%{_mandir}/man1/glances.1%{?ext_man}
%changelog
* Thu Jan 15 2026 Boian Berberov
- Added changelog for openSUSE Leap 16