Blame SPECS/libsolv.spec

662e5a
%global libname solv
662e5a
fe5762
%bcond_without python2_bindings
662e5a
%if 0%{?rhel} && 0%{?rhel} <= 7
662e5a
%bcond_with perl_bindings
662e5a
%bcond_with ruby_bindings
fe5762
%bcond_with python3_bindings
662e5a
%else
662e5a
%bcond_without perl_bindings
662e5a
%bcond_without ruby_bindings
fe5762
%bcond_without python3_bindings
662e5a
%endif
662e5a
# Creates special prefixed pseudo-packages from appdata metadata
662e5a
%bcond_with appdata
662e5a
# Creates special prefixed "group:", "category:" pseudo-packages
662e5a
%bcond_without comps
662e5a
# For rich dependencies
662e5a
%bcond_without complex_deps
3bedc5
%if 0%{?rhel}
3bedc5
%bcond_with helix_repo
3bedc5
%bcond_with suse_repo
3bedc5
%bcond_with debian_repo
3bedc5
%bcond_with arch_repo
3bedc5
# For handling deb + rpm at the same time
3bedc5
%bcond_with multi_semantics
3bedc5
%else
3bedc5
%bcond_without helix_repo
3bedc5
%bcond_without suse_repo
3bedc5
%bcond_without debian_repo
3bedc5
%bcond_without arch_repo
662e5a
# For handling deb + rpm at the same time
3bedc5
%bcond_without multi_semantics
3bedc5
%endif
662e5a
662e5a
Name:           lib%{libname}
fe5762
Version:        0.6.34
6c6f93
Release:        4%{?dist}
662e5a
Summary:        Package dependency solver
662e5a
662e5a
License:        BSD
662e5a
URL:            https://github.com/openSUSE/libsolv
662e5a
Source0:        %{url}/archive/%{version}/%{name}-%{version}.tar.gz
6c6f93
Patch0001:      0001-Make-sure-that-targeted-updates-dont-do-reinstalls.patch
6c6f93
Patch0002:      0002-Fix-testsolv-segfault.patch
6c6f93
Patch0003:      0003-Fix-testsolv-segfaults.patch
662e5a
662e5a
BuildRequires:  cmake
662e5a
BuildRequires:  gcc-c++
662e5a
BuildRequires:  pkgconfig(rpm)
662e5a
BuildRequires:  zlib-devel
662e5a
BuildRequires:  expat-devel
662e5a
# -DFEDORA=1
662e5a
# -DENABLE_RPMDB=ON
662e5a
BuildRequires:  libdb-devel
662e5a
# -DENABLE_LZMA_COMPRESSION=ON
0fa97a
BuildRequires:  xz-devel
662e5a
# -DENABLE_BZIP2_COMPRESSION=ON
662e5a
BuildRequires:  bzip2-devel
662e5a
0fa97a
%description
0fa97a
A free package dependency solver using a satisfiability algorithm. The
0fa97a
library is based on two major, but independent, blocks:
0fa97a
0fa97a
- Using a dictionary approach to store and retrieve package
0fa97a
  and dependency information.
0fa97a
0fa97a
- Using satisfiability, a well known and researched topic, for
0fa97a
  resolving package dependencies.
