Blame SPECS/libsolv.spec

662e5a
%global libname solv
662e5a
662e5a
%if 0%{?rhel} && 0%{?rhel} <= 7
662e5a
%bcond_with perl_bindings
662e5a
%bcond_with ruby_bindings
662e5a
%bcond_with python_bindings
662e5a
%if %{with python_bindings}
662e5a
  %bcond_with python3
662e5a
%endif
662e5a
%else
662e5a
%bcond_without perl_bindings
662e5a
%bcond_without ruby_bindings
662e5a
%bcond_without python_bindings
662e5a
%if %{with python_bindings}
662e5a
  %bcond_without python3
662e5a
%endif
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}
3bedc5
Version:        0.6.26
3bedc5
Release:        1%{?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
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
662e5a
%if %{with python_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.
662e5a
662e5a
%if %{with python3}
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
%endif
662e5a
662e5a
%prep
662e5a
%autosetup -p1
3bedc5
mkdir build
0fa97a
0fa97a
%build
662e5a
pushd build
3bedc5
  %cmake                                          \
3bedc5
    -DFEDORA=1                                    \
3bedc5
    -DENABLE_RPMDB=ON                             \
3bedc5
    -DENABLE_RPMDB_BYRPMHEADER=ON                 \
3bedc5
    -DENABLE_RPMMD=ON                             \
3bedc5
    %{?with_comps:-DENABLE_COMPS=ON}              \
3bedc5
    %{?with_appdata:-DENABLE_APPDATA=ON}          \
3bedc5
    -DUSE_VENDORDIRS=ON                           \
3bedc5
    -DENABLE_LZMA_COMPRESSION=ON                  \
3bedc5
    -DENABLE_BZIP2_COMPRESSION=ON                 \
3bedc5
    %{?with_helix_repo:-DENABLE_HELIXREPO=ON}     \
3bedc5
    %{?with_suse_repo:-DENABLE_SUSEREPO=ON}       \
3bedc5
    %{?with_debian_repo:-DENABLE_DEBIAN=ON}       \
3bedc5
    %{?with_arch_repo:-DENABLE_ARCHREPO=ON}       \
3bedc5
    %{?with_multi_semantics:-DMULTI_SEMANTICS=ON} \
3bedc5
    %{?with_complex_deps:-DENABLE_COMPLEX_DEPS=1} \
3bedc5
    %{?with_perl_bindings:-DENABLE_PERL=ON}       \
3bedc5
    %{?with_ruby_bindings:-DENABLE_RUBY=ON}       \
662e5a
%if %{with python_bindings}
3bedc5
    -DENABLE_PYTHON=ON                            \
662e5a
%if %{with python3}
3bedc5
    -DENABLE_PYTHON3=ON                           \
662e5a
%endif
662e5a
%endif
3bedc5
    ..
3bedc5
  %make_build
3bedc5
popd
0fa97a
0fa97a
%install
662e5a
pushd build
662e5a
  %make_install
662e5a
popd
662e5a
662e5a
mv %{buildroot}%{_bindir}/repo2solv.sh %{buildroot}%{_bindir}/repo2solv
662e5a
662e5a
%check
662e5a
pushd build
662e5a
  ctest -VV
662e5a
popd
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
662e5a
%if %{with python_bindings}
662e5a
%files -n python2-%{libname}
662e5a
%{python2_sitearch}/_%{libname}.so
662e5a
%{python2_sitearch}/%{libname}.py*
662e5a
662e5a
%if %{with python3}
662e5a
%files -n python3-%{libname}
662e5a
%{python3_sitearch}/_%{libname}.so
662e5a
%{python3_sitearch}/%{libname}.py
662e5a
%{python3_sitearch}/__pycache__/%{libname}.*
662e5a
%endif
662e5a
%endif
0fa97a
0fa97a
%changelog
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