teknoraver / rpms / librepo

Forked from rpms/librepo 6 days ago
Clone

Blame librepo.spec

Petr Viktorin 6580f3
%bcond_without python2
Igor Gnatenko 98638e
%if 0%{?rhel} && 0%{?rhel} <= 7
Tomas Mlcoch 8ac931
# Do not build bindings for python3 for RHEL <= 7
Tomas Mlcoch 8ac931
%bcond_with python3
Tomas Mlcoch 000d69
# python-flask is not in RHEL7
Tomas Mlcoch 000d69
%bcond_with tests
Petr Viktorin 6580f3
# platform-python is not in RHEL7
Petr Viktorin 6580f3
%bcond_with platform_python
Tomas Mlcoch 8ac931
%else
Tomas Mlcoch 8ac931
%bcond_without python3
Petr Viktorin 6580f3
%bcond_without platform_python
Charalampos Stratakis 240010
%bcond_without tests
Tomas Mlcoch 8ac931
%endif
Tomas Mlcoch 8ac931
Tomas Mlcoch 8ac931
Name:           librepo
Tomas Mlcoch 13c4f6
Version:        1.7.20
Petr Viktorin 6580f3
Release:        8%{?dist}
Tomas Mlcoch 8ac931
Summary:        Repodata downloading library
Tomas Mlcoch 8ac931
Tomas Mlcoch 97216d
License:        LGPLv2+
Igor Gnatenko 98638e
URL:            https://github.com/rpm-software-management/librepo
Igor Gnatenko 98638e
Source0:        %{url}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz
Tomas Mlcoch e989a8
Tomas Mlcoch 8ac931
BuildRequires:  cmake
Igor Gnatenko 98638e
BuildRequires:  gcc
Igor Gnatenko 98638e
BuildRequires:  check-devel
Tomas Mlcoch 8ac931
BuildRequires:  doxygen
Tomas Mlcoch 8ac931
BuildRequires:  expat-devel
Tomas Mlcoch 3c7e37
BuildRequires:  glib2-devel >= 2.26.0
Tomas Mlcoch 8ac931
BuildRequires:  gpgme-devel
Tomas Mlcoch 8ac931
BuildRequires:  libattr-devel
Tomas Mlcoch a35685
BuildRequires:  libcurl-devel >= 7.19.0
Tomas Mlcoch 8ac931
BuildRequires:  openssl-devel
Tomas Mlcoch e8713e
Tomas Mlcoch e989a8
%description
Tomas Mlcoch e989a8
A library providing C and Python (libcURL like) API to downloading repository
Tomas Mlcoch e989a8
metadata.
Tomas Mlcoch e989a8
Tomas Mlcoch e989a8
%package devel
Tomas Mlcoch 8ac931
Summary:        Repodata downloading library
Tomas Mlcoch 8ac931
Requires:       %{name}%{?_isa} = %{version}-%{release}
Tomas Mlcoch e989a8
Tomas Mlcoch e989a8
%description devel
Tomas Mlcoch e989a8
Development files for librepo.
Tomas Mlcoch e989a8
Petr Viktorin 6580f3
%if %{with python2}
Igor Gnatenko 98638e
%package -n python2-%{name}
Tomas Mlcoch 8ac931
Summary:        Python bindings for the librepo library
Igor Gnatenko 98638e
%{?python_provide:%python_provide python2-%{name}}
Tomas Mlcoch 8ac931
BuildRequires:  pygpgme
Tomas Mlcoch 8ac931
BuildRequires:  python2-devel
Tomas Mlcoch 000d69
%if %{with tests}
Tomas Mlcoch 8ac931
BuildRequires:  python-flask
Tomas Mlcoch 8ac931
BuildRequires:  python-nose
Tomas Mlcoch 000d69
%endif
Tomas Mlcoch 8ac931
BuildRequires:  python-sphinx
Tomas Mlcoch a33831
BuildRequires:  pyxattr
Tomas Mlcoch 8ac931
Requires:       %{name}%{?_isa} = %{version}-%{release}
Tomas Mlcoch e989a8
Igor Gnatenko 98638e
%description -n python2-%{name}
Igor Gnatenko 98638e
Python 2 bindings for the librepo library.
Petr Viktorin 6580f3
%endif # with python2
Tomas Mlcoch e989a8
Tomas Mlcoch 8ac931
%if %{with python3}
Igor Gnatenko 98638e
%package -n python3-%{name}
Tomas Mlcoch e8713e
Summary:        Python 3 bindings for the librepo library
Igor Gnatenko 98638e
%{?python_provide:%python_provide python3-%{name}}
Tomas Mlcoch 8ac931
BuildRequires:  python3-pygpgme
Tomas Mlcoch e8713e
BuildRequires:  python3-devel
Igor Gnatenko 98638e
%if %{with tests}
Tomas Mlcoch e8713e
BuildRequires:  python3-flask
Tomas Mlcoch e8713e
BuildRequires:  python3-nose
Igor Gnatenko 98638e
%endif
Tomas Mlcoch e8713e
BuildRequires:  python3-sphinx
Tomas Mlcoch a33831
BuildRequires:  python3-pyxattr
Tomas Mlcoch e8713e
Requires:       %{name}%{?_isa} = %{version}-%{release}
Tomas Mlcoch e8713e
Igor Gnatenko 98638e
%description -n python3-%{name}
Tomas Mlcoch e8713e
Python 3 bindings for the librepo library.
Tomas Mlcoch 8ac931
%endif
Tomas Mlcoch e8713e
Petr Viktorin 6580f3
%if %{with platform_python}
Petr Viktorin 6580f3
%package -n platform-python-%{name}
Petr Viktorin 6580f3
Summary:        Platform Python bindings for the librepo library
Petr Viktorin 6580f3
BuildRequires:  platform-python-devel
Petr Viktorin 6580f3
Requires:       %{name}%{?_isa} = %{version}-%{release}
Petr Viktorin 6580f3
Petr Viktorin 6580f3
%description -n platform-python-%{name}
Petr Viktorin 6580f3
Python 3 bindings for the librepo library.
Petr Viktorin 6580f3
%endif # with platform_python
Petr Viktorin 6580f3
Tomas Mlcoch e989a8
%prep
Igor Gnatenko 98638e
%autosetup -n %{name}-%{name}-%{version}
Tomas Mlcoch e989a8
Petr Viktorin 6580f3
mkdir build build-py3 build-platpy
Tomas Mlcoch e8713e
Tomas Mlcoch e989a8
%build
Petr Viktorin 6580f3
Petr Viktorin 6580f3
%if %{with python2}
Igor Gnatenko 98638e
pushd build
Igor Gnatenko 98638e
  %cmake ..
