From e5e4fa31ae18bf830fef4428e08aa55f8b34e423 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Mar 20 2013 06:34:03 +0000 Subject: On el5, build against python26 stack --- diff --git a/glances.spec b/glances.spec index 42b0220..8def33a 100644 --- a/glances.spec +++ b/glances.spec @@ -1,11 +1,10 @@ %if 0%{?rhel} && 0%{?rhel} <= 5 -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} -%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} +%{!?python_sitelib: %global python_sitelib %(%{__python}26 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %endif Name: glances Version: 1.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: CLI curses based monitoring tool Group: Applications/System @@ -13,14 +12,16 @@ License: GPLv3 URL: https://github.com/nicolargo/glances Source0: https://github.com/downloads/nicolargo/%{name}/%{name}-%{version}.tar.gz BuildArch: noarch -BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) %if 0%{?rhel} && 0%{?rhel} <= 5 -BuildRequires: python-setuptools +BuildRequires: python26-distribute +Requires: python26-distribute +Requires: python26-psutil >= 0.4.1 +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) %else BuildRequires: python-setuptools-devel -%endif Requires: python-setuptools Requires: python-psutil >= 0.4.1 +%endif %description Glances is a CLI curses based monitoring tool for both GNU/Linux and BSD. @@ -36,7 +37,11 @@ It is developed in Python. %install +%if 0%{?rhel} && 0%{?rhel} <= 5 +%{__python}26 setup.py install --root %{buildroot} +%else %{__python} setup.py install --root %{buildroot} +%endif %find_lang %{name} mv %{buildroot}/usr/etc/ %{buildroot} @@ -58,6 +63,9 @@ rm -rf %{buildroot} %{_datadir}/man/man1/glances.1.gz %changelog +* Tue Mar 19 2013 Michel Salim - 1.6-2 +- On el5, build against python26 stack + * Sat Mar 16 2013 Edouard Bourguignon - 1.6-1 - Upgrade to 1.6