From 2357578dbeba9c1559b9193a4f75435098f8639f Mon Sep 17 00:00:00 2001 From: Lucas Meneghel Rodrigues Date: Mon, 16 Mar 2015 14:29:37 -0300 Subject: [PATCH] avocado.spec: Add conditional package dependencies Under .el6, we depend on a series of EPEL available backports, so we have to define the dependencies conditionally. The changes here make avocado to finally build on RHEL6/CentOS6. Signed-off-by: Lucas Meneghel Rodrigues --- avocado.spec | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/avocado.spec b/avocado.spec index 3ad8c18e..57150710 100644 --- a/avocado.spec +++ b/avocado.spec @@ -6,9 +6,15 @@ License: GPLv2 Group: Development/Tools URL: http://avocado-framework.github.io/ Source: avocado-%{version}.tar.gz -BuildRequires: python2-devel, python-docutils, python-yaml BuildArch: noarch -Requires: python, python-requests, python-yaml, fabric, pyliblzma + +%if "%{?dist}" == ".el6" +Requires: python, python-requests, fabric, pyliblzma, libvirt-python, pystache, PyYAML, python-argparse, python-unittest2, python-logutils, python-importlib +BuildRequires: python2-devel, python-docutils, PyYAML, python-logutils +%else +Requires: python, python-requests, fabric, pyliblzma, libvirt-python, pystache, python-yaml +BuildRequires: python2-devel, python-docutils, python-yaml +%endif %description Avocado is a set of tools and libraries (what people call @@ -19,8 +25,13 @@ these days a framework) to perform automated testing. %build %{__python} setup.py build +%if "%{?dist}" == ".el6" +%{__python} /usr/bin/rst2man man/avocado.rst man/avocado.1 +%{__python} /usr/bin/rst2man man/avocado-rest-client.rst man/avocado-rest-client.1 +%else %{__python2} /usr/bin/rst2man man/avocado.rst man/avocado.1 %{__python2} /usr/bin/rst2man man/avocado-rest-client.rst man/avocado-rest-client.1 +%endif %install %{__python} setup.py install --root %{buildroot} --skip-build @@ -35,13 +46,15 @@ these days a framework) to perform automated testing. %dir /etc/avocado/conf.d %config(noreplace)/etc/avocado/avocado.conf %config(noreplace)/etc/avocado/conf.d/README +%{python_sitelib}/avocado* %{_bindir}/avocado %{_bindir}/avocado-rest-client -%exclude %{python_sitelib}/avocado/plugins/htmlresult.py* -%exclude %{python_sitelib}/avocado/plugins/resources/htmlresult/* -%{python_sitelib}/avocado* %{_mandir}/man1/avocado.1.gz %{_mandir}/man1/avocado-rest-client.1.gz +%{_docdir}/avocado/avocado.rst +%{_docdir}/avocado/avocado-rest-client.rst +%exclude %{python_sitelib}/avocado/plugins/htmlresult.py* +%exclude %{python_sitelib}/avocado/plugins/resources/htmlresult/* %package plugins-output-html Summary: Avocado HTML report plugin @@ -77,7 +90,7 @@ examples of how to write tests on your own. * Fri Feb 6 2015 Lucas Meneghel Rodrigues - 0.20.1-1 - Update to upstream version 0.20.1 -* Mon Feb 3 2015 Lucas Meneghel Rodrigues - 0.20.0-1 +* Tue Feb 3 2015 Lucas Meneghel Rodrigues - 0.20.0-1 - Update to upstream version 0.20.0 * Mon Dec 15 2014 Lucas Meneghel Rodrigues - 0.17.0-1 -- GitLab