From 240769fc5c1b508710f1f5af2718d956630f6138 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jun 30 2017 19:15:29 +0000 Subject: Adjust the spec file to make it support epel as well as Fedora --- diff --git a/pagure-dist-git.spec b/pagure-dist-git.spec index 63c3064..fb5de8b 100644 --- a/pagure-dist-git.spec +++ b/pagure-dist-git.spec @@ -1,6 +1,21 @@ # Python3 packaging is turned off until pagure itself is ported to python3. %global with_python3 0 +# Current EL releases & older Fedora use "python-*" +%if 0%{?el6} || 0%{?el7} || 0%{?fedora} < 25 +%define py_prefix python +%if 0%{?el6} || 0%{?el7} +BuildRequires: python-devel +%else +BuildRequires: python2-devel +%endif +%else +# Newer Fedora releases use "pythonX-*" +%define py_prefix python2 +BuildRequires: python2-devel +%endif + + %{!?_licensedir: %global license %%doc} %global modname pagure-dist-git @@ -29,11 +44,11 @@ dist-git which has a different access model than regular projects on pagure Summary: Pagure gitolite plugin for Fedora's dist-git setup. %{?python_provide:%python_provide python2-%{modname}} -BuildRequires: python2-devel -BuildRequires: python2-setuptools +BuildRequires: %{py_prefix}-devel +BuildRequires: %{py_prefix}-setuptools -Requires: python2-pdc-client -Requires: python2-dogpile-cache +Requires: %{py_prefix}-pdc-client +Requires: %{py_prefix}-dogpile-cache Requires: pagure %description -n python2-%{modname}