|
|
ecf63f |
%global libname solv
|
|
|
ecf63f |
|
|
|
ecf63f |
%if 0%{?rhel} && 0%{?rhel} <= 7
|
|
|
ecf63f |
%bcond_with perl_bindings
|
|
|
ecf63f |
%bcond_with ruby_bindings
|
|
|
ecf63f |
%bcond_with python_bindings
|
|
|
ecf63f |
%if %{with python_bindings}
|
|
|
ecf63f |
%bcond_with python3
|
|
|
ecf63f |
%endif
|
|
|
ecf63f |
%else
|
|
|
ecf63f |
%bcond_without perl_bindings
|
|
|
ecf63f |
%bcond_without ruby_bindings
|
|
|
ecf63f |
%bcond_without python_bindings
|
|
|
ecf63f |
%if %{with python_bindings}
|
|
|
ecf63f |
%bcond_without python3
|
|
|
ecf63f |
%endif
|
|
|
ecf63f |
%endif
|
|
|
ecf63f |
%bcond_with debian_repo
|
|
|
ecf63f |
%bcond_with arch_repo
|
|
|
ecf63f |
%bcond_with helix_repo
|
|
|
ecf63f |
# Creates special prefixed pseudo-packages from appdata metadata
|
|
|
ecf63f |
%bcond_with appdata
|
|
|
ecf63f |
# Creates special prefixed "group:", "category:" pseudo-packages
|
|
|
ecf63f |
%bcond_without comps
|
|
|
ecf63f |
# For rich dependencies
|
|
|
ecf63f |
%bcond_without complex_deps
|
|
|
ecf63f |
# For handling deb + rpm at the same time
|
|
|
ecf63f |
%bcond_with multi_symantics
|
|
|
ecf63f |
|
|
|
ecf63f |
%global _cmake_opts \\\
|
|
|
ecf63f |
-DFEDORA=1 \\\
|
|
|
ecf63f |
-DENABLE_RPMDB=ON \\\
|
|
|
ecf63f |
-DENABLE_RPMDB_BYRPMHEADER=ON \\\
|
|
|
ecf63f |
-DENABLE_RPMMD=ON \\\
|
|
|
ecf63f |
%{?with_comps:-DENABLE_COMPS=ON} \\\
|
|
|
ecf63f |
%{?with_appdata:-DENABLE_APPDATA=ON} \\\
|
|
|
ecf63f |
-DUSE_VENDORDIRS=ON \\\
|
|
|
ecf63f |
-DENABLE_LZMA_COMPRESSION=ON \\\
|
|
|
ecf63f |
-DENABLE_BZIP2_COMPRESSION=ON \\\
|
|
|
ecf63f |
%{?with_debian_repo:-DENABLE_DEBIAN=ON} \\\
|
|
|
ecf63f |
%{?with_arch_repo:-DENABLE_ARCHREPO=ON} \\\
|
|
|
ecf63f |
%{?with_helix_repo:-DENABLE_HELIXREPO=ON} \\\
|
|
|
ecf63f |
%{?with_multi_symantics:-DMULTI_SYMANTICS=ON} \\\
|
|
|
ecf63f |
%{?with_complex_deps:-DENABLE_COMPLEX_DEPS=1} \\\
|
|
|
ecf63f |
%{nil}
|
|
|
ecf63f |
|
|
|
ecf63f |
Name: lib%{libname}
|
|
|
ecf63f |
Version: 0.6.20
|
|
|
ecf63f |
Release: 5%{?dist}
|
|
|
ecf63f |
Summary: Package dependency solver
|
|
|
ecf63f |
|
|
|
ecf63f |
License: BSD
|
|
|
ecf63f |
URL: https://github.com/openSUSE/libsolv
|
|
|
ecf63f |
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
|
|
ecf63f |
|
|
|
ecf63f |
# https://bugzilla.redhat.com/show_bug.cgi?id=1318662
|
|
|
ecf63f |
# https://github.com/openSUSE/libsolv/commit/599c58bed474c2a68109ff0649f1effa7ff02c45
|
|
|
ecf63f |
Patch0: 0001-Fix-order-of-solv_extend-arguments-in-repo_add_rpmmd.patch
|
|
|
ecf63f |
# https://bugzilla.redhat.com/show_bug.cgi?id=1325471
|
|
|
ecf63f |
# https://github.com/openSUSE/libsolv/commit/b1014a431541444bcd39c6ec83c1ec935c7f0aae
|
|
|
ecf63f |
Patch1: 0001-Fix-supplements-handling-when-implicitobsoleteusesco.patch
|
|
|
ecf63f |
|
|
|
ecf63f |
BuildRequires: cmake
|
|
|
ecf63f |
BuildRequires: gcc-c++
|
|
|
ecf63f |
BuildRequires: pkgconfig(rpm)
|
|
|
ecf63f |
BuildRequires: zlib-devel
|
|
|
ecf63f |
BuildRequires: expat-devel
|
|
|
ecf63f |
# -DFEDORA=1
|
|
|
ecf63f |
# -DENABLE_RPMDB=ON
|
|
|
ecf63f |
BuildRequires: libdb-devel
|
|
|
ecf63f |
# -DENABLE_LZMA_COMPRESSION=ON
|
|
|
83b9c6 |
BuildRequires: xz-devel
|
|
|
ecf63f |
# -DENABLE_BZIP2_COMPRESSION=ON
|
|
|
ecf63f |
BuildRequires: bzip2-devel
|
|
|
ecf63f |
|
|
|
83b9c6 |
%description
|
|
|
83b9c6 |
A free package dependency solver using a satisfiability algorithm. The
|
|
|
83b9c6 |
library is based on two major, but independent, blocks:
|
|
|
83b9c6 |
|
|
|
83b9c6 |
- Using a dictionary approach to store and retrieve package
|
|
|
83b9c6 |
and dependency information.
|
|
|
83b9c6 |
|
|
|
83b9c6 |
- Using satisfiability, a well known and researched topic, for
|
|
|
83b9c6 |
resolving package dependencies.
|
|
|
83b9c6 |
|
|
|
83b9c6 |
%package devel
|
|
|
ecf63f |
Summary: Development files for %{name}
|
|
|
ecf63f |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
ecf63f |
Requires: rpm-devel%{?_isa}
|
|
|
83b9c6 |
|
|
|
83b9c6 |
%description devel
|
|
|
ecf63f |
Development files for %{name}.
|
|
|
83b9c6 |
|
|
|
83b9c6 |
%package tools
|
|
|
ecf63f |
Summary: Package dependency solver tools
|
|
|
ecf63f |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
ecf63f |
Obsoletes: %{name}-test < 0.6.11-2
|
|
|
ecf63f |
# repo2solv dependencies. All of those are used in shell-script.
|
|
|
ecf63f |
Requires: /usr/bin/gzip
|
|
|
ecf63f |
Requires: /usr/bin/bzip2
|
|
|
ecf63f |
Requires: /usr/bin/lzma
|
|
|
ecf63f |
Requires: /usr/bin/xz
|
|
|
ecf63f |
Requires: /usr/bin/cat
|
|
|
ecf63f |
Requires: /usr/bin/find
|
|
|
83b9c6 |
|
|
|
83b9c6 |
%description tools
|
|
|
83b9c6 |
Package dependency solver tools.
|
|
|
83b9c6 |
|
|
|
83b9c6 |
%package demo
|
|
|
ecf63f |
Summary: Applications demoing the %{name} library
|
|
|
ecf63f |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
ecf63f |
# solv dependencies. Used as execlp() and system()
|
|
|
ecf63f |
Requires: /usr/bin/curl
|
|
|
ecf63f |
Requires: /usr/bin/gpg2
|
|
|
83b9c6 |
|
|
|
83b9c6 |
%description demo
|
|
|
ecf63f |
Applications demoing the %{name} library.
|
|
|
ecf63f |
|
|
|
ecf63f |
%if %{with perl_bindings}
|
|
|
ecf63f |
%package -n perl-%{libname}
|
|
|
ecf63f |
Summary: Perl bindings for the %{name} library
|
|
|
ecf63f |
BuildRequires: swig
|
|
|
ecf63f |
BuildRequires: perl-devel
|
|
|
ecf63f |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
ecf63f |
|
|
|
ecf63f |
%description -n perl-%{libname}
|
|
|
ecf63f |
Perl bindings for the %{name} library.
|
|
|
ecf63f |
%endif
|
|
|
ecf63f |
|
|
|
ecf63f |
%if %{with ruby_bindings}
|
|
|
ecf63f |
%package -n ruby-%{libname}
|
|
|
ecf63f |
Summary: Ruby bindings for the %{name} library
|
|
|
ecf63f |
BuildRequires: swig
|
|
|
ecf63f |
BuildRequires: ruby-devel
|
|
|
ecf63f |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
ecf63f |
|
|
|
ecf63f |
%description -n ruby-%{libname}
|
|
|
ecf63f |
Ruby bindings for the %{name} library.
|
|
|
ecf63f |
%endif
|
|
|
ecf63f |
|
|
|
ecf63f |
%if %{with python_bindings}
|
|
|
ecf63f |
%package -n python2-%{libname}
|
|
|
ecf63f |
Summary: Python bindings for the %{name} library
|
|
|
ecf63f |
%{?python_provide:%python_provide python2-%{libname}}
|
|
|
ecf63f |
BuildRequires: swig
|
|
|
ecf63f |
BuildRequires: python2-devel
|
|
|
ecf63f |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
ecf63f |
|
|
|
ecf63f |
%description -n python2-%{libname}
|
|
|
ecf63f |
Python bindings for the %{name} library.
|
|
|
ecf63f |
|
|
|
ecf63f |
Python 2 version.
|
|
|
ecf63f |
|
|
|
ecf63f |
%if %{with python3}
|
|
|
ecf63f |
%package -n python3-%{libname}
|
|
|
ecf63f |
Summary: Python bindings for the %{name} library
|
|
|
ecf63f |
%{?python_provide:%python_provide python3-%{libname}}
|
|
|
ecf63f |
BuildRequires: swig
|
|
|
ecf63f |
BuildRequires: python3-devel
|
|
|
ecf63f |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
ecf63f |
|
|
|
ecf63f |
%description -n python3-%{libname}
|
|
|
ecf63f |
Python bindings for the %{name} library.
|
|
|
ecf63f |
|
|
|
ecf63f |
Python 3 version.
|
|
|
ecf63f |
%endif
|
|
|
ecf63f |
%endif
|
|
|
83b9c6 |
|
|
|
ecf63f |
%prep
|
|
|
ecf63f |
%autosetup -p1
|
|
|
ecf63f |
mkdir build build-py2 build-py3
|
|
|
83b9c6 |
|
|
|
ecf63f |
%build
|
|
|
ecf63f |
pushd build
|
|
|
ecf63f |
%cmake %_cmake_opts ../ \
|
|
|
ecf63f |
%{?with_perl_bindings:-DENABLE_PERL=ON} \
|
|
|
ecf63f |
%{?with_ruby_bindings:-DENABLE_RUBY=ON} \
|
|
|
ecf63f |
%{nil}
|
|
|
ecf63f |
%make_build
|
|
|
ecf63f |
popd
|
|
|
ecf63f |
|
|
|
ecf63f |
%if %{with python_bindings}
|
|
|
ecf63f |
pushd build-py2
|
|
|
ecf63f |
%cmake %_cmake_opts ../ \
|
|
|
ecf63f |
-DENABLE_PYTHON=ON \
|
|
|
ecf63f |
-DPythonLibs_FIND_VERSION=2 \
|
|
|
ecf63f |
-DPythonLibs_FIND_VERSION_MAJOR=2 \
|
|
|
ecf63f |
%{nil}
|
|
|
ecf63f |
make %{?_smp_mflags} bindings_python
|
|
|
ecf63f |
popd
|
|
|
ecf63f |
|
|
|
ecf63f |
%if %{with python3}
|
|
|
ecf63f |
pushd build-py3
|
|
|
ecf63f |
%cmake %_cmake_opts ../ \
|
|
|
ecf63f |
-DENABLE_PYTHON=ON \
|
|
|
ecf63f |
-DPythonLibs_FIND_VERSION=3 \
|
|
|
ecf63f |
-DPythonLibs_FIND_VERSION_MAJOR=3 \
|
|
|
ecf63f |
%{nil}
|
|
|
ecf63f |
make %{?_smp_mflags} bindings_python
|
|
|
ecf63f |
popd
|
|
|
ecf63f |
%endif
|
|
|
ecf63f |
%endif
|
|
|
83b9c6 |
|
|
|
ecf63f |
%install
|
|
|
ecf63f |
pushd build
|
|
|
ecf63f |
%make_install
|
|
|
ecf63f |
popd
|
|
|
83b9c6 |
|
|
|
ecf63f |
%if %{with python_bindings}
|
|
|
ecf63f |
pushd build-py2
|
|
|
ecf63f |
%make_install
|
|
|
ecf63f |
popd
|
|
|
83b9c6 |
|
|
|
ecf63f |
%if %{with python3}
|
|
|
ecf63f |
pushd build-py3
|
|
|
ecf63f |
%make_install
|
|
|
ecf63f |
popd
|
|
|
ecf63f |
%endif
|
|
|
ecf63f |
%endif
|
|
|
83b9c6 |
|
|
|
ecf63f |
mv %{buildroot}%{_bindir}/repo2solv.sh %{buildroot}%{_bindir}/repo2solv
|
|
|
83b9c6 |
|
|
|
ecf63f |
%check
|
|
|
ecf63f |
pushd build
|
|
|
ecf63f |
ctest -VV
|
|
|
ecf63f |
popd
|
|
|
83b9c6 |
|
|
|
83b9c6 |
%post -p /sbin/ldconfig
|
|
|
83b9c6 |
|
|
|
83b9c6 |
%postun -p /sbin/ldconfig
|
|
|
83b9c6 |
|
|
|
83b9c6 |
%files
|
|
|
ecf63f |
%license LICENSE*
|
|
|
ecf63f |
%doc README
|
|
|
ecf63f |
%{_libdir}/%{name}.so.*
|
|
|
ecf63f |
%{_libdir}/%{name}ext.so.*
|
|
|
83b9c6 |
|
|
|
83b9c6 |
%files devel
|
|
|
ecf63f |
%{_libdir}/%{name}.so
|
|
|
ecf63f |
%{_libdir}/%{name}ext.so
|
|
|
ecf63f |
%{_includedir}/%{libname}/
|
|
|
ecf63f |
%{_libdir}/pkgconfig/%{name}.pc
|
|
|
ecf63f |
# Own directory because we don't want to depend on cmake
|
|
|
ecf63f |
%dir %{_datadir}/cmake/Modules/
|
|
|
ecf63f |
%{_datadir}/cmake/Modules/FindLibSolv.cmake
|
|
|
ecf63f |
%{_mandir}/man3/%{name}*.3*
|
|
|
ecf63f |
|
|
|
ecf63f |
# Some small macro to list tools with mans
|
|
|
ecf63f |
%global solv_tool() \
|
|
|
ecf63f |
%{_bindir}/%{1}\
|
|
|
ecf63f |
%{_mandir}/man1/%{1}.1*
|
|
|
83b9c6 |
|
|
|
ecf63f |
%files tools
|
|
|
ecf63f |
%solv_tool deltainfoxml2solv
|
|
|
ecf63f |
%solv_tool dumpsolv
|
|
|
ecf63f |
%solv_tool installcheck
|
|
|
ecf63f |
%solv_tool mergesolv
|
|
|
ecf63f |
%solv_tool repomdxml2solv
|
|
|
ecf63f |
%solv_tool rpmdb2solv
|
|
|
ecf63f |
%solv_tool rpmmd2solv
|
|
|
ecf63f |
%solv_tool rpms2solv
|
|
|
ecf63f |
%solv_tool testsolv
|
|
|
ecf63f |
%solv_tool updateinfoxml2solv
|
|
|
ecf63f |
%if %{with comps}
|
|
|
ecf63f |
%solv_tool comps2solv
|
|
|
ecf63f |
%endif
|
|
|
ecf63f |
%if %{with appdata}
|
|
|
ecf63f |
%solv_tool appdata2solv
|
|
|
ecf63f |
%endif
|
|
|
ecf63f |
%if %{with debian_repo}
|
|
|
ecf63f |
%solv_tool deb2solv
|
|
|
ecf63f |
%endif
|
|
|
ecf63f |
%if %{with arch_repo}
|
|
|
ecf63f |
%solv_tool archpkgs2solv
|
|
|
ecf63f |
%solv_tool archrepo2solv
|
|
|
ecf63f |
%endif
|
|
|
ecf63f |
%if %{with helix_repo}
|
|
|
ecf63f |
%solv_tool helix2solv
|
|
|
ecf63f |
%endif
|
|
|
ecf63f |
%{_bindir}/repo2solv
|
|
|
83b9c6 |
|
|
|
ecf63f |
%files demo
|
|
|
ecf63f |
%{_bindir}/solv
|
|
|
ecf63f |
|
|
|
ecf63f |
%if %{with perl_bindings}
|
|
|
ecf63f |
%files -n perl-%{libname}
|
|
|
ecf63f |
%{perl_vendorarch}/%{libname}.pm
|
|
|
ecf63f |
%{perl_vendorarch}/%{libname}.so
|
|
|
ecf63f |
%endif
|
|
|
ecf63f |
|
|
|
ecf63f |
%if %{with ruby_bindings}
|
|
|
ecf63f |
%files -n ruby-%{libname}
|
|
|
ecf63f |
%{ruby_vendorarchdir}/%{libname}.so
|
|
|
ecf63f |
%endif
|
|
|
ecf63f |
|
|
|
ecf63f |
%if %{with python_bindings}
|
|
|
ecf63f |
%files -n python2-%{libname}
|
|
|
ecf63f |
%{python2_sitearch}/_%{libname}.so
|
|
|
ecf63f |
%{python2_sitearch}/%{libname}.py*
|
|
|
ecf63f |
|
|
|
ecf63f |
%if %{with python3}
|
|
|
ecf63f |
%files -n python3-%{libname}
|
|
|
ecf63f |
%{python3_sitearch}/_%{libname}.so
|
|
|
ecf63f |
%{python3_sitearch}/%{libname}.py
|
|
|
ecf63f |
%{python3_sitearch}/__pycache__/%{libname}.*
|
|
|
ecf63f |
%endif
|
|
|
ecf63f |
%endif
|
|
|
83b9c6 |
|
|
|
83b9c6 |
%changelog
|
|
|
ecf63f |
* Tue Jul 12 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.6.20-5
|
|
|
ecf63f |
- Make obsoletes non-architecture dependent (RHBZ #1354479)
|
|
|
83b9c6 |
|
|
|
ecf63f |
* Tue May 31 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.6.20-4
|
|
|
ecf63f |
- Properly obsolete -test subpkg
|
|
|
83b9c6 |
|
|
|
ecf63f |
* Mon May 30 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.6.20-3
|
|
|
ecf63f |
- Rebase to 0.6.20 with 2 critical patches (RHBZ #1334401)
|
|
|
83b9c6 |
|
|
|
ecf63f |
* Wed Jun 3 2015 Jan Silhan <jsilhan@redhat.com> - 0.6.11-1
|
|
|
ecf63f |
- initial package for RHEL 7.2 without unnecessary bindings
|