Blame SPECS/libsolv.spec

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