2011-10-19 11:10:00 +02:00
|
|
|
#
|
|
|
|
# spec file for package libsolv
|
|
|
|
#
|
2020-02-07 09:10:30 +01:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2011-10-19 11:10:00 +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-17 16:53:35 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-10-19 11:10:00 +02:00
|
|
|
#
|
|
|
|
|
2013-07-04 14:28:11 +02:00
|
|
|
|
2018-10-26 13:29:25 +02:00
|
|
|
%define libname libsolv1
|
2011-07-18 16:22:02 +02:00
|
|
|
|
2018-07-18 14:51:36 +02:00
|
|
|
%if 0%{?sle_version} >= 120300 || 0%{?suse_version} >= 1330 || !0%{?suse_version}
|
2017-05-30 10:41:51 +02:00
|
|
|
%bcond_without bz2
|
|
|
|
%bcond_without xz
|
|
|
|
%else
|
|
|
|
%bcond_with bz2
|
|
|
|
%bcond_with xz
|
2018-07-18 15:35:27 +02:00
|
|
|
%endif
|
2018-09-10 12:04:55 +02:00
|
|
|
%if 0%{?is_opensuse} && (0%{?sle_version} >= 150000 || 0%{?suse_version} >= 1500)
|
2018-07-18 15:35:27 +02:00
|
|
|
%bcond_without zstd
|
|
|
|
%else
|
2018-07-17 17:21:10 +02:00
|
|
|
%bcond_with zstd
|
2017-05-30 10:41:51 +02:00
|
|
|
%endif
|
|
|
|
%if 0%{?fedora} || 0%{?rhel} >= 7 || 0%{?mageia} >= 6 || 0%{?suse_version} >= 1330
|
|
|
|
%bcond_without richdeps
|
|
|
|
%else
|
|
|
|
%bcond_with richdeps
|
|
|
|
%endif
|
2018-07-18 17:18:28 +02:00
|
|
|
# we need at least swig 1.3.40 for the bindings ($typemap support)
|
2018-07-18 15:45:40 +02:00
|
|
|
%if 0%{?suse_version} != 1110
|
2018-07-18 14:51:36 +02:00
|
|
|
%bcond_without python3
|
2018-07-18 17:18:28 +02:00
|
|
|
%bcond_without python
|
|
|
|
%bcond_without ruby
|
|
|
|
%bcond_without perl
|
2018-07-18 15:45:40 +02:00
|
|
|
%else
|
|
|
|
%bcond_with python3
|
2018-07-18 17:18:28 +02:00
|
|
|
%bcond_with python
|
2018-07-18 22:03:03 +02:00
|
|
|
%bcond_with ruby
|
|
|
|
%bcond_with perl
|
2018-07-18 17:18:28 +02:00
|
|
|
%endif
|
2018-07-18 14:51:36 +02:00
|
|
|
%bcond_without static
|
|
|
|
%bcond_with shared
|
|
|
|
%bcond_with zypp
|
2017-05-30 10:41:51 +02:00
|
|
|
|
2018-07-18 14:51:36 +02:00
|
|
|
Name: libsolv
|
2020-01-22 14:05:13 +01:00
|
|
|
Version: 0.7.11
|
2018-07-18 14:51:36 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Package dependency solver using a satisfiability algorithm
|
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: Development/Libraries/C and C++
|
2020-02-07 09:10:30 +01:00
|
|
|
URL: https://github.com/openSUSE/libsolv
|
2018-07-18 14:51:36 +02:00
|
|
|
Source: libsolv-%{version}.tar.bz2
|
2012-02-02 15:18:52 +01:00
|
|
|
BuildRequires: cmake
|
|
|
|
BuildRequires: gcc-c++
|
2018-07-18 14:51:36 +02:00
|
|
|
BuildRequires: libxml2-devel
|
2012-02-02 15:18:52 +01:00
|
|
|
BuildRequires: rpm-devel
|
2011-07-18 16:22:02 +02:00
|
|
|
BuildRequires: zlib-devel
|
2018-07-18 14:51:36 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2011-07-18 16:22:02 +02:00
|
|
|
|
2018-07-18 14:51:36 +02:00
|
|
|
%if 0%{?fedora} || 0%{?rhel} >= 6 || 0%{?mageia}
|
|
|
|
BuildRequires: db-devel
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{with perl}
|
2012-02-02 15:18:52 +01:00
|
|
|
BuildRequires: perl
|
2017-05-30 10:41:51 +02:00
|
|
|
%if 0%{?fedora} || 0%{?rhel} >= 6 || 0%{?mageia}
|
2012-02-02 15:18:52 +01:00
|
|
|
BuildRequires: perl-devel
|
2011-07-18 17:10:16 +02:00
|
|
|
%endif
|
2012-02-02 15:18:52 +01:00
|
|
|
BuildRequires: swig
|
2011-07-18 16:22:02 +02:00
|
|
|
%endif
|
2017-05-30 11:08:21 +02:00
|
|
|
|
2018-07-18 14:51:36 +02:00
|
|
|
%if %{with ruby}
|
2015-05-05 17:44:18 +02:00
|
|
|
%global ruby_vendorarch %(ruby -r rbconfig -e "puts RbConfig::CONFIG['vendorarchdir'].nil? ? RbConfig::CONFIG['sitearchdir'] : RbConfig::CONFIG['vendorarchdir']")
|
2012-02-02 15:18:52 +01:00
|
|
|
BuildRequires: ruby
|
|
|
|
BuildRequires: ruby-devel
|
|
|
|
BuildRequires: swig
|
2011-07-18 16:22:02 +02:00
|
|
|
%endif
|
2017-05-30 11:08:21 +02:00
|
|
|
|
2018-07-18 14:51:36 +02:00
|
|
|
%if %{with python}
|
2016-11-08 15:29:26 +01:00
|
|
|
%global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(True))")
|
2012-02-02 15:18:52 +01:00
|
|
|
BuildRequires: python-devel
|
|
|
|
BuildRequires: swig
|
2011-07-18 16:22:02 +02:00
|
|
|
%endif
|
2017-05-30 11:08:21 +02:00
|
|
|
|
2018-07-18 14:51:36 +02:00
|
|
|
%if %{with python3}
|
2016-11-08 15:29:26 +01:00
|
|
|
%global python3_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(True))")
|
2016-11-08 13:56:49 +01:00
|
|
|
BuildRequires: python3-devel
|
2018-07-18 14:51:36 +02:00
|
|
|
BuildRequires: swig
|
2016-11-08 13:56:49 +01:00
|
|
|
%endif
|
2011-07-18 16:22:02 +02:00
|
|
|
|
2017-05-30 10:41:51 +02:00
|
|
|
%if %{with bz2}
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
BuildRequires: libbz2-devel
|
2017-05-30 11:08:21 +02:00
|
|
|
%else
|
|
|
|
BuildRequires: bzip2-devel
|
2017-05-30 10:41:51 +02:00
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{with xz}
|
|
|
|
BuildRequires: xz-devel
|
|
|
|
%endif
|
|
|
|
|
2018-07-17 17:21:10 +02:00
|
|
|
%if %{with zstd}
|
|
|
|
BuildRequires: libzstd-devel
|
|
|
|
%endif
|
|
|
|
|
2011-07-18 16:22:02 +02:00
|
|
|
%description
|
2017-10-24 14:46:33 +02:00
|
|
|
libsolv is a library for solving packages and reading repositories.
|
|
|
|
The solver uses a satisfiability algorithm.
|
2011-07-18 16:22:02 +02:00
|
|
|
|
2018-07-18 14:51:36 +02:00
|
|
|
%if %{with shared}
|
|
|
|
%package -n %{libname}
|
2017-10-24 14:46:33 +02:00
|
|
|
Summary: Package dependency solver using a satisfiability algorithm
|
|
|
|
Group: System/Libraries
|
2011-07-18 16:22:02 +02:00
|
|
|
|
2018-07-18 14:51:36 +02:00
|
|
|
%description -n %{libname}
|
2017-10-24 14:46:33 +02:00
|
|
|
libsolv is a library for solving packages and reading repositories.
|
|
|
|
It consists of two central blocks: Using a dictionary approach to
|
|
|
|
store and retrieve package and dependency information, and, using a
|
|
|
|
so-called satisfiability algorithm for resolving package
|
|
|
|
dependencies.
|
2011-07-18 16:22:02 +02:00
|
|
|
|
|
|
|
%endif
|
|
|
|
%package devel
|
2017-10-24 14:46:33 +02:00
|
|
|
Summary: Development files for libsolv, a package solver
|
2011-07-18 16:22:02 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
2018-07-18 14:51:36 +02:00
|
|
|
%if %{with shared}
|
|
|
|
Requires: %{libname} = %version
|
2011-07-18 16:22:02 +02:00
|
|
|
%endif
|
|
|
|
Requires: rpm-devel
|
2013-06-18 11:56:20 +02:00
|
|
|
Conflicts: libsatsolver-devel
|
2011-07-18 16:22:02 +02:00
|
|
|
|
|
|
|
%description devel
|
2017-10-24 14:46:33 +02:00
|
|
|
Development files for libsolv, a library for solving packages and
|
|
|
|
reading repositories.
|
2011-07-18 16:22:02 +02:00
|
|
|
|
|
|
|
%package tools
|
2017-10-24 14:46:33 +02:00
|
|
|
Summary: Utilities to work with .solv files
|
|
|
|
Group: System/Management
|
2018-07-18 14:51:36 +02:00
|
|
|
Conflicts: satsolver-tools-obsolete
|
2011-10-13 11:04:11 +02:00
|
|
|
Obsoletes: satsolver-tools < 0.18
|
|
|
|
Provides: satsolver-tools = 0.18
|
2011-07-18 16:22:02 +02:00
|
|
|
|
|
|
|
%description tools
|
2017-10-24 14:46:33 +02:00
|
|
|
libsolv is a library for solving packages and reading repositories.
|
|
|
|
|
|
|
|
This subpackage contains utilities to create and work with the .solv
|
|
|
|
files used by libsolv.
|
2011-07-18 16:22:02 +02:00
|
|
|
|
|
|
|
%package demo
|
|
|
|
Summary: Applications demoing the libsolv library
|
|
|
|
Group: System/Management
|
|
|
|
Requires: curl
|
2018-07-18 14:51:36 +02:00
|
|
|
Conflicts: libsatsolver-demo
|
2017-05-30 10:41:51 +02:00
|
|
|
%if 0%{?fedora} || 0%{?rhel} >= 6 || 0%{?mageia}
|
2011-07-18 16:22:02 +02:00
|
|
|
Requires: gnupg2
|
|
|
|
%endif
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
Requires: gpg2
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description demo
|
|
|
|
Applications demoing the libsolv library.
|
|
|
|
|
|
|
|
%package -n ruby-solv
|
|
|
|
Summary: Ruby bindings for the libsolv library
|
|
|
|
Group: Development/Languages/Ruby
|
|
|
|
|
|
|
|
%description -n ruby-solv
|
2017-10-24 14:46:33 +02:00
|
|
|
Ruby bindings for libsolv.
|
2011-07-18 16:22:02 +02:00
|
|
|
|
|
|
|
%package -n python-solv
|
2018-07-18 14:51:36 +02:00
|
|
|
%if 0%{?py_requires:1} && %{with python}
|
2011-07-18 16:22:02 +02:00
|
|
|
%py_requires
|
2011-07-18 16:53:20 +02:00
|
|
|
%endif
|
2011-07-18 16:22:02 +02:00
|
|
|
Summary: Python bindings for the libsolv library
|
|
|
|
Group: Development/Languages/Python
|
|
|
|
|
|
|
|
%description -n python-solv
|
2017-10-24 14:46:33 +02:00
|
|
|
Python bindings for libsolv.
|
2011-07-18 16:22:02 +02:00
|
|
|
|
2016-11-08 13:56:49 +01:00
|
|
|
%package -n python3-solv
|
|
|
|
Summary: Python3 bindings for the libsolv library
|
|
|
|
Group: Development/Languages/Python
|
|
|
|
|
|
|
|
%description -n python3-solv
|
2017-10-24 14:46:33 +02:00
|
|
|
Python3 bindings for libsolv.
|
2016-11-08 13:56:49 +01:00
|
|
|
|
2011-07-18 16:22:02 +02:00
|
|
|
%package -n perl-solv
|
|
|
|
Summary: Perl bindings for the libsolv library
|
|
|
|
Group: Development/Languages/Perl
|
2018-07-18 14:51:36 +02:00
|
|
|
Requires: perl = %{perl_version}
|
2011-07-18 16:22:02 +02:00
|
|
|
|
|
|
|
%description -n perl-solv
|
2017-10-24 14:46:33 +02:00
|
|
|
Perl bindings for libsolv.
|
2011-07-18 16:22:02 +02:00
|
|
|
|
|
|
|
%prep
|
2018-07-18 14:51:36 +02:00
|
|
|
%setup -q
|
2011-07-18 16:22:02 +02:00
|
|
|
|
|
|
|
%build
|
2019-10-14 12:11:34 +02:00
|
|
|
%global _lto_cflags %{?_lto_cflags} -ffat-lto-objects
|
2017-10-24 14:46:33 +02:00
|
|
|
export CFLAGS="%{optflags}"
|
2011-07-18 16:22:02 +02:00
|
|
|
export CXXFLAGS="$CFLAGS"
|
|
|
|
|
|
|
|
CMAKE_FLAGS=
|
2017-05-30 10:41:51 +02:00
|
|
|
%if 0%{?fedora} || 0%{?rhel} >= 6
|
2018-07-18 14:51:36 +02:00
|
|
|
CMAKE_FLAGS="-DFEDORA=1"
|
2017-05-30 10:41:51 +02:00
|
|
|
%endif
|
|
|
|
%if 0%{?mageia}
|
2018-07-18 14:51:36 +02:00
|
|
|
CMAKE_FLAGS="-DMAGEIA=1"
|
2011-07-18 16:22:02 +02:00
|
|
|
%endif
|
2012-04-11 16:01:03 +02:00
|
|
|
%if 0%{?suse_version}
|
2019-12-19 16:40:53 +01:00
|
|
|
CMAKE_FLAGS="-DSUSE=1"
|
2012-04-11 16:01:03 +02:00
|
|
|
%endif
|
2011-07-18 16:22:02 +02:00
|
|
|
|
2019-01-30 15:49:29 +01:00
|
|
|
cmake . $CMAKE_FLAGS \
|
2011-07-18 16:22:02 +02:00
|
|
|
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
|
|
|
-DLIB=%{_lib} \
|
|
|
|
-DCMAKE_VERBOSE_MAKEFILE=TRUE \
|
2012-01-20 16:34:18 +01:00
|
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
2017-02-28 15:12:43 +01:00
|
|
|
-DWITH_LIBXML2=1 \
|
2018-07-18 14:51:36 +02:00
|
|
|
-DENABLE_APPDATA=1 \
|
|
|
|
-DENABLE_COMPS=1 \
|
|
|
|
%{?with_static:-DENABLE_STATIC=1} \
|
|
|
|
%{!?with_shared:-DDISABLE_SHARED=1} \
|
|
|
|
%{?with_perl:-DENABLE_PERL=1} \
|
|
|
|
%{?with_python:-DENABLE_PYTHON=1} \
|
|
|
|
%{?with_python3:-DENABLE_PYTHON3=1} \
|
|
|
|
%{?with_ruby:-DENABLE_RUBY=1} \
|
2017-05-30 10:41:51 +02:00
|
|
|
%{?with_bz2:-DENABLE_BZIP2_COMPRESSION=1} \
|
|
|
|
%{?with_xz:-DENABLE_LZMA_COMPRESSION=1} \
|
2018-07-17 17:21:10 +02:00
|
|
|
%{?with_zstd:-DENABLE_ZSTD_COMPRESSION=1} \
|
|
|
|
%{?with_zstd:-DENABLE_ZCHUNK_COMPRESSION=1} \
|
2017-05-30 10:41:51 +02:00
|
|
|
%{?with_richdeps:-DENABLE_COMPLEX_DEPS=1} \
|
2013-04-23 11:27:09 +02:00
|
|
|
%{?with_zypp:-DENABLE_SUSEREPO=1 -DENABLE_HELIXREPO=1} \
|
2011-07-18 16:22:02 +02:00
|
|
|
-DUSE_VENDORDIRS=1 \
|
2011-10-06 14:26:59 +02:00
|
|
|
-DCMAKE_SKIP_RPATH=1
|
2017-05-30 10:41:51 +02:00
|
|
|
make %{?_smp_mflags}
|
2011-07-18 16:22:02 +02:00
|
|
|
|
|
|
|
%install
|
2017-10-24 14:46:33 +02:00
|
|
|
make DESTDIR=%{buildroot} install
|
2018-07-17 17:21:10 +02:00
|
|
|
ln -s repo2solv %{buildroot}/%{_bindir}/repo2solv.sh
|
|
|
|
|
2011-07-18 17:34:26 +02:00
|
|
|
%if 0%{?suse_version}
|
2018-07-18 14:51:36 +02:00
|
|
|
%if %{with python}
|
|
|
|
%py_compile -O %{buildroot}/%{python_sitearch}
|
2011-07-18 16:22:02 +02:00
|
|
|
%endif
|
2018-07-18 14:51:36 +02:00
|
|
|
%if %{with python3}
|
2017-10-24 14:46:33 +02:00
|
|
|
%py3_compile %{buildroot}/%{python3_sitearch}
|
2016-11-08 13:56:49 +01:00
|
|
|
%endif
|
2011-07-18 17:34:26 +02:00
|
|
|
%endif
|
2011-07-18 16:22:02 +02:00
|
|
|
|
2018-07-18 14:51:36 +02:00
|
|
|
%check
|
|
|
|
make ARGS=--output-on-failure test
|
|
|
|
|
|
|
|
%if %{with shared}
|
|
|
|
%post -n %{libname} -p /sbin/ldconfig
|
2011-07-18 16:22:02 +02:00
|
|
|
|
2018-07-18 14:51:36 +02:00
|
|
|
%postun -n %{libname} -p /sbin/ldconfig
|
2011-07-18 16:22:02 +02:00
|
|
|
|
2018-07-18 14:51:36 +02:00
|
|
|
%files -n %{libname}
|
2011-07-18 16:22:02 +02:00
|
|
|
%defattr(-,root,root)
|
2018-02-28 16:30:50 +01:00
|
|
|
%license LICENSE*
|
2011-10-06 14:26:59 +02:00
|
|
|
%{_libdir}/libsolv.so.*
|
|
|
|
%{_libdir}/libsolvext.so.*
|
2011-07-18 16:22:02 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%files tools
|
|
|
|
%defattr(-,root,root)
|
2012-03-20 11:19:36 +01:00
|
|
|
%if 0%{?suse_version}
|
2011-10-06 14:26:59 +02:00
|
|
|
%exclude %{_bindir}/helix2solv
|
2014-09-25 17:12:03 +02:00
|
|
|
%exclude %{_mandir}/man1/helix2solv*
|
2012-03-20 11:19:36 +01:00
|
|
|
%endif
|
2018-07-19 16:02:01 +02:00
|
|
|
%exclude %{_mandir}/man1/solv.1*
|
2011-10-06 14:26:59 +02:00
|
|
|
%exclude %{_bindir}/solv
|
|
|
|
%{_bindir}/*
|
2014-09-22 18:44:54 +02:00
|
|
|
%{_mandir}/man1/*
|
2011-07-18 16:22:02 +02:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
2018-07-18 14:51:36 +02:00
|
|
|
%if %{with static}
|
2011-10-10 18:39:48 +02:00
|
|
|
%{_libdir}/libsolv.a
|
|
|
|
%{_libdir}/libsolvext.a
|
|
|
|
%endif
|
2018-07-18 14:51:36 +02:00
|
|
|
%if %{with shared}
|
2011-10-06 14:26:59 +02:00
|
|
|
%{_libdir}/libsolv.so
|
|
|
|
%{_libdir}/libsolvext.so
|
2011-10-10 18:39:48 +02:00
|
|
|
%endif
|
2011-10-06 14:26:59 +02:00
|
|
|
%{_includedir}/solv
|
2012-03-20 11:19:36 +01:00
|
|
|
%if 0%{?suse_version}
|
2011-10-06 14:26:59 +02:00
|
|
|
%{_bindir}/helix2solv
|
2014-09-25 17:12:03 +02:00
|
|
|
%{_mandir}/man1/helix2solv*
|
2012-03-20 11:19:36 +01:00
|
|
|
%endif
|
2011-10-06 14:26:59 +02:00
|
|
|
%{_datadir}/cmake/Modules/*
|
2017-02-16 11:46:54 +01:00
|
|
|
%{_libdir}/pkgconfig/libsolv*.pc
|
2014-09-22 18:44:54 +02:00
|
|
|
%{_mandir}/man3/*
|
2011-07-18 16:22:02 +02:00
|
|
|
|
|
|
|
%files demo
|
|
|
|
%defattr(-,root,root)
|
2011-10-06 14:26:59 +02:00
|
|
|
%{_bindir}/solv
|
2018-07-19 16:02:01 +02:00
|
|
|
%{_mandir}/man1/solv.1*
|
2011-07-18 16:22:02 +02:00
|
|
|
|
2018-07-18 14:51:36 +02:00
|
|
|
%if %{with perl}
|
2011-07-18 16:22:02 +02:00
|
|
|
%files -n perl-solv
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{perl_vendorarch}/*
|
|
|
|
%endif
|
|
|
|
|
2018-07-18 14:51:36 +02:00
|
|
|
%if %{with ruby}
|
2011-07-18 16:22:02 +02:00
|
|
|
%files -n ruby-solv
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{ruby_vendorarch}/*
|
|
|
|
%endif
|
|
|
|
|
2018-07-18 14:51:36 +02:00
|
|
|
%if %{with python}
|
2011-07-18 16:22:02 +02:00
|
|
|
%files -n python-solv
|
|
|
|
%defattr(-,root,root)
|
2011-07-18 17:34:26 +02:00
|
|
|
%{python_sitearch}/*
|
2011-07-18 16:22:02 +02:00
|
|
|
%endif
|
|
|
|
|
2018-07-18 14:51:36 +02:00
|
|
|
%if %{with python3}
|
2016-11-08 13:56:49 +01:00
|
|
|
%files -n python3-solv
|
|
|
|
%defattr(-,root,root)
|
2016-11-08 15:29:26 +01:00
|
|
|
%{python3_sitearch}/*solv*
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
%{python3_sitearch}/*/*solv*
|
|
|
|
%endif
|
2016-11-08 13:56:49 +01:00
|
|
|
%endif
|
|
|
|
|
2011-07-18 16:22:02 +02:00
|
|
|
%changelog
|