From 4c0284f8aedb72a6f5e9af1f3e1464994bccd5ce Mon Sep 17 00:00:00 2001
From: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
Date: Feb 08 2018 14:07:37 +0000
Subject: Add if conditionals around pyxattr


Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>

---

diff --git a/librepo.spec b/librepo.spec
index 587f534..dbfb3b5 100644
--- a/librepo.spec
+++ b/librepo.spec
@@ -10,7 +10,7 @@
 
 Name:           librepo
 Version:        1.8.1
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        Repodata downloading library
 
 License:        LGPLv2+
@@ -49,7 +49,11 @@ BuildRequires:  python2-flask
 BuildRequires:  python2-nose
 %endif
 BuildRequires:  python2-sphinx
+%if (0%{?rhel} && 0%{?rhel} <= 7) || (0%{?fedora} && 0{%?fedora} <= 27)
+BuildRequires:  pyxattr
+%else
 BuildRequires:  python2-pyxattr
+%endif
 Requires:       %{name}%{?_isa} = %{version}-%{release}
 
 %description -n python2-%{name}
@@ -138,6 +142,9 @@ popd
 %endif
 
 %changelog
+* Thu Feb 08 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.8.1-7
+- Add if conditionals around pyxattr
+
 * Wed Feb 07 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.8.1-6
 - Update Python 2 dependency declarations to new packaging standards
   (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)