| |
@@ -11,13 +11,23 @@
|
| |
|
| |
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 @@
|
| |
%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 @@
|
| |
%files
|
| |
%license LICENSE
|
| |
|
| |
+ %if 0%{?el7}
|
| |
+ %{python_sitelib}/*
|
| |
+ %else
|
| |
%{python3_sitelib}/*
|
| |
+ %endif
|
| |
+
|
| |
%{_bindir}/prunerepo
|
| |
%{_mandir}/man1/prunerepo.1*
|
| |
|
| |