Blob Blame History Raw
%global desc %{expand: \
Glances is a cross-platform monitoring tool which aims to present a large
amount of monitoring information through a curses or Web based interface.
The information dynamically adapts depending on the size of the user interface

It can also work in client/server mode. Remote monitoring could be done via
terminal, Web interface or API (XML-RPC and RESTful). Stats can also be
exported to files or external time/value databases.

Glances is written in Python and uses libraries to grab information from your
system. It is based on an open architecture where developers can add new 
plugins or exports modules.}

Name:		glances	
Version:	3.2.7
Release:	%autorelease
Summary:	A cross-platform curses-based monitoring tool

License:	GPLv3
Source1:	%{name}.service

Patch1:		disable-update-check.patch

BuildArch:	noarch

BuildRequires:	python3-devel
BuildRequires:	python3-dateutil
BuildRequires:	pyproject-rpm-macros
BuildRequires:	systemd-units
Requires:	python3-bottle


%autosetup -p1 -n %{name}-%{version}

# update disabled, no need for packaging dep
sed -i "s/, 'packaging'//"
sed -i '/packaging/d' requirements.txt

%pyproject_buildrequires -t


%pyproject_save_files glances

mkdir -p %{buildroot}%{_unitdir}
install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
install -D -p -m 644 conf/glances.conf $RPM_BUILD_ROOT/etc/glances/glances.conf


%systemd_post %{name}.service

%systemd_preun %{name}.service

%systemd_postun %{name}.service

%files -n glances -f %{pyproject_files}
%config(noreplace) %{_sysconfdir}/glances/glances.conf
%exclude %{_datadir}/doc/glances