From 17d1abff962313d676723a16b14c10530a8366c1 Mon Sep 17 00:00:00 2001 From: Martin Juhl Date: Feb 08 2017 13:58:26 +0000 Subject: Support for EL7 for Prunerepo... --- diff --git a/prunerepo/prunerepo.spec b/prunerepo/prunerepo.spec index ba306d3..3d1c440 100644 --- a/prunerepo/prunerepo.spec +++ b/prunerepo/prunerepo.spec @@ -11,13 +11,23 @@ Source0: %{name}-%{version}.tar.gz License: GPLv2+ BuildArch: noarch +%if 0%{?el7} +BuildRequires: python-devel +BuildRequires: rpm-python +%else BuildRequires: python3-devel BuildRequires: rpm-python3 +%endif BuildRequires: asciidoc Requires: createrepo_c Requires: dnf-plugins-core +%if 0%{?el7} +Requires: rpm-python +Requires: python +%else Requires: rpm-python3 Requires: python3 +%endif %description RPM packages that have newer version available in that same @@ -38,11 +48,19 @@ to recreate the repository metadata. %setup -q %build +%if 0%{?el7} +%py_build +%else %py3_build +%endif a2x -d manpage -f manpage man/prunerepo.1.asciidoc %install +%if 0%{?el7} +%py_install +%else %py3_install +%endif install -d %{buildroot}%{_mandir}/man1 install -p -m 644 man/prunerepo.1 %{buildroot}/%{_mandir}/man1/ @@ -50,7 +68,12 @@ install -p -m 644 man/prunerepo.1 %{buildroot}/%{_mandir}/man1/ %files %license LICENSE +%if 0%{?el7} +%{python_sitelib}/* +%else %{python3_sitelib}/* +%endif + %{_bindir}/prunerepo %{_mandir}/man1/prunerepo.1*