richardphibel / rpms / librepo

Forked from rpms/librepo 2 years ago
Clone
d0456a
%global libcurl_version 7.28.0
d0456a
d0456a
%if 0%{?rhel} && 0%{?rhel} <= 7
d0456a
# Do not build bindings for python3 for RHEL <= 7
d0456a
%bcond_with python3
d0456a
# python-flask is not in RHEL7
d0456a
%bcond_with pythontests
d0456a
%else
d0456a
%bcond_without python3
d0456a
%bcond_without pythontests
d0456a
%endif
d0456a
d0456a
%if 0%{?rhel} > 7 || 0%{?fedora} > 29
d0456a
# Do not build bindings for python2 for RHEL > 7 and Fedora > 29
d0456a
%bcond_with python2
d0456a
%else
d0456a
%bcond_without python2
d0456a
%endif
d0456a
d0456a
%if 0%{?rhel}
d0456a
%bcond_with zchunk
d0456a
%else
d0456a
%bcond_without zchunk
d0456a
%endif
d0456a
d0456a
%global dnf_conflict 2.8.8
d0456a
d0456a
Name:           librepo
d0456a
Version:        1.10.3
d0456a
Release:        1%{?dist}
d0456a
Summary:        Repodata downloading library
d0456a
d0456a
License:        LGPLv2+
d0456a
URL:            https://github.com/rpm-software-management/librepo
d0456a
Source0:        %{url}/archive/%{version}/%{name}-%{version}.tar.gz
d0456a
d0456a
BuildRequires:  cmake
d0456a
BuildRequires:  gcc
d0456a
BuildRequires:  check-devel
d0456a
BuildRequires:  doxygen
d0456a
BuildRequires:  pkgconfig(glib-2.0)
d0456a
BuildRequires:  gpgme-devel
d0456a
BuildRequires:  libattr-devel
d0456a
BuildRequires:  libcurl-devel >= %{libcurl_version}
d0456a
BuildRequires:  pkgconfig(libxml-2.0)
d0456a
BuildRequires:  pkgconfig(libcrypto)
d0456a
BuildRequires:  pkgconfig(openssl)
d0456a
%if %{with zchunk}
d0456a
BuildRequires:  pkgconfig(zck) >= 0.9.11
d0456a
%endif
d0456a
Requires:       libcurl%{?_isa} >= %{libcurl_version}
d0456a
d0456a
%description
d0456a
A library providing C and Python (libcURL like) API to downloading repository
d0456a
metadata.
d0456a
d0456a
%package devel
d0456a
Summary:        Repodata downloading library
d0456a
Requires:       %{name}%{?_isa} = %{version}-%{release}
d0456a
d0456a
%description devel
d0456a
Development files for librepo.
d0456a
d0456a
%if %{with python2}
d0456a
%package -n python2-%{name}
d0456a
Summary:        Python bindings for the librepo library
d0456a
%{?python_provide:%python_provide python2-%{name}}
d0456a
%if 0%{?rhel} && 0%{?rhel} <= 7
d0456a
BuildRequires:  python-sphinx
d0456a
%else
d0456a
BuildRequires:  python2-sphinx
d0456a
%endif
d0456a
BuildRequires:  python2-devel
d0456a
%if %{with pythontests}
d0456a
BuildRequires:  python2-flask
d0456a
BuildRequires:  python2-nose
d0456a
BuildRequires:  python2-requests
d0456a
%if (0%{?rhel} && 0%{?rhel} <= 7)
d0456a
BuildRequires:  pyxattr
d0456a
BuildRequires:  pygpgme
d0456a
%else
d0456a
BuildRequires:  python2-pyxattr
d0456a
BuildRequires:  python2-gpg
d0456a
%endif
d0456a
%endif # with pythontests
d0456a
Requires:       %{name}%{?_isa} = %{version}-%{release}
d0456a
Conflicts:      python2-dnf < %{dnf_conflict}
d0456a
d0456a
%description -n python2-%{name}
d0456a
Python 2 bindings for the librepo library.
d0456a
%endif
d0456a
d0456a
%if %{with python3}
d0456a
%package -n python3-%{name}
d0456a
Summary:        Python 3 bindings for the librepo library
d0456a
%{?python_provide:%python_provide python3-%{name}}
d0456a
BuildRequires:  python3-devel
d0456a
%if %{with pythontests}
d0456a
BuildRequires:  python3-gpg
d0456a
BuildRequires:  python3-flask
d0456a
BuildRequires:  python3-nose
d0456a
BuildRequires:  python3-pyxattr
d0456a
BuildRequires:  python3-requests
d0456a
%endif
d0456a
BuildRequires:  python3-sphinx
d0456a
Requires:       %{name}%{?_isa} = %{version}-%{release}
d0456a
# Obsoletes Fedora 27 package
d0456a
Obsoletes:      platform-python-%{name} < %{version}-%{release}
d0456a
Conflicts:      python3-dnf < %{dnf_conflict}
d0456a
d0456a
%description -n python3-%{name}
d0456a
Python 3 bindings for the librepo library.
d0456a
%endif
d0456a
d0456a
%prep
d0456a
%autosetup -p1
d0456a
d0456a
mkdir build-py2
d0456a
mkdir build-py3
d0456a
d0456a
%build
d0456a
%if %{with python2}
d0456a
pushd build-py2
d0456a
  %cmake -DPYTHON_DESIRED:FILEPATH=%{__python2} %{!?with_zchunk:-DWITH_ZCHUNK=OFF} -DENABLE_PYTHON_TESTS=%{?with_pythontests:ON}%{!?with_pythontests:OFF} ..
