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.4.0
Release:	%autorelease
Summary:	A cross-platform system monitoring tool

License:	LGPL-3.0-only AND MIT
Source1:	%{name}.service

Patch1:		disable-update-check.patch

BuildArch:	noarch

BuildRequires:	python3-devel
BuildRequires:	python3-dateutil
BuildRequires:	systemd-units
Requires:	python3-bottle


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

# disable PyPI update check + no need to have packaging dep
sed -i -e 's/check_update=true/check_update=false/' conf/glances.conf
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_with_restart %{name}.service

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