Igor Gnatenko 98638e
  %make_build
Igor Gnatenko 98638e
popd
Petr Viktorin 6580f3
%endif # with python2
Tomas Mlcoch e989a8
Tomas Mlcoch 8ac931
%if %{with python3}
Igor Gnatenko 98638e
pushd build-py3
Igor Gnatenko 98638e
  %cmake -DPYTHON_DESIRED:str=3 ..
Igor Gnatenko 98638e
  %make_build
Tomas Mlcoch e8713e
popd
Tomas Mlcoch 8ac931
%endif
Tomas Mlcoch e8713e
Petr Viktorin 6580f3
%if %{with platform_python}
Petr Viktorin 6580f3
pushd build-platpy
Petr Viktorin 6580f3
Petr Viktorin 6580f3
  # librepo's CMakeLists override CMake's override mechanism!
Petr Viktorin 6580f3
  # Bring it back.
Petr Viktorin 6580f3
  sed '/unset(PYTHON_[^)]*)/d' -i ../librepo/python/python3/CMakeLists.txt
Petr Viktorin 6580f3
Petr Viktorin 6580f3
  export python_so=%{_libdir}/`%{__platform_python} -c 'import sysconfig; print(sysconfig.get_config_var("LDLIBRARY"))'`
Petr Viktorin 6580f3
  export python_include=`%{__platform_python} -c 'import sysconfig; print(sysconfig.get_path("include"))'`
Petr Viktorin 6580f3
Petr Viktorin 6580f3
  %cmake \
Petr Viktorin 6580f3
    -DPYTHON_EXECUTABLE:FILEPATH=%{__platform_python} \
Petr Viktorin 6580f3
    -DPYTHON_LIBRARY=$python_so \
Petr Viktorin 6580f3
    -DPYTHON_INCLUDE_DIR=$python_include \
Petr Viktorin 6580f3
    -DPYTHON_DESIRED:str=3 \
Petr Viktorin 6580f3
    ..
Petr Viktorin 6580f3
  %make_build
