diff --git a/.gitignore b/.gitignore index 8b80a23..5b7e283 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,4 @@ /librepo-1.8.0.tar.gz /librepo-1.8.1.tar.gz /librepo-1.9.0.tar.gz +/librepo-1.9.1.tar.gz diff --git a/librepo.spec b/librepo.spec index 1903baf..b49347e 100644 --- a/librepo.spec +++ b/librepo.spec @@ -7,11 +7,20 @@ %bcond_without python3 %bcond_without tests %endif + +%if 0%{?rhel} && 0%{?rhel} > 7 +# Do not build bindings for python2 for RHEL > 7 +%bcond_with python2 +%else +%bcond_without python2 +%endif + + %global dnf_conflict 2.8.8 Name: librepo -Version: 1.9.0 -Release: 4%{?dist} +Version: 1.9.1 +Release: 1%{?dist} Summary: Repodata downloading library License: LGPLv2+ @@ -41,6 +50,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Development files for librepo. +%if %{with python2} %package -n python2-%{name} Summary: Python bindings for the librepo library %{?python_provide:%python_provide python2-%{name}} @@ -49,7 +59,7 @@ BuildRequires: python-sphinx BuildRequires: pygpgme %else BuildRequires: python2-sphinx -BuildRequires: python2-pygpgme +BuildRequires: python2-gpg %endif BuildRequires: python2-devel %if (0%{?rhel} && 0%{?rhel} <= 7) || (0%{?fedora} && 0%{?fedora} <= 27) @@ -66,12 +76,13 @@ Conflicts: python2-dnf < %{dnf_conflict} %description -n python2-%{name} Python 2 bindings for the librepo library. +%endif %if %{with python3} %package -n python3-%{name} Summary: Python 3 bindings for the librepo library %{?python_provide:%python_provide python3-%{name}} -BuildRequires: python3-pygpgme +BuildRequires: python3-gpg BuildRequires: python3-devel %if %{with tests} BuildRequires: python3-flask @@ -91,27 +102,32 @@ Python 3 bindings for the librepo library. %prep %autosetup -p1 -mkdir build build-py3 +mkdir build-py2 +mkdir build-py3 %build -pushd build - %cmake .. +%if %{with python2} +pushd build-py2 + %cmake -DPYTHON_DESIRED:FILEPATH=%{__python2} .. %make_build popd +%endif %if %{with python3} pushd build-py3 - %cmake -DPYTHON_DESIRED:str=3 .. + %cmake -DPYTHON_DESIRED:FILEPATH=%{__python3} .. %make_build popd %endif %if %{with tests} %check -pushd build +%if %{with python2} +pushd build-py2 #ctest -VV make ARGS="-V" test popd +%endif %if %{with python3} pushd build-py3 @@ -122,9 +138,12 @@ popd %endif %install -pushd build +%if %{with python2} +pushd build-py2 %make_install popd +%endif + %if %{with python3} pushd build-py3 %make_install @@ -148,8 +167,10 @@ popd %{_libdir}/pkgconfig/%{name}.pc %{_includedir}/%{name}/ +%if %{with python2} %files -n python2-%{name} %{python2_sitearch}/%{name}/ +%endif %if %{with python3} %files -n python3-%{name} @@ -157,6 +178,9 @@ popd %endif %changelog +* Mon Aug 13 2018 Daniel Mach - 1.9.1-1 +- Update to 1.9.1 + * Fri Jul 13 2018 Fedora Release Engineering - 1.9.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/sources b/sources index 4f30a90..cd362cd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (librepo-1.9.0.tar.gz) = 2c18b41c976a509c86af3565c87ac9f9c988e73b6086fdfe03ce84b430ac1736bb861e68cf6f73bbdb5c1cf6365b86fa581a6088bbc4485b61d428cb30a64061 +SHA512 (librepo-1.9.1.tar.gz) = ce39d0811543d4eee2661d2e4a5c43b15537fe537b1ebba890c18a21f12a9c5957c388e8d3259604ae52e7dcf38d9155ded6a307445bf9842b8a90da8cce3eef