0fa97a
0fa97a
%package devel
662e5a
Summary:        Development files for %{name}
662e5a
Requires:       %{name}%{?_isa} = %{version}-%{release}
662e5a
Requires:       rpm-devel%{?_isa}
0fa97a
0fa97a
%description devel
662e5a
Development files for %{name}.
0fa97a
0fa97a
%package tools
662e5a
Summary:        Package dependency solver tools
662e5a
Requires:       %{name}%{?_isa} = %{version}-%{release}
662e5a
Obsoletes:      %{name}-test < 0.6.11-2
662e5a
# repo2solv dependencies. All of those are used in shell-script.
3bedc5
Requires:       %{_bindir}/gzip
3bedc5
Requires:       %{_bindir}/bzip2
3bedc5
Requires:       %{_bindir}/lzma
3bedc5
Requires:       %{_bindir}/xz
3bedc5
Requires:       %{_bindir}/cat
3bedc5
Requires:       %{_bindir}/find
0fa97a
0fa97a
%description tools
0fa97a
Package dependency solver tools.
0fa97a
662e5a
%package demo
662e5a
Summary:        Applications demoing the %{name} library
662e5a
Requires:       %{name}%{?_isa} = %{version}-%{release}
662e5a
# solv dependencies. Used as execlp() and system()
3bedc5
Requires:       %{_bindir}/curl
3bedc5
Requires:       %{_bindir}/gpg2
0fa97a
662e5a
%description demo
662e5a
Applications demoing the %{name} library.
0fa97a
662e5a
%if %{with perl_bindings}
662e5a
%package -n perl-%{libname}
662e5a
Summary:        Perl bindings for the %{name} library
662e5a
BuildRequires:  swig
662e5a
BuildRequires:  perl-devel
3bedc5
BuildRequires:  perl-generators
662e5a
Requires:       %{name}%{?_isa} = %{version}-%{release}
0fa97a
662e5a
%description -n perl-%{libname}
662e5a
Perl bindings for the %{name} library.
662e5a
%endif
662e5a
662e5a
%if %{with ruby_bindings}
662e5a
%package -n ruby-%{libname}
662e5a
Summary:        Ruby bindings for the %{name} library
662e5a
BuildRequires:  swig
662e5a
BuildRequires:  ruby-devel
662e5a
Requires:       %{name}%{?_isa} = %{version}-%{release}
662e5a
662e5a
%description -n ruby-%{libname}
662e5a
Ruby bindings for the %{name} library.
662e5a
%endif
662e5a
fe5762
%if %{with python2_bindings}
662e5a
%package -n python2-%{libname}
662e5a
Summary:        Python bindings for the %{name} library
662e5a
%{?python_provide:%python_provide python2-%{libname}}
662e5a
BuildRequires:  swig
662e5a
BuildRequires:  python2-devel
662e5a
Requires:       %{name}%{?_isa} = %{version}-%{release}
662e5a
662e5a
%description -n python2-%{libname}
662e5a
Python bindings for the %{name} library.
662e5a
662e5a
Python 2 version.
fe5762
%endif
662e5a
fe5762
%if %{with python3_bindings}
662e5a
%package -n python3-%{libname}
662e5a
Summary:        Python bindings for the %{name} library
662e5a
%{?python_provide:%python_provide python3-%{libname}}
662e5a
BuildRequires:  swig
662e5a
BuildRequires:  python3-devel
662e5a
Requires:       %{name}%{?_isa} = %{version}-%{release}
662e5a
662e5a
%description -n python3-%{libname}
662e5a
Python bindings for the %{name} library.
662e5a
662e5a
Python 3 version.
662e5a
%endif
662e5a
662e5a
%prep
662e5a
%autosetup -p1
0fa97a
0fa97a
%build
fe5762
%cmake . -Bbuild                                \
fe5762
  -DFEDORA=1                                    \
fe5762
  -DENABLE_RPMDB=ON                             \
fe5762
  -DENABLE_RPMDB_BYRPMHEADER=ON                 \
fe5762
  -DENABLE_RPMDB_LIBRPM=OFF                     \
fe5762
  -DENABLE_RPMPKG_LIBRPM=OFF                    \
fe5762
  -DENABLE_RPMMD=ON                             \
fe5762
  %{?with_comps:-DENABLE_COMPS=ON}              \
fe5762
  %{?with_appdata:-DENABLE_APPDATA=ON}          \
fe5762
  -DUSE_VENDORDIRS=ON                           \
fe5762
  -DWITH_LIBXML2=OFF                            \
fe5762
  -DENABLE_LZMA_COMPRESSION=ON                  \
fe5762
  -DENABLE_BZIP2_COMPRESSION=ON                 \
fe5762
  %{?with_helix_repo:-DENABLE_HELIXREPO=ON}     \
fe5762
  %{?with_suse_repo:-DENABLE_SUSEREPO=ON}       \
fe5762
  %{?with_debian_repo:-DENABLE_DEBIAN=ON}       \
fe5762
  %{?with_arch_repo:-DENABLE_ARCHREPO=ON}       \
fe5762
  %{?with_multi_semantics:-DMULTI_SEMANTICS=ON} \
fe5762
  %{?with_complex_deps:-DENABLE_COMPLEX_DEPS=1} \
fe5762
  %{?with_perl_bindings:-DENABLE_PERL=ON}       \
fe5762
  %{?with_ruby_bindings:-DENABLE_RUBY=ON}       \
fe5762
  %{?with_python2_bindings:-DENABLE_PYTHON=ON}  \
fe5762
  %{?with_python3_bindings:-DENABLE_PYTHON3=ON} \
fe5762
  %{nil}
fe5762
%make_build -C build
0fa97a
0fa97a
%install
fe5762
%make_install -C build
662e5a
fe5762
mv %{buildroot}%{_bindir}/repo2solv{.sh,}
662e5a
662e5a
%check
fe5762
%make_build test -C build
0fa97a
0fa97a
%post -p /sbin/ldconfig
0fa97a
0fa97a
%postun -p /sbin/ldconfig
0fa97a
0fa97a
%files
662e5a
%license LICENSE*
662e5a
%doc README
662e5a
%{_libdir}/%{name}.so.*
662e5a
%{_libdir}/%{name}ext.so.*
662e5a
662e5a
%files devel
662e5a
%{_libdir}/%{name}.so
662e5a
%{_libdir}/%{name}ext.so
662e5a
%{_includedir}/%{libname}/
662e5a
%{_libdir}/pkgconfig/%{name}.pc
3bedc5
%{_libdir}/pkgconfig/%{name}ext.pc
662e5a
# Own directory because we don't want to depend on cmake
662e5a
%dir %{_datadir}/cmake/Modules/
662e5a
%{_datadir}/cmake/Modules/FindLibSolv.cmake
662e5a
%{_mandir}/man3/%{name}*.3*
662e5a
662e5a
# Some small macro to list tools with mans
662e5a
%global solv_tool() \
662e5a
%{_bindir}/%{1}\
662e5a
%{_mandir}/man1/%{1}.1*
0fa97a
0fa97a
%files tools
662e5a
%solv_tool deltainfoxml2solv
662e5a
%solv_tool dumpsolv
662e5a
%solv_tool installcheck
662e5a
%solv_tool mergesolv
662e5a
%solv_tool repomdxml2solv
662e5a
%solv_tool rpmdb2solv
662e5a
%solv_tool rpmmd2solv
662e5a
%solv_tool rpms2solv
662e5a
%solv_tool testsolv
662e5a
%solv_tool updateinfoxml2solv
662e5a
%if %{with comps}
662e5a
  %solv_tool comps2solv
