2017-06-26 15:06:07 +02:00
|
|
|
#
|
|
|
|
# spec file for package librepo
|
|
|
|
#
|
2018-09-18 18:04:43 +02:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2021-02-03 03:45:49 +01:00
|
|
|
# Copyright (c) 2020-2021 Neal Gompa <ngompa13@gmail.com>.
|
2017-06-26 15:06:07 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-09-18 18:04:43 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-06-26 15:06:07 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2019-05-11 04:38:54 +02:00
|
|
|
%ifarch %{arm} aarch64 riscv64
|
2019-05-10 16:57:13 +02:00
|
|
|
# Don't run tests on ARM and RISC-V for now. There are problems
|
|
|
|
# with performance on the builders and often these time out.
|
|
|
|
%bcond_with tests
|
|
|
|
%else
|
2019-02-03 19:10:44 +01:00
|
|
|
%bcond_without tests
|
2019-05-10 16:57:13 +02:00
|
|
|
%endif
|
2017-06-26 15:06:07 +02:00
|
|
|
|
2019-02-03 19:10:44 +01:00
|
|
|
# zchunk is only available in Leap 15.1 and newer
|
|
|
|
%if 0%{?sle_version} >= 150100 || 0%{?suse_version} >= 1550
|
|
|
|
%bcond_without zchunk
|
2019-12-14 23:20:02 +01:00
|
|
|
%else
|
|
|
|
%bcond_with zchunk
|
2019-02-03 19:10:44 +01:00
|
|
|
%endif
|
2017-06-26 15:06:07 +02:00
|
|
|
|
|
|
|
%define major 0
|
|
|
|
%define libname %{name}%{major}
|
|
|
|
%define devname %{name}-devel
|
|
|
|
|
|
|
|
Name: librepo
|
2021-02-03 03:45:49 +01:00
|
|
|
Version: 1.13.0
|
2017-06-26 15:06:07 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Repodata downloading library
|
2018-09-18 18:04:43 +02:00
|
|
|
License: LGPL-2.0-or-later
|
|
|
|
Group: Development/Libraries/C and C++
|
2017-06-26 15:06:07 +02:00
|
|
|
|
2018-09-13 13:26:25 +02:00
|
|
|
URL: https://github.com/rpm-software-management/librepo
|
2018-01-04 01:54:39 +01:00
|
|
|
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
2017-06-26 15:06:07 +02:00
|
|
|
|
|
|
|
BuildRequires: cmake
|
|
|
|
BuildRequires: doxygen
|
|
|
|
BuildRequires: gpgme-devel
|
2019-02-03 19:10:44 +01:00
|
|
|
BuildRequires: pkgconfig(check)
|
|
|
|
BuildRequires: pkgconfig(glib-2.0) >= 2.26.0
|
2021-02-03 03:45:49 +01:00
|
|
|
BuildRequires: pkgconfig(libcurl) >= 7.52.0
|
2019-02-03 19:10:44 +01:00
|
|
|
BuildRequires: pkgconfig(libxml-2.0)
|
|
|
|
BuildRequires: pkgconfig(libcrypto)
|
|
|
|
BuildRequires: pkgconfig(openssl)
|
|
|
|
%if %{with zchunk}
|
|
|
|
BuildRequires: pkgconfig(zck) >= 0.9.11
|
2017-06-26 15:06:07 +02:00
|
|
|
%endif
|
2019-02-03 19:10:44 +01:00
|
|
|
BuildRequires: python-rpm-macros
|
2017-06-26 15:06:07 +02:00
|
|
|
|
|
|
|
# prevent provides from nonstandard paths:
|
2019-02-03 19:10:44 +01:00
|
|
|
%global __provides_exclude ^(%{python3_sitearch}/.*\\.so)$
|
2017-06-26 15:06:07 +02:00
|
|
|
|
|
|
|
%description
|
2018-09-18 18:04:43 +02:00
|
|
|
A library providing C and Python (libcURL like) API for downloading repository
|
2017-06-26 15:06:07 +02:00
|
|
|
metadata.
|
|
|
|
|
|
|
|
%package -n %{libname}
|
2018-09-18 18:04:43 +02:00
|
|
|
Summary: Repodata downloading library
|
2017-06-26 15:06:07 +02:00
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n %{libname}
|
2018-09-18 18:04:43 +02:00
|
|
|
A library providing C and Python (libcURL like) API for downloading repository
|
|
|
|
metadata.
|
2017-06-26 15:06:07 +02:00
|
|
|
|
|
|
|
%package -n %{devname}
|
2018-09-18 18:04:43 +02:00
|
|
|
Summary: Header files for the Repodata downloading library
|
|
|
|
Group: Development/Libraries/C and C++
|
2017-06-26 15:06:07 +02:00
|
|
|
Requires: %{libname}%{?_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
%description -n %{devname}
|
2019-02-03 19:10:44 +01:00
|
|
|
This package provides the development files for %{name}.
|
2017-06-26 15:06:07 +02:00
|
|
|
|
|
|
|
%package -n python3-librepo
|
|
|
|
Summary: Python 3 bindings for the librepo library
|
2019-02-03 19:10:44 +01:00
|
|
|
Group: Development/Libraries/Python
|
2017-06-26 15:06:07 +02:00
|
|
|
BuildRequires: python3-devel
|
|
|
|
%if %{with tests}
|
2019-02-03 19:10:44 +01:00
|
|
|
BuildRequires: python3-gpg
|
2017-06-26 15:06:07 +02:00
|
|
|
BuildRequires: python3-Flask
|
|
|
|
BuildRequires: python3-nose
|
2019-05-10 16:26:12 +02:00
|
|
|
BuildRequires: python3-requests
|
2017-06-26 15:06:07 +02:00
|
|
|
%endif
|
|
|
|
BuildRequires: python3-Sphinx
|
|
|
|
BuildRequires: python3-xattr
|
|
|
|
Requires: %{libname}%{?_isa} = %{version}-%{release}
|
2019-02-03 20:26:13 +01:00
|
|
|
# There is no more Python 2 subpackage
|
|
|
|
Obsoletes: python2-librepo < 1.9.3
|
2017-06-26 15:06:07 +02:00
|
|
|
|
|
|
|
%description -n python3-librepo
|
2019-02-03 19:10:44 +01:00
|
|
|
This package provides the Python 3 bindings for the librepo library.
|
2017-06-26 15:06:07 +02:00
|
|
|
|
|
|
|
%prep
|
2018-09-13 13:26:25 +02:00
|
|
|
%autosetup -p1
|
2017-06-26 15:06:07 +02:00
|
|
|
|
|
|
|
%build
|
2019-02-03 19:10:44 +01:00
|
|
|
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPYTHON_DESIRED:str=3 %{!?with_zchunk:-DWITH_ZCHUNK=OFF}
|
|
|
|
%make_build
|
2017-06-26 15:06:07 +02:00
|
|
|
|
|
|
|
%check
|
|
|
|
%if %{with tests}
|
|
|
|
pushd ./build
|
|
|
|
make ARGS="-V" test
|
|
|
|
make clean
|
|
|
|
popd
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%install
|
|
|
|
pushd ./build
|
|
|
|
%make_install
|
|
|
|
popd
|
|
|
|
|
|
|
|
%post -n %{libname} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n %{libname} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files -n %{libname}
|
2019-02-03 19:10:44 +01:00
|
|
|
%doc README.md
|
|
|
|
%license COPYING
|
2017-06-26 15:06:07 +02:00
|
|
|
%{_libdir}/librepo.so.%{major}
|
|
|
|
|
|
|
|
%files -n %{devname}
|
|
|
|
%{_libdir}/librepo.so
|
|
|
|
%{_libdir}/pkgconfig/librepo.pc
|
|
|
|
%{_includedir}/librepo/
|
|
|
|
|
|
|
|
%files -n python3-librepo
|
|
|
|
%{python3_sitearch}/librepo
|
|
|
|
|
|
|
|
%changelog
|