d0456a
  %make_build
d0456a
popd
d0456a
%endif
d0456a
d0456a
%if %{with python3}
d0456a
pushd build-py3
d0456a
  %cmake -DPYTHON_DESIRED:FILEPATH=%{__python3} %{!?with_zchunk:-DWITH_ZCHUNK=OFF} -DENABLE_PYTHON_TESTS=%{?with_pythontests:ON}%{!?with_pythontests:OFF} ..
d0456a
  %make_build
d0456a
popd
d0456a
%endif
d0456a
d0456a
%check
d0456a
%if %{with python2}
d0456a
pushd build-py2
d0456a
  #ctest -VV
d0456a
  make ARGS="-V" test
d0456a
popd
d0456a
%endif
d0456a
d0456a
%if %{with python3}
d0456a
pushd build-py3
d0456a
  #ctest -VV
d0456a
  make ARGS="-V" test
d0456a
popd
d0456a
%endif
d0456a
d0456a
%install
d0456a
%if %{with python2}
d0456a
pushd build-py2
d0456a
  %make_install
d0456a
popd
d0456a
%endif
d0456a
d0456a
%if %{with python3}
d0456a
pushd build-py3
d0456a
  %make_install
d0456a
popd
d0456a
%endif
d0456a
d0456a
%if 0%{?rhel} && 0%{?rhel} <= 7
d0456a
%post -p /sbin/ldconfig
d0456a
%postun -p /sbin/ldconfig
d0456a
%else
d0456a
%ldconfig_scriptlets
d0456a
%endif
d0456a
d0456a
%files
d0456a
%license COPYING
d0456a
%doc README.md
d0456a
%{_libdir}/%{name}.so.*
d0456a
d0456a
%files devel
d0456a
%{_libdir}/%{name}.so
d0456a
%{_libdir}/pkgconfig/%{name}.pc
d0456a
%{_includedir}/%{name}/
d0456a
d0456a
%if %{with python2}
d0456a
%files -n python2-%{name}
d0456a
%{python2_sitearch}/%{name}/
d0456a
%endif
d0456a
d0456a
%if %{with python3}
d0456a
%files -n python3-%{name}
d0456a
%{python3_sitearch}/%{name}/
d0456a
%endif
d0456a
d0456a
%changelog
d0456a
* Tue Jun 11 2019 Pavla Kratochvilova <pkratoch@redhat.com> - 1.10.3-1
d0456a
- Update to 1.10.3
d0456a
- Exit gpg-agent after repokey import (RhBug:1650266)
d0456a
d0456a
* Mon May 13 2019 Pavla Kratochvilova <pkratoch@redhat.com> - 1.10.1-1
d0456a
- Update to 1.10.1
d0456a
- Reduce download delays
d0456a
- Add an option to preserve timestamps of the downloaded files (RhBug:1688537)
d0456a
- Append the '?' part of repo URL after the path
d0456a
- Fix memory leaks
d0456a
d0456a
* Tue Sep 25 2018 Jaroslav Mracek <jmracek@redhat.com> - 1.9.2-1
d0456a
- Update to 1.9.2
d0456a
- Bug 1626495 - major performance regression with libcurl-7.61.1
d0456a
d0456a
* Mon Aug 13 2018 Daniel Mach <dmach@redhat.com> - 1.9.1-1
d0456a
- Update to 1.9.1
d0456a
d0456a
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-4
d0456a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
d0456a
d0456a
* Fri Jun 29 2018 Jaroslav Mracek <jmracek@redhat.com> - 1.9.0-3
d0456a
- Rebuilt for Python 3.7
d0456a
d0456a
* Tue Jun 26 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.9.0-2
d0456a
- Fix ldconfig_scriptlets once more
d0456a
d0456a
* Tue Jun 26 2018 Jaroslav Mracek <jmracek@redhat.com> - 1.9.0-1
d0456a
- Update to 1.9.0
d0456a
d0456a
* Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 1.8.1-9
d0456a
- Rebuilt for Python 3.7
d0456a
d0456a
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 1.8.1-8
d0456a
- Bootstrap for Python 3.7
d0456a
d0456a
* Thu Feb 08 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.8.1-7
d0456a
- Add if conditionals around pyxattr
d0456a
d0456a
* Wed Feb 07 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.8.1-6
d0456a
- Update Python 2 dependency declarations to new packaging standards
d0456a
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
d0456a
d0456a
* Wed Jan 31 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.8.1-5
d0456a
- Switch to %%ldconfig_scriptlets
d0456a
d0456a
* Tue Nov 07 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.8.1-4
d0456a
- Use better Obsoletes for platform-python
d0456a
d0456a
* Sat Nov 04 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.8.1-3
d0456a
- Fix typo in Obsoletes
d0456a
d0456a
* Fri Nov 03 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.8.1-2
d0456a
- Remove platform-python subpackage
d0456a
d0456a
* Fri Sep 15 2017 Igor Gnatenko <ignatenko@redhat.com> - 1.8.1-1
d0456a
- Update to 1.8.1
d0456a
d0456a
* Fri Sep 01 2017 Igor Gnatenko <ignatenko@redhat.com> - 1.8.0-2
d0456a
- Disable platform python on old releases
d0456a
d0456a
* Wed Aug 23 2017 Igor Gnatenko <ignatenko@redhat.com> - 1.8.0-1
d0456a
- Update to 1.8.0
d0456a
d0456a
* Fri Aug 18 2017 Tomas Orsava <torsava@redhat.com> - 1.7.20-9
d0456a
- Added Patch 0 to fix a tearDown failure in the test suite
d0456a
d0456a
* Thu Aug 10 2017 Petr Viktorin <pviktori@redhat.com> - 1.7.20-8
d0456a
- Add subpackage for platform-python (https://fedoraproject.org/wiki/Changes/Platform_Python_Stack)
d0456a
d0456a
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.20-7
d0456a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
d0456a
d0456a
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.20-6
d0456a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
d0456a
d0456a
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.20-5
d0456a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
d0456a
d0456a
* Tue Dec 13 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.7.20-4
d0456a
- Enable tests
d0456a
d0456a
* Tue Dec 13 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.7.20-3
d0456a
- Rebuild for Python 3.6
d0456a
- Disable tests for now
d0456a
d0456a
* Sat Dec 10 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 1.7.20-2
d0456a
- Rebuild for gpgme 1.18
d0456a
d0456a
* Thu Aug 25 2016 Tomas Mlcoch <tmlcoch@redhat.com> - 1.7.20-1
d0456a
- Tests: Disable test_download_packages_with_resume_02 test
d0456a
- Update build utils to match new fedora spec schema
d0456a
d0456a
* Wed Aug 24 2016 Tomas Mlcoch <tmlcoch@redhat.com> - 1.7.19-1
d0456a
- Add yumrecord substitution mechanism (mluscon)
d0456a
- Fix a memory leak in signature verification (cwalters)
d0456a
d0456a
* Tue Aug 09 2016 Igor Gnatenko <ignatenko@redhat.com> - 1.7.18-4
d0456a
- Add %%{?system_python_abi}
d0456a
- Trim ton of changelog
d0456a
d0456a
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.18-3
d0456a
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
d0456a
d0456a
* Thu Apr 07 2016 Igor Gnatenko <ignatenko@redhat.com> - 1.7.18-2
d0456a
- Adopt to new packaging guidelines
d0456a
- Cleanups in spec file
d0456a
d0456a
* Fri Mar  4 2016 Tomas Mlcoch <tmlcoch@redhat.com> - 1.7.18-1
d0456a
- Add new option LRO_FTPUSEEPSV
d0456a
- Update AUTHORS
d0456a
- downloader prepare_next_transfer(): simplify long line
d0456a
- downloader prepare_next_transfer(): add missing error check
d0456a
- downloader prepare_next_transfer(): cleanup error path
d0456a
- downloader prepare_next_transfer() - fix memory leak on error path (Alan Jenkins)
d0456a
- handle: Don't use proxy cache for downloads of metalink/mirrorlist
d0456a
- handle: Don't set CURLOPT_HTTPHEADER into curl handle immediately when specified
d0456a
- downloader: Implement logic for no_cache param in LrDownloadTarget (RhBug: 1297762)
d0456a
- Add no_cache param to LrDownloadTarget and lr_downloadtarget_new()
d0456a
- New test: always try to download from the fastest mirror (Alexander Todorov)
d0456a
- Doc: Fixed minor doc typo (Philippe Ombredanne)
d0456a
- Doc: Other updates
d0456a
- Doc: Update default values in doc to reflect reality