662e5a
%endif
662e5a
%if %{with appdata}
662e5a
  %solv_tool appdata2solv
662e5a
%endif
662e5a
%if %{with debian_repo}
662e5a
  %solv_tool deb2solv
662e5a
%endif
662e5a
%if %{with arch_repo}
662e5a
  %solv_tool archpkgs2solv
662e5a
  %solv_tool archrepo2solv
662e5a
%endif
662e5a
%if %{with helix_repo}
662e5a
  %solv_tool helix2solv
662e5a
%endif
3bedc5
%if %{with suse_repo}
3bedc5
  %solv_tool susetags2solv
3bedc5
%endif
3bedc5
662e5a
%{_bindir}/repo2solv
0fa97a
662e5a
%files demo
662e5a
%{_bindir}/solv
662e5a
662e5a
%if %{with perl_bindings}
662e5a
%files -n perl-%{libname}
662e5a
%{perl_vendorarch}/%{libname}.pm
662e5a
%{perl_vendorarch}/%{libname}.so
662e5a
%endif
662e5a
662e5a
%if %{with ruby_bindings}
662e5a
%files -n ruby-%{libname}
662e5a
%{ruby_vendorarchdir}/%{libname}.so
662e5a
%endif
662e5a
fe5762
%if %{with python2_bindings}
662e5a
%files -n python2-%{libname}
662e5a
%{python2_sitearch}/_%{libname}.so
662e5a
%{python2_sitearch}/%{libname}.py*
fe5762
%endif
662e5a
fe5762
%if %{with python3_bindings}
662e5a
%files -n python3-%{libname}
662e5a
%{python3_sitearch}/_%{libname}.so
662e5a
%{python3_sitearch}/%{libname}.py
662e5a
%{python3_sitearch}/__pycache__/%{libname}.*
662e5a
%endif
0fa97a
0fa97a
%changelog
6c6f93
* Wed Mar 27 2019 Michal Domonkos <mdomonko@redhat.com> - 0.6.34-4
6c6f93
- Polish the changelog
6c6f93
6c6f93
* Thu Mar 21 2019 Jaroslav Mracek <jmracek@redhat.com> - 0.6.34-3
6c6f93
- Make sure that targeted updates don't do reinstalls
6c6f93
- Resolves: bug#1668256
6c6f93
- Fix NULL pointer dereference (CVE-2018-20532, CVE-2018-20533)
6c6f93
- Resolves: bug#1669562
6c6f93
- Resolves: bug#1669576
6c6f93
- Fix illegal address access in pool_whatprovides (CVE-2018-20534)
6c6f93
- Resolves: bug#1670453
6c6f93
fe5762
* Wed Jun 20 2018 Igor Gnatenko <ignatenko@redhat.com> - 0.6.34-2
fe5762
- Add changelog
fe5762
fe5762
* Wed Jun 20 2018 Igor Gnatenko <ignatenko@redhat.com> - 0.6.34-1
fe5762
- Update to 0.6.34
fe5762
a5bbd3
* Fri Sep 22 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.6.26-2
a5bbd3
- Enable python bindings
a5bbd3
3bedc5
* Sun Feb 19 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.6.26-1
3bedc5
- Update to 0.6.26
3bedc5
3bedc5
* Tue Feb 07 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.6.25-1
3bedc5
- Update to 0.6.25
3bedc5
3bedc5
* Fri Nov 11 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.6.24-1
3bedc5
- Update to 0.6.24
3bedc5
662e5a
* Tue Jul 12 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.6.20-5
662e5a
- Make obsoletes non-architecture dependent (RHBZ #1354479)
662e5a
662e5a
* Tue May 31 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.6.20-4
662e5a
- Properly obsolete -test subpkg
662e5a
662e5a
* Mon May 30 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.6.20-3
662e5a
- Rebase to 0.6.20 with 2 critical patches (RHBZ #1334401)
662e5a
0fa97a
* Wed Jun 3 2015 Jan Silhan <jsilhan@redhat.com> - 0.6.11-1
0fa97a
- initial package for RHEL 7.2 without unnecessary bindings