Petr Viktorin 6580f3
popd
Petr Viktorin 6580f3
%endif # with platform_python
Petr Viktorin 6580f3
Tomas Mlcoch 000d69
%if %{with tests}
Igor Gnatenko 98638e
%check
Petr Viktorin 6580f3
%if %{with python2}
Igor Gnatenko 98638e
pushd build
Tomas Mlcoch 13c4f6
  #ctest -VV
Tomas Mlcoch 13c4f6
  make ARGS="-V" test
Igor Gnatenko 98638e
popd
Petr Viktorin 6580f3
%endif # with python2
Tomas Mlcoch e989a8
Tomas Mlcoch 8ac931
%if %{with python3}
Igor Gnatenko 98638e
pushd build-py3
Tomas Mlcoch 13c4f6
  #ctest -VV
Tomas Mlcoch 13c4f6
  make ARGS="-V" test
Tomas Mlcoch e8713e
popd
Petr Viktorin 6580f3
%endif # with python3
Petr Viktorin 6580f3
Petr Viktorin 6580f3
%if %{with platform_python}
Petr Viktorin 6580f3
pushd build-platpy
Petr Viktorin 6580f3
  #ctest -VV
Petr Viktorin 6580f3
Petr Viktorin 6580f3
  # Test suite requires the "nosetests" binary
Petr Viktorin 6580f3
  #make ARGS="-V" test
Petr Viktorin 6580f3
popd
Petr Viktorin 6580f3
%endif # with platform_python
Petr Viktorin 6580f3
%endif # with tests
Tomas Mlcoch e8713e
Tomas Mlcoch e989a8
%install
Petr Viktorin 6580f3
Petr Viktorin 6580f3
%if %{with platform_python}
Petr Viktorin 6580f3
pushd build-platpy
Petr Viktorin 6580f3
  %make_install
Petr Viktorin 6580f3
popd
Petr Viktorin 6580f3
%endif # with platform_python
Petr Viktorin 6580f3
Petr Viktorin 6580f3
%if %{with python2}
Igor Gnatenko 98638e
pushd build
Igor Gnatenko 98638e
  %make_install
Igor Gnatenko 98638e
popd
Petr Viktorin 6580f3
%endif # with python2
Petr Viktorin 6580f3
Tomas Mlcoch 8ac931
%if %{with python3}
Igor Gnatenko 98638e
pushd build-py3
Igor Gnatenko 98638e
  %make_install
