Files
rpms/fedora/SPECS/python2-whisper.spec

113 lines
3.4 KiB
RPMSpec
Raw Normal View History

%if 0%{?rhel} && 0%{?rhel} <= 6
%{!?__python2: %global __python2 /usr/bin/python2}
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif
Name: python2-whisper
Version: 1.0.2
Release: 1%{?dist}
Summary: Simple database library for storing time-series data
Group: Development/Libraries
License: ASL 2.0
URL: https://github.com/graphite-project
Source0: whisper-%{version}.tar.gz
Source10: rrd2whisper.1
Source11: whisper-create.1
Source12: whisper-dump.1
Source13: whisper-fetch.1
Source14: whisper-info.1
Source15: whisper-merge.1
Source16: whisper-resize.1
Source17: whisper-set-aggregation-method.1
Source18: whisper-update.1
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python2-setuptools
%description
Whisper is a fixed-size database, similar in design and purpose to RRD
(round-robin-database). It provides fast, reliable storage of numeric
data over time. Whisper allows for higher resolution (seconds per point)
of recent data to degrade into lower resolutions for long-term retention
of historical data.
%prep
%setup -q -n whisper-%{version}
%build
%{__python} setup.py build
%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
# man pages
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
install -D -p -m0644 %{SOURCE10} $RPM_BUILD_ROOT%{_mandir}/man1
install -D -p -m0644 %{SOURCE11} $RPM_BUILD_ROOT%{_mandir}/man1
install -D -p -m0644 %{SOURCE12} $RPM_BUILD_ROOT%{_mandir}/man1
install -D -p -m0644 %{SOURCE13} $RPM_BUILD_ROOT%{_mandir}/man1
install -D -p -m0644 %{SOURCE14} $RPM_BUILD_ROOT%{_mandir}/man1
install -D -p -m0644 %{SOURCE15} $RPM_BUILD_ROOT%{_mandir}/man1
install -D -p -m0644 %{SOURCE16} $RPM_BUILD_ROOT%{_mandir}/man1
install -D -p -m0644 %{SOURCE17} $RPM_BUILD_ROOT%{_mandir}/man1
install -D -p -m0644 %{SOURCE18} $RPM_BUILD_ROOT%{_mandir}/man1
# remove .py suffix
for i in $RPM_BUILD_ROOT%{_bindir}/*.py; do
mv ${i} ${i%%.py}
done
%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
%files
%doc LICENSE
%{_bindir}/rrd2whisper
%{_bindir}/whisper-create
%{_bindir}/whisper-dump
%{_bindir}/whisper-fetch
%{_bindir}/whisper-fill
%{_bindir}/whisper-info
%{_bindir}/whisper-merge
%{_bindir}/whisper-resize
%{_bindir}/whisper-set-aggregation-method
%{_bindir}/whisper-update
%{_bindir}/find-corrupt-whisper-files
%{_bindir}/update-storage-times
%{_bindir}/whisper-auto-resize
%{_bindir}/whisper-auto-update
%{_bindir}/whisper-diff
%{_bindir}/whisper-set-xfilesfactor
%{_mandir}/man1/rrd2whisper.1*
%{_mandir}/man1/whisper-create.1*
%{_mandir}/man1/whisper-dump.1*
%{_mandir}/man1/whisper-fetch.1*
%{_mandir}/man1/whisper-info.1*
%{_mandir}/man1/whisper-merge.1*
%{_mandir}/man1/whisper-resize.1*
%{_mandir}/man1/whisper-set-aggregation-method.1*
%{_mandir}/man1/whisper-update.1*
%{python_sitelib}/whisper.py*
%if 0%{?fedora} || 0%{?rhel} > 5
%{python_sitelib}/whisper-*-py?.?.egg-info
%endif
%changelog
* Sat Sep 16 2017 Daniel Steiner <daniel.steiner@greenmail.ch>
- First inital release for Fedora 26