# libsolv minimum version %global libsolv_version 0.6.21 # Disable python bindings so we can coexist with libdnf %bcond_with python %define major 2 %define libname %mklibname %name %major %define libname_devel %mklibname -d %name # Fedora package release versions are committed as versions in upstream %define origrel 1 Name: hawkey Version: 0.6.4 Release: %mkrel 1 Summary: Library providing simplified C and Python API to libsolv Group: System/Libraries License: LGPLv2+ URL: https://github.com/rpm-software-management/%{name} Source0: https://github.com/rpm-software-management/%{name}/archive/%{name}-%{version}-%{origrel}.tar.gz # Upstream patches # Upstreamable patches # Make it possible to not build Python bindings and docs for coexistence with libdnf # See: https://github.com/rpm-software-management/hawkey/pull/120 Patch500: hawkey-0.6.3-CMake-Add-option-for-Python-bindings.patch Patch501: hawkey-0.6.3-CMake-Add-option-for-docs.patch BuildRequires: pkgconfig(libsolv) >= %{libsolv_version} BuildRequires: cmake BuildRequires: expat-devel BuildRequires: rpm-devel BuildRequires: zlib-devel BuildRequires: check-devel %ifnarch %arm # Needed for some of the tests BuildRequires: valgrind %endif %if %{with python} # prevent provides from nonstandard paths: %define __provides_exclude_from ^(%{python2_sitearch}/.*\\.so\\|%{python3_sitearch}/.*\\.so)$ # filter out _hawkey_testmodule.so DT_NEEDED _hawkeymodule.so: %define __requires_exclude_from ^(%{python2_sitearch}/hawkey/test/.*\\.so\\|%{python3_sitearch}/hawkey/test/.*\\.so)$ %endif %description A Library providing simplified C and Python API to libsolv. %package -n %{libname} Summary: Libraries for %{name} Group: System/Libraries Requires: %{_lib}solv0%{?_isa} >= %{libsolv_version} %description -n %{libname} Libraries for %{name} %package -n %{libname_devel} Summary: A Library providing simplified C and Python API to libsolv Group: Development/C Obsoletes: %{libname_devel} < 0.6.3-7 Provides: %{name}-devel = %{version}-%{release} Requires: %{libname}%{?_isa} = %{version}-%{release} Requires: libsolv-devel %description -n %{libname_devel} Development files for %{name}. %if %{with python} %package -n python2-hawkey Summary: Python 2 bindings for the hawkey library Group: Development/Python BuildRequires: python-devel BuildRequires: python-nose BuildRequires: python-sphinx BuildRequires: python-sphinx_rtd_theme Provides: python-%{name} = %{version}-%{release} Requires: %{libname}%{?_isa} = %{version}-%{release} %description -n python2-hawkey Python 2 bindings for the hawkey library. %package -n python3-hawkey Summary: Python 3 bindings for the hawkey library Group: Development/Python BuildRequires: python3-devel BuildRequires: python3-nose BuildRequires: python3-sphinx >= 1.1.3-9 BuildRequires: python3-sphinx_rtd_theme Requires: %{libname}%{?_isa} = %{version}-%{release} %description -n python3-hawkey Python 3 bindings for the hawkey library. %endif %prep %setup -q -n %{name}-%{name}-%{version}-%{origrel} %autopatch -p1 %if %{with python} rm -rf py3 mkdir py3 %endif %build %cmake -DENABLE_SOLV_URPMREORDER=1 -DENABLE_DOCUMENTATION=0 %{!?with_python:-DENABLE_PYTHON_BINDINGS=0} %make %if %{with python} pushd ../py3 %cmake -DENABLE_SOLV_URPMREORDER=1 -DPYTHON_DESIRED:str=3 -DENABLE_DOCUMENTATION=0 ../../ %make make doc-man popd %endif %check # The test suite doesn't automatically know to look at the "built" # library, so we force it by creating an LD_LIBRARY_PATH export LD_LIBRARY_PATH=%{buildroot}%{_libdir} pushd ./build make ARGS="-V" test popd %if %{with python} # Run just the Python tests, not all of them, since # we have coverage of the core from the first build pushd ./py3/build/tests/python make ARGS="-V" test popd %endif %install pushd ./build %make_install popd %if %{with python} pushd ./py3/build %make_install popd %endif %files -n %{libname} %license COPYING %doc README.rst %{_libdir}/libhawkey.so.%{major} %files -n %{libname_devel} %{_libdir}/libhawkey.so %{_libdir}/pkgconfig/hawkey.pc %{_includedir}/hawkey/ %if %{with python} %files -n python2-hawkey %{python2_sitearch}/hawkey %files -n python3-hawkey %{python3_sitearch}/hawkey %endif %changelog * Thu Mar 23 2017 ngompa 0.6.4-1.mga6 + Revision: 1094580 - Update to 0.6.4 - Drop all merged patches * Wed Feb 08 2017 ngompa 0.6.3-8.mga6 + Revision: 1085119 - Add support for preferring Provides (mga#18343, rhbz#1332830, rhbz#1096506) * Sun Nov 27 2016 ngompa 0.6.3-7.mga6 + Revision: 1070469 - Permanently disable docs, add self-Obsoletes for removed files in devel subpackage * Sat Nov 26 2016 ngompa 0.6.3-6.mga6 + Revision: 1070209 - Disable building Python bindings and docs for libdnf coexistence * Sat Sep 03 2016 ngompa 0.6.3-5.mga6 + Revision: 1049962 - Add patch to let CMake handle default build type (rhbz#1332067) * Fri Aug 26 2016 ngompa 0.6.3-4.mga6 + Revision: 1049005 - add patch to detect armv7hnl properly (rhbz#1368238) * Tue May 24 2016 ngompa 0.6.3-3.mga6 + Revision: 1018192 - Add another patch to fix building on libsolv-0.6.21+ - Add patch to fix build with libsolv-0.6.21 * Sat May 14 2016 ngompa 0.6.3-2.mga6 + Revision: 1015183 - Add patch to enable URPM-style solution reordering * Sat Mar 26 2016 ngompa 0.6.3-1.mga6 + Revision: 995662 - Update to 0.6.3 + umeabot - Mageia 6 Mass Rebuild * Wed Dec 09 2015 neoclust 0.6.2-4.mga6 + Revision: 908993 - Do not install valgrind as long as openmpi do not build on ARM * Wed Dec 09 2015 neoclust 0.6.2-3.mga6 + Revision: 908989 - Disable valgrind test on arm for the moment * Wed Dec 02 2015 ngompa 0.6.2-2.mga6 + Revision: 907642 - Fix autoreq and autoprov exclusions * Wed Oct 21 2015 ngompa 0.6.2-1.mga6 + Revision: 893790 - Update to version 0.6.2 * Thu Oct 08 2015 daviddavid 0.6.1-3.mga6 + Revision: 887309 - add missing BuildRequires on python(3)-sphinx_rtd_theme - rebuild for python 3.5 + shlomif - Cleanups for the .spec by Neal Gompa * Sun Oct 04 2015 shlomif 0.6.1-2.mga6 + Revision: 886233 - Remove trailing whitespace from .spec - Importing hawkey - thanks to Neal Gompa/Son_Goku