Tomas Mlcoch e8713e
popd
Tomas Mlcoch 8ac931
%endif
Tomas Mlcoch e989a8
Tomas Mlcoch e989a8
%post -p /sbin/ldconfig
Tomas Mlcoch e989a8
Tomas Mlcoch e989a8
%postun -p /sbin/ldconfig
Tomas Mlcoch e989a8
Tomas Mlcoch e989a8
%files
Igor Gnatenko 98638e
%license COPYING
Igor Gnatenko 98638e
%doc README.md
Igor Gnatenko 98638e
%{_libdir}/%{name}.so.*
Tomas Mlcoch e989a8
Tomas Mlcoch e989a8
%files devel
Igor Gnatenko 98638e
%{_libdir}/%{name}.so
Igor Gnatenko 98638e
%{_libdir}/pkgconfig/%{name}.pc
Igor Gnatenko 98638e
%{_includedir}/%{name}/
Tomas Mlcoch e989a8
Petr Viktorin 6580f3
%if %{with python2}
Igor Gnatenko 98638e
%files -n python2-%{name}
Igor Gnatenko 98638e
%{python2_sitearch}/%{name}/
Petr Viktorin 6580f3
%endif # with python2
Tomas Mlcoch e989a8
Tomas Mlcoch 8ac931
%if %{with python3}
Igor Gnatenko 98638e
%files -n python3-%{name}
Igor Gnatenko 98638e
%{python3_sitearch}/%{name}/
Tomas Mlcoch 8ac931
%endif
Tomas Mlcoch e8713e
Petr Viktorin 6580f3
%if %{with platform_python}
Petr Viktorin 6580f3
%files -n platform-python-%{name}
Petr Viktorin 6580f3
%{platform_python_sitearch}/%{name}/
Petr Viktorin 6580f3
%endif # with platform_python
Petr Viktorin 6580f3
Tomas Mlcoch e989a8
%changelog
Petr Viktorin 6580f3
* Thu Aug 10 2017 Petr Viktorin <pviktori@redhat.com> - 1.7.20-8
Petr Viktorin 6580f3
- Add subpackage for platform-python (https://fedoraproject.org/wiki/Changes/Platform_Python_Stack)
Petr Viktorin 6580f3
Fedora Release Engineering 290194
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.20-7
Fedora Release Engineering 290194
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
Fedora Release Engineering 290194
Fedora Release Engineering 928d54
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.20-6
Fedora Release Engineering 928d54
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
Fedora Release Engineering 928d54
Fedora Release Engineering b2f5e6
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.20-5
Fedora Release Engineering b2f5e6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
Fedora Release Engineering b2f5e6
Charalampos Stratakis 240010
* Tue Dec 13 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.7.20-4
Charalampos Stratakis 240010
- Enable tests
Charalampos Stratakis 240010
Charalampos Stratakis 372bbc
* Tue Dec 13 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.7.20-3
Charalampos Stratakis 372bbc
- Rebuild for Python 3.6
Charalampos Stratakis 372bbc
- Disable tests for now
Charalampos Stratakis 372bbc
Igor Gnatenko df92b7
* Sat Dec 10 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 1.7.20-2
Igor Gnatenko df92b7
- Rebuild for gpgme 1.18
Igor Gnatenko df92b7
Tomas Mlcoch 13c4f6
* Thu Aug 25 2016 Tomas Mlcoch <tmlcoch@redhat.com> - 1.7.20-1
Tomas Mlcoch 13c4f6
- Tests: Disable test_download_packages_with_resume_02 test
Tomas Mlcoch 13c4f6
- Update build utils to match new fedora spec schema
Tomas Mlcoch 13c4f6
Tomas Mlcoch acd76f
* Wed Aug 24 2016 Tomas Mlcoch <tmlcoch@redhat.com> - 1.7.19-1
Tomas Mlcoch acd76f
- Add yumrecord substitution mechanism (mluscon)
Tomas Mlcoch acd76f
- Fix a memory leak in signature verification (cwalters)
Tomas Mlcoch acd76f
Igor Gnatenko 72804d
* Tue Aug 09 2016 Igor Gnatenko <ignatenko@redhat.com> - 1.7.18-4
Igor Gnatenko 72804d
- Add %%{?system_python_abi}
Igor Gnatenko 72804d
- Trim ton of changelog
Igor Gnatenko 72804d
Fedora Release Engineering 8d6e57
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.18-3
Fedora Release Engineering 8d6e57
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
Fedora Release Engineering 8d6e57
Igor Gnatenko 98638e
* Thu Apr 07 2016 Igor Gnatenko <ignatenko@redhat.com> - 1.7.18-2
Igor Gnatenko 98638e
- Adopt to new packaging guidelines
Igor Gnatenko 98638e
- Cleanups in spec file
Igor Gnatenko 98638e
Tomas Mlcoch 19670f
* Fri Mar  4 2016 Tomas Mlcoch <tmlcoch@redhat.com> - 1.7.18-1
Tomas Mlcoch 19670f
- Add new option LRO_FTPUSEEPSV
Tomas Mlcoch 19670f
- Update AUTHORS
Tomas Mlcoch 19670f
- downloader prepare_next_transfer(): simplify long line
Tomas Mlcoch 19670f
- downloader prepare_next_transfer(): add missing error check
Tomas Mlcoch 19670f
- downloader prepare_next_transfer(): cleanup error path
Tomas Mlcoch 19670f
- downloader prepare_next_transfer() - fix memory leak on error path (Alan Jenkins)
Tomas Mlcoch 19670f
- handle: Don't use proxy cache for downloads of metalink/mirrorlist
Tomas Mlcoch 19670f
- handle: Don't set CURLOPT_HTTPHEADER into curl handle immediately when specified
Tomas Mlcoch 19670f
- downloader: Implement logic for no_cache param in LrDownloadTarget (RhBug: 1297762)
Tomas Mlcoch 19670f
- Add no_cache param to LrDownloadTarget and lr_downloadtarget_new()
Tomas Mlcoch 19670f
- New test: always try to download from the fastest mirror (Alexander Todorov)
Tomas Mlcoch 19670f
- Doc: Fixed minor doc typo (Philippe Ombredanne)
Tomas Mlcoch 19670f
- Doc: Other updates
Tomas Mlcoch 19670f
- Doc: Update default values in doc to reflect reality