%global libname solv %bcond_without python_bindings %bcond_without perl_bindings %bcond_without ruby_bindings # Creates special prefixed pseudo-packages from appdata metadata %bcond_without appdata # Creates special prefixed "group:", "category:" pseudo-packages %bcond_without comps %bcond_without conda # For rich dependencies %bcond_without complex_deps %if 0%{?rhel} %bcond_with helix_repo %bcond_with suse_repo %bcond_with debian_repo %bcond_with arch_repo # For handling deb + rpm at the same time %bcond_with multi_semantics %bcond_with zchunk %else %bcond_without helix_repo %bcond_without suse_repo %bcond_without debian_repo %bcond_without arch_repo # For handling deb + rpm at the same time %bcond_without multi_semantics %bcond_without zchunk %endif %bcond_without zstd #global commitnum 2901 #global commit 47fbaa2a0892866d30ec0e1b4c885532d0aca7b8 #global shortcommit %%(c=%%{commit}; echo ${c:0:7}) %define __cmake_switch(b:) %{expand:%%{?with_%{-b*}:ON}}%{expand:%%{!?with_%{-b*}:OFF}} Name: lib%{libname} Version: 0.7.20 Release: 20220222004329.28.g1d19d2b9%{?dist} Summary: Package dependency solver License: BSD URL: https://github.com/openSUSE/libsolv %if %{defined commit} Source: libsolv-0.7.20-20220222004329.28.g1d19d2b9.tar.xz %else Source: libsolv-0.7.20-20220222004329.28.g1d19d2b9.tar.xz %endif # https://bugzilla.redhat.com/show_bug.cgi?id=1630300 Patch1: 0001-Add-support-for-computing-hashes-using-OpenSSL.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: ninja-build BuildRequires: pkgconfig(rpm) BuildRequires: zlib-devel # -DWITH_LIBXML2=ON BuildRequires: libxml2-devel # -DWITH_OPENSSL=ON BuildRequires: pkgconfig(openssl) # -DENABLE_LZMA_COMPRESSION=ON BuildRequires: xz-devel # -DENABLE_BZIP2_COMPRESSION=ON BuildRequires: bzip2-devel %if %{with zstd} # -DENABLE_ZSTD_COMPRESSION=ON BuildRequires: libzstd-devel %endif %if %{with zchunk} # -DENABLE_ZCHUNK_COMPRESSION=ON BuildRequires: pkgconfig(zck) %endif # https://bugzilla.redhat.com/show_bug.cgi?id=1830346 Conflicts: rpm%{?_isa} < 4.14.3 %description A free package dependency solver using a satisfiability algorithm. The library is based on two major, but independent, blocks: - Using a dictionary approach to store and retrieve package and dependency information. - Using satisfiability, a well known and researched topic, for resolving package dependencies. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: rpm-devel%{?_isa} %description devel Development files for %{name}. %package tools Summary: Package dependency solver tools Requires: %{name}%{?_isa} = %{version}-%{release} # repo2solv dependencies. Used as execl() Requires: /usr/bin/find %description tools Package dependency solver tools. %package demo Summary: Applications demoing the %{name} library Requires: %{name}%{?_isa} = %{version}-%{release} # solv dependencies. Used as execlp() and system() Requires: /usr/bin/curl Requires: /usr/bin/gpg2 %description demo Applications demoing the %{name} library. %if %{with perl_bindings} %package -n perl-%{libname} Summary: Perl bindings for the %{name} library BuildRequires: swig BuildRequires: perl-devel BuildRequires: perl-generators Requires: %{name}%{?_isa} = %{version}-%{release} %description -n perl-%{libname} Perl bindings for the %{name} library. %endif %if %{with ruby_bindings} %package -n ruby-%{libname} Summary: Ruby bindings for the %{name} library BuildRequires: swig BuildRequires: ruby-devel Requires: %{name}%{?_isa} = %{version}-%{release} %description -n ruby-%{libname} Ruby bindings for the %{name} library. %endif %if %{with python_bindings} %package -n python3-%{libname} Summary: Python bindings for the %{name} library %{?python_provide:%python_provide python3-%{libname}} BuildRequires: swig BuildRequires: python3-devel Requires: %{name}%{?_isa} = %{version}-%{release} %description -n python3-%{libname} Python bindings for the %{name} library. Python 3 version. %endif %prep %autosetup -p1 %{?commit:-n %{name}-%{commit}} -n libsolv-0.7.20-20220222004329.28.g1d19d2b9 %build %cmake -GNinja \ -DFEDORA=1 \ -DENABLE_RPMDB=ON \ -DENABLE_RPMDB_BYRPMHEADER=ON \ -DENABLE_RPMDB_LIBRPM=ON \ -DENABLE_RPMPKG_LIBRPM=ON \ -DENABLE_RPMMD=ON \ -DENABLE_COMPS=%{__cmake_switch -b comps} \ -DENABLE_APPDATA=%{__cmake_switch -b appdata} \ -DUSE_VENDORDIRS=ON \ -DWITH_LIBXML2=ON \ -DWITH_OPENSSL=ON \ -DENABLE_LZMA_COMPRESSION=ON \ -DENABLE_BZIP2_COMPRESSION=ON \ -DENABLE_ZSTD_COMPRESSION=%{__cmake_switch -b zstd} \ -DENABLE_ZCHUNK_COMPRESSION=%{__cmake_switch -b zchunk} \ %if %{with zchunk} -DWITH_SYSTEM_ZCHUNK=ON \ %endif -DENABLE_HELIXREPO=%{__cmake_switch -b helix_repo} \ -DENABLE_SUSEREPO=%{__cmake_switch -b suse_repo} \ -DENABLE_DEBIAN=%{__cmake_switch -b debian_repo} \ -DENABLE_ARCHREPO=%{__cmake_switch -b arch_repo} \ -DMULTI_SEMANTICS=%{__cmake_switch -b multi_semantics} \ -DENABLE_COMPLEX_DEPS=%{__cmake_switch -b complex_deps} \ -DENABLE_CONDA=%{__cmake_switch -b conda} \ -DENABLE_PERL=%{__cmake_switch -b perl_bindings} \ -DENABLE_RUBY=%{__cmake_switch -b ruby_bindings} \ -DENABLE_PYTHON=%{__cmake_switch -b python_bindings} \ %if %{with python_bindings} -DPYTHON_EXECUTABLE=%{python3} \ %endif %{nil} %cmake_build %install %cmake_install %check %ctest # Python smoke test (not tested in %%ctest): export PYTHONPATH=%{buildroot}%{python3_sitearch} export LD_LIBRARY_PATH=%{buildroot}%{_libdir} %python3 -c 'import solv' %files %license LICENSE* %doc README %{_libdir}/%{name}.so.* %{_libdir}/%{name}ext.so.* %files devel %{_libdir}/%{name}.so %{_libdir}/%{name}ext.so %{_includedir}/%{libname}/ %{_libdir}/pkgconfig/%{name}.pc %{_libdir}/pkgconfig/%{name}ext.pc # Own directory because we don't want to depend on cmake %dir %{_datadir}/cmake/Modules/ %{_datadir}/cmake/Modules/FindLibSolv.cmake %{_mandir}/man3/%{name}*.3* # Some small macro to list tools with mans %global solv_tool() \ %{_bindir}/%{1}\ %{_mandir}/man1/%{1}.1* %files tools %solv_tool deltainfoxml2solv %solv_tool dumpsolv %solv_tool installcheck %solv_tool mergesolv %solv_tool repomdxml2solv %solv_tool rpmdb2solv %solv_tool rpmmd2solv %solv_tool rpms2solv %solv_tool testsolv %solv_tool updateinfoxml2solv %solv_tool repo2solv %if %{with comps} %solv_tool comps2solv %endif %if %{with appdata} %solv_tool appdata2solv %endif %if %{with debian_repo} %solv_tool deb2solv %endif %if %{with arch_repo} %solv_tool archpkgs2solv %solv_tool archrepo2solv %endif %if %{with helix_repo} %solv_tool helix2solv %endif %if %{with suse_repo} %solv_tool susetags2solv %endif %if %{with conda} %{_bindir}/conda2solv %endif %files demo %solv_tool solv %if %{with perl_bindings} %files -n perl-%{libname} %{perl_vendorarch}/%{libname}.pm %{perl_vendorarch}/%{libname}.so %endif %if %{with ruby_bindings} %files -n ruby-%{libname} %{ruby_vendorarchdir}/%{libname}.so %endif %if %{with python_bindings} %files -n python3-%{libname} %{python3_sitearch}/_%{libname}.so %{python3_sitearch}/%{libname}.py %{python3_sitearch}/__pycache__/%{libname}.* %endif %changelog * Fri Feb 18 2022 rpm-gitoverlay - 0.7.20-20220222004329.28.g1d19d2b9 - [1d19d2b9] Fix to compile (Michael Andres) - [fc3eaa12] Merge pull request #491 from wolfv/split_rules_printing (Michael Schroeder) - [30376db8] split rules number printing into seperate statements (Wolf Vollprecht) - [88bf6ce9] Merge pull request #488 from niner/patch-1 (Michael Schroeder) - [2b5e6c28] Fix segfault on conflict resolution when using bindings (niner) - [2857be8a] Fix split provides not working if the update includes a forbidden vendor change (Michael Schroeder) - [383a9465] Merge pull request #486 from kontura/toolversion (Michael Schroeder) - [021ab11d] Allow accessing toolversion at runtime and increase it (Aleš Matěj) - [316c8d21] Rename Iti to Itm while we can. (Michael Schroeder) - [c90979fa] Drop sys/cdefs.h include from qsort_r.c (Michael Schroeder) - [0dfc7df1] Support the install time in the testcase format (Michael Schroeder) - [7759a338] Merge pull request #477 from lukash/rename-requires (Michael Schroeder) - [0a5690d2] Support dumping of the transaction order in testcases (Michael Schroeder) - [19282028] Try to keep packages from a cycle close togther in the transaction order (Michael Schroeder) - [9cf5b757] Add an ifdef allowing to rename Solvable dependency members (Lukáš Hrázký) - [ff887874] Support zstd compressed control files in debian packages (Michael Schroeder) - [e79734ab] Finish strict repo priority support (Michael Schroeder) - [aa7dcd92] Merge pull request #459 from adriendelsalle/strict-prio (Michael Schroeder) - [e3d8843f] Add forgotten bump version line (Michael Schroeder) - [34720010] Merge pull request #470 from der-gabe/very-minor-doc-improvements (Michael Schroeder) - [4cb7359c] sha2.c: sync _Final function definition with the header file (Michael Schroeder) - [9d53fe74] Make repo line parsing not crash if the last argument is missing (Michael Schroeder) - [a371cee8] do not clear providers of a name having a different name it would prevent those solvables for being excluded by strict channel priority (Adrien DELSALLE) - [91be77ea] implement strict repo priority add specific rule add solver flag add problem message/debug (Adrien DELSALLE) - [77c937b3] Mention Tcl support in description (Gabriel Niebler) - [bdfa2c9b] Fix typos (Gabriel Niebler) - [79f2e1e7] Fix grammar (Gabriel Niebler) - [2cb9dcaa] Fix typo in libsolv.txt (Gabriel Niebler)