# sitelib for noarch packages, sitearch for others (remove the unneeded one)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
Name: pcp2pdf
Version: 0.3
Release: 6%{?dist}
Summary: Utility to create PDF reports from PCP archives
Group: Applications/System
License: GPLv2+
URL: https://github.com/performancecopilot/pcp2pdf
Source0: https://github.com/performancecopilot/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: fix-spurious-python-interpreter.patch
Requires: python3-reportlab
Requires: python3-matplotlib
Requires: python3-pcp
BuildArch: noarch
BuildRequires: python3-devel
%description
Utility to create PDF reports from Performance Co-Pilot archives. It allows to
choose sampling rate, custom graphs, custom labels and selection of which
metrics should appear in the report.
%prep
%setup -q
%patch0 -p1 -b .orig
%build
%{__python3} setup.py build
%install
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_mandir}/man1
install -p -m 0644 man/pcp2pdf.1 $RPM_BUILD_ROOT%{_mandir}/man1
# FIXME: bash completion is not yet there
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
%files
%license COPYING
%doc README.md
%config(noreplace) %{_sysconfdir}/pcp/pcp2pdf
# Note that when this lands it should go in {_datadir}/bash-completion/completions/
# and not in {_sysconfdir}/bash_completion.d
%{_bindir}/%{name}
%{_mandir}/*/*
%{_datadir}/%{name}/*
# For noarch packages: sitelib
%{python3_sitelib}/*
%changelog
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-6
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-4
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Fri Jun 05 2015 Michele Baldessari <michele@acksyn.org> - 0.3-3
- Own /usr/share/pcp2pdf
* Wed Jun 03 2015 Michele Baldessari <michele@acksyn.org> - 0.3-2
- Incorporate suggestions from Fedora review (remove buildroot, defattr,
remove a spurios /usr/bin/python line, do not use macros when not needed)
* Mon Jun 01 2015 Michele Baldessari <michele@acksyn.org> - 0.3-1
- New upstream
* Mon Mar 02 2015 Michele Baldessari <michele@redhat.com> - 0.2-1
- New upstream
* Mon Mar 02 2015 Michele Baldessari <michele@redhat.com> - 0.1-3
- Fix URLs
* Mon Mar 02 2015 Michele Baldessari <michele@redhat.com> - 0.1-2
- Port to Python 3
* Tue Oct 28 2014 Michele Baldessari <michele@redhat.com> - 0.1-1
- Initial release