%define shortname solv # The naming scheme in non-Mandriva-based distros %if 0%{!?mklibname:1} %define mklibname(ds) lib%{1}%{?2:%{2}}%{-s:-static}%{-d:-devel} %endif %if 0%{!?mkrel:1} %define mkrel(c) %{1}%{?dist} %endif %define major 1 %define libname %mklibname %{shortname}%{major} %define devname %mklibname %{shortname} -d Name: libsolv Version: 0.7.31 Release: %mkrel 1 Summary: Package dependency solver License: BSD Group: System/Libraries Url: https://github.com/openSUSE/libsolv Source0: https://github.com/openSUSE/libsolv/archive/%{version}/%{name}-%{version}.tar.gz # Backports from upstream BuildRequires: gcc BuildRequires: cmake BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(zck) BuildRequires: pkgconfig(rpm) BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(bzip2) BuildRequires: pkgconfig(libzstd) BuildRequires: swig BuildRequires: perl %if 0%{?mageia} # (ngompa) fix build to avoid broken generated perl-base dependency BuildRequires: perl-base BuildRequires: perl-devel %endif BuildRequires: ruby BuildRequires: pkgconfig(ruby) BuildRequires: pkgconfig(python3) # (tv) fix build: BuildRequires: rubygem(psych) # For doc: BuildRequires: asciidoc %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 -n %{libname} Summary: Libraries for %{name} Group: System/Libraries Provides: %{name} = %{version}-%{release} Provides: %{name}%{?_isa} = %{version}-%{release} %description -n %{libname} Libraries for %{name}. %package -n %{devname} Summary: Development files for %{name} Group: Development/C Provides: %{name}-devel = %{version}-%{release} Provides: %{name}-devel%{?_isa} = %{version}-%{release} Requires: %{libname} = %{version}-%{release} Requires: cmake %description -n %{devname} Development files for %{name}. %package doc Summary: Documentation for %{name} Group: Documentation BuildArch: noarch %description doc Documentation for %{name}. %package tools Summary: A new approach to package dependency solving Group: System/Packaging Requires: gzip Requires: bzip2 Requires: zchunk Requires: zstd %description tools Package dependency solver tools. %package demo Summary: Application demoing the libsolv library Group: System/Packaging Requires: %{libname} = %{version}-%{release} Requires: %{name}-tools = %{version}-%{release} Requires: curl Requires: gnupg2 %description demo Applications demoing the libsolv library. %package -n ruby-solv Summary: Ruby bindings for the libsolv library Group: Development/Ruby %description -n ruby-solv Ruby bindings for libsolv. %package -n python3-solv Summary: Python 3 bindings for the libsolv library Group: Development/Python %{?python_provide: %python_provide python3-solv} %description -n python3-solv Python 3 bindings for libsolv. %package -n perl-solv Summary: Perl bindings for the libsolv library Group: Development/Perl %description -n perl-solv Perl bindings for libsolv. %prep %autosetup -p1 %build %cmake \ -DMAGEIA=1 \ -DWITH_LIBXML2=1 \ -DWITH_SYSTEM_ZCHUNK=1 \ -DENABLE_PERL=1 \ -DENABLE_PYTHON=1 \ -DENABLE_RUBY=1 \ -DUSE_VENDORDIRS=1 \ -DENABLE_APPDATA=1 \ -DENABLE_COMPS=1 \ -DENABLE_RPMDB_BYRPMHEADER=1 \ -DENABLE_RPMDB_LIBRPM=1 \ -DENABLE_RPMPKG_LIBRPM=1 \ -DENABLE_CONDA=1 \ -DENABLE_LZMA_COMPRESSION=1 \ -DENABLE_BZIP2_COMPRESSION=1 \ -DENABLE_ZSTD_COMPRESSION=1 \ -DENABLE_SUSEREPO=1 \ -DENABLE_HELIXREPO=1 \ -DENABLE_DEBIAN=1 \ -DENABLE_ARCHREPO=1 \ -DENABLE_COMPLEX_DEPS=1 \ -DMULTI_SEMANTICS=1 %cmake_build pushd %{_vpath_builddir}/doc cp -a ../../doc/*.txt . cp -a ../../doc/gen gen cp ../../doc/Makefile.gen . make -f Makefile.gen html popd %install %cmake_install %files -n %{libname} %license LICENSE* %doc README %{_libdir}/libsolv.so.%{major} %{_libdir}/libsolvext.so.%{major} %files doc %doc build/doc/gen/*.html %files tools %{_bindir}/installcheck %{_bindir}/a*solv %{_bindir}/comps2solv %{_bindir}/d*solv %{_bindir}/helix2solv %{_bindir}/m*solv %{_bindir}/repo*2solv %{_bindir}/rpm*solv %{_bindir}/susetags2solv %{_bindir}/testsolv %{_bindir}/updateinfoxml2solv %{_bindir}/conda2solv %{_mandir}/man1/installcheck.1* %{_mandir}/man1/a*solv.1* %{_mandir}/man1/comps2solv.1* %{_mandir}/man1/d*solv.1* %{_mandir}/man1/helix2solv.1* %{_mandir}/man1/m*solv.1* %{_mandir}/man1/repo*2solv.1* %{_mandir}/man1/rpm*solv.1* %{_mandir}/man1/susetags2solv.1* %{_mandir}/man1/testsolv.1* %{_mandir}/man1/updateinfoxml2solv.1* %files -n %{devname} %doc examples/solv %{_libdir}/libsolv*.so %{_includedir}/solv %{_datadir}/cmake/Modules/FindLibSolv.cmake %{_mandir}/man3/* %{_libdir}/pkgconfig/libsolv*.pc %files demo %{_bindir}/solv %{_mandir}/man1/solv.1* %files -n perl-solv %doc examples/p5solv %{perl_vendorarch}/* %files -n ruby-solv %doc examples/rbsolv %{ruby_vendorarchdir}/* %files -n python3-solv %doc examples/pysolv %{python3_sitearch}/*