## START: Set by rpmautospec
## (rpmautospec version 0.7.3)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 2;
    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
    print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec

%global debug_package %{nil}

Name:		stats-collect
Version:	1.0.45
Release:	%autorelease
Summary:	A tool for collecting and visualising system statistics and telemetry

License:	BSD-3-Clause
Url:		https://github.com/intel/stats-collect
Source0:	%url/archive/v%{version}/%{name}-%{version}.tar.gz

BuildArch:	noarch
ExclusiveArch:	%{ix86} x86_64 noarch

BuildRequires:	python3-devel
BuildRequires:	python3-pytest
BuildRequires:	web-assets-devel
Provides:	bundled(lit) = 2.2.8
Requires:	web-assets-filesystem

%description
The Statistics Collection Tool project provides the 'stats-collect'
command-line tool. This tool collects system statistics and telemetry,
and visualizes them. It’s for debugging and tracing purposes only.

%prep
%autosetup

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files statscollectlibs statscollecttools

%check
STATS_COLLECT_WEB_ASSETS_PATH=%{buildroot}%{_jsdir}/%{name} STATS_COLLECT_DATA_PATH=%{buildroot}%{_datadir}/%{name} %pytest -v

%files -n %{name} -f %{pyproject_files}
%license js/dist/main.js.LICENSE.txt
%doc CHANGELOG.md CODE_OF_CONDUCT.md README.md security.md
%{_bindir}/ipmi-helper
%{_bindir}/proc-interrupts-helper
%{_bindir}/stats-collect
%{_bindir}/stc-agent
%{_datadir}/%{name}
%{_jsdir}/%{name}
%{_mandir}/man1/*

%changelog
## START: Generated by rpmautospec
* Sat Feb 15 2025 Ali Erdinc Koroglu <aekoroglu@linux.intel.com> - 1.0.45-2
- proc-interrupts-helper fix

* Sat Feb 15 2025 Ali Erdinc Koroglu <aekoroglu@linux.intel.com> - 1.0.45-1
- Update to 1.0.45 (rhbz#2319181)

* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.30-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild

* Fri Sep 20 2024 Ali Erdinc Koroglu <aekoroglu@linux.intel.com> - 1.0.30-2
- Update to 1.0.30

* Fri Sep 20 2024 Ali Erdinc Koroglu <aekoroglu@linux.intel.com> - 1.0.30-1
- Update to 1.0.30

* Fri Aug 02 2024 Ali Erdinc Koroglu <aekoroglu@linux.intel.com> - 1.0.27-1
- Update to 1.0.27

* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.25-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild

* Tue Jun 18 2024 Python Maint <python-maint@redhat.com> - 1.0.25-2
- Rebuilt for Python 3.13

* Thu Jun 06 2024 Ali Erdinc Koroglu <aekoroglu@linux.intel.com> - 1.0.25-1
- update to 1.0.25

* Mon Apr 15 2024 Ali Erdinc Koroglu <aekoroglu@linux.intel.com> - 1.0.22-1
- update to 1.0.22

* Tue Feb 20 2024 Ali Erdinc Koroglu <aekoroglu@linux.intel.com> - 1.0.21-1
- Update to 1.0.21

* Tue Feb 20 2024 Ali Erdinc Koroglu <aekoroglu@linux.intel.com> - 1.0.20-3
- Update to 1.0.21

* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.20-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Tue Jan 16 2024 Ali Erdinc Koroglu <aekoroglu@linux.intel.com> - 1.0.20-1
- Update to 1.0.20

* Tue Oct 31 2023 Ali Erdinc Koroglu <aekoroglu@linux.intel.com> - 1.0.18-1
- Update to 1.0.18

* Thu Aug 24 2023 Ali Erdinc Koroglu <aekoroglu@linux.intel.com> - 1.0.16-1
- update to 1.0.16

* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Tue Jul 11 2023 Python Maint <python-maint@redhat.com> - 1.0.7-2
- Rebuilt for Python 3.12

* Wed Jun 28 2023 Ali Erdinc Koroglu <aekoroglu@linux.intel.com> - 1.0.7-1
- update to 1.0.7

* Tue Jun 13 2023 Ali Erdinc Koroglu <aekoroglu@linux.intel.com> - 1.0.6-3
- circular dep fix

* Tue Jun 13 2023 Ali Erdinc Koroglu <aekoroglu@linux.intel.com> - 1.0.6-2
- add missing code_of_conduct.md

* Mon Jun 12 2023 Ali Erdinc Koroglu <aekoroglu@linux.intel.com> - 1.0.6-1
- 1st release
## END: Generated by rpmautospec