update to 1.11.0

This commit is contained in:
zhangrui 2020-01-08 20:05:51 +08:00
parent a2a8e83752
commit 5fee33f20e
3 changed files with 71 additions and 52 deletions

BIN
librepo-1.11.0.tar.gz Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,51 +1,57 @@
%global libcurl_version 7.28.0
%global dnf_conflict 2.8.8 %global dnf_conflict 2.8.8
Name: librepo %bcond_without python3
Version: 1.9.1 %bcond_without pythontests
Release: 2 %bcond_with python2
Summary: Repodata downloading library %bcond_with zchunk
License: LGPLv2.1
URL: https://github.com/rpm-software-management/librepo
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires: cmake gcc doxygen pkgconfig(glib-2.0) Name: librepo
BuildRequires: check-devel gpgme-devel libattr-devel Version: 1.11.0
BuildRequires: libcurl-devel >= 7.19.0 Release: 2
BuildRequires: pkgconfig(libxml-2.0) pkgconfig(libcrypto) pkgconfig(openssl) Summary: Repodata downloading library
License: LGPLv2+
URL: https://github.com/rpm-software-management/librepo
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires: cmake check-devel doxygen pkgconfig(glib-2.0) gcc
BuildRequires: libcurl-devel >= %{libcurl_version} pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(openssl) gpgme-devel libattr-devel pkgconfig(libcrypto)
Requires: libcurl >= %{libcurl_version}
%description %description
A library providing C and Python (libcURL like) API to downloading packages A library providing C and Python (libcURL like) API to downloading repository
and linux repository metadata in rpm-md format. metadata.
%package devel %package devel
Summary: Repodata downloading library Summary: Repodata downloading library
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
%description devel %description devel
Development files for librepo. Development files for librepo.
%package -n python2-%{name} %if %{with python2}
Summary: Python 2 bindings for the librepo library %package -n python2-librepo
Summary: Python bindings for the librepo library
%{?python_provide:%python_provide python2-%{name}} %{?python_provide:%python_provide python2-%{name}}
BuildRequires: python2-gpg python2-devel python2-flask BuildRequires: python2-sphinx python2-devel python2-flask python2-nose
BuildRequires: python2-nose python2-sphinx python2-pyxattr BuildRequires: python2-requests python2-pyxattr python2-gpg
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
Obsoletes: platform-python-%{name} < %{version}-%{release} Conflicts: python2-dnf < %{dnf_conflict}
Conflicts: python2-dnf < %{dnf_conflict}
%description -n python2-%{name} %description -n python2-%{name}
Python 2 bindings for the librepo library. Python 2 bindings for the librepo library.
%endif
%package -n python3-%{name} %package -n python3-librepo
Summary: Python 3 bindings for the librepo library Summary: Python 3 bindings for the librepo library
%{?python_provide:%python_provide python3-%{name}} %{?python_provide:%python_provide python3-%{name}}
BuildRequires: python3-gpg python3-devel python3-flask BuildRequires: python3-devel python3-gpg python3-flask python3-nose
BuildRequires: python3-nose python3-sphinx python3-pyxattr BuildRequires: python3-pyxattr python3-requests python3-sphinx
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
Obsoletes: platform-python-%{name} < %{version}-%{release} Obsoletes: platform-python-%{name} < %{version}-%{release}
Conflicts: python3-dnf < %{dnf_conflict} Conflicts: python3-dnf < %{dnf_conflict}
%description -n python3-%{name} %description -n python3-%{name}
Python 3 bindings for the librepo library. Python 3 bindings for the librepo library.
%prep %prep
@ -55,35 +61,47 @@ mkdir build-py2
mkdir build-py3 mkdir build-py3
%build %build
cd build-py2 %if %{with python2}
%cmake -DPYTHON_DESIRED:FILEPATH=%{__python2} .. pushd build-py2
%cmake -DPYTHON_DESIRED:FILEPATH=%{__python2} %{!?with_zchunk:-DWITH_ZCHUNK=OFF} -DENABLE_PYTHON_TESTS=%{?with_pythontests:ON}%{!?with_pythontests:OFF} ..
%make_build %make_build
cd .. popd
%endif
%if %{with python3}
cd build-py3 pushd build-py3
%cmake -DPYTHON_DESIRED:FILEPATH=%{__python3} .. %cmake -DPYTHON_DESIRED:FILEPATH=%{__python3} %{!?with_zchunk:-DWITH_ZCHUNK=OFF} -DENABLE_PYTHON_TESTS=%{?with_pythontests:ON}%{!?with_pythontests:OFF} ..
%make_build %make_build
cd .. popd
%endif
%check %check
cd build-py2 %if %{with python2}
pushd build-py2
#ctest -VV
make ARGS="-V" test make ARGS="-V" test
cd .. popd
%endif
%if %{with python3}
cd build-py3 pushd build-py3
#ctest -VV
make ARGS="-V" test make ARGS="-V" test
cd .. popd
%endif
%install %install
cd build-py2 %if %{with python2}
pushd build-py2
%make_install %make_install
cd .. popd
%endif
cd build-py3 %if %{with python3}
pushd build-py3
%make_install %make_install
cd .. popd
%endif
%ldconfig_scriptlets %ldconfig_scriptlets
@ -97,15 +115,16 @@ cd ..
%{_libdir}/pkgconfig/%{name}.pc %{_libdir}/pkgconfig/%{name}.pc
%{_includedir}/%{name}/ %{_includedir}/%{name}/
%if %{with python2}
%files -n python2-%{name} %files -n python2-%{name}
%{python2_sitearch}/%{name}/ %{python2_sitearch}/%{name}/
%endif
%if %{with python3}
%files -n python3-%{name} %files -n python3-%{name}
%{python3_sitearch}/%{name}/ %{python3_sitearch}/%{name}/
%endif
%changelog %changelog
* Sat Dec 21 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.9.1-2 * Tue Jan 7 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.11.0-2
- Support python2 - Pakcage init
* Fri Aug 17 2018 openEuler Buildteam <buildteam@openeuler.org> - 1.9.1-1
- Package init