Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-release-src > by-pkgid > 14ec398358cd777a48363e3f1788092c > files > 2

libdnf-0.9.2-1.mga6.src.rpm

%global libsolv_version 0.6.28-1
%global dnf_conflict 2.0.0

# Keep valgrind tests switched off for now
%bcond_with valgrind

%define somajor 1
%define girapi %{somajor}.0
%define libname %mklibname dnf %{somajor}
%define girname %mklibname dnf-gir %{girapi}
%define devname %mklibname dnf -d

Name:           libdnf
Version:        0.9.2
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:        %{url}/archive/%{version}/%{name}-%{version}.tar.gz

BuildRequires:  cmake
BuildRequires:  gcc
BuildRequires:  libsolv-devel >= %{libsolv_version}
BuildRequires:  pkgconfig(librepo)
BuildRequires:  pkgconfig(check)
%if %{with valgrind}
BuildRequires:  valgrind
%endif
BuildRequires:  pkgconfig(gio-unix-2.0) >= 2.46.0
BuildRequires:  pkgconfig(gtk-doc)
BuildRequires:  pkgconfig(gobject-introspection-1.0)
BuildRequires:  rpm-devel >= 4.11.0


%description
A library providing simplified C and Python API to libsolv.

%package -n %{libname}
Summary:        Package library providing simplified interface to libsolv
Group:          System/Libraries

%description -n %{libname}
This library provides a simple interface to libsolv and is currently
used by PackageKit and rpm-ostree.

%package -n %{girname}
Summary:        GObject Introspection interface description for libhif
Group:          System/Libraries
Requires:       %{libname}%{?_isa} = %{version}-%{release}

%description -n %{girname}
GObject Introspection interface description for libhif.

%package -n %{devname}
Summary:        Development files for %{name}
Group:          Development/C
Provides:       %{name}-devel%{?_isa} = %{version}-%{release}
Provides:       %{name}-devel = %{version}-%{release}
Requires:       %{girname}%{?_isa} = %{version}-%{release}
Requires:       %{libname}%{?_isa} = %{version}-%{release}

%description -n %{devname}
Development files for %{name}.

%package -n hawkey-man
Summary:        Documentation for the hawkey Python bindings
Group:          Development/Python
BuildRequires:  python-nose
BuildRequires:  python-sphinx
# hawkey-devel prior to 0.6.3-6 had the man page
Obsoletes:      hawkey-devel < 0.6.3-6
BuildArch:      noarch

%description -n hawkey-man
Documentation for the hawkey Python bindings.

%package -n python2-hawkey
Summary:        Python 2 bindings for the hawkey interface
Group:          Development/Python
Provides:       python-hawkey = %{version}-%{release}
BuildRequires:  python2-devel
BuildRequires:  python-nose
Requires:       %{libname}%{?_isa} = %{version}-%{release}
Requires:       hawkey-man = %{version}-%{release}
# Fix problem with hawkey - dnf version incompatibility
# Can be deleted for distros where only python2-dnf >= 2.0.0
Conflicts:      python2-dnf < %{dnf_conflict}
Conflicts:      python-dnf < %{dnf_conflict}


%description -n python2-hawkey
Python 2 bindings for libdnf through the hawkey interface.

%package -n python3-hawkey
Summary:        Python 3 bindings for the hawkey interface
Group:          Development/Python
BuildRequires:  python3-devel
BuildRequires:  python3-nose
Requires:       %{libname}%{?_isa} = %{version}-%{release}
Requires:       hawkey-man = %{version}-%{release}
# Fix problem with hawkey - dnf version incompatibility
# Can be deleted for distros where only python3-dnf >= 2.0.0
Conflicts:      python3-dnf < %{dnf_conflict}


%description -n python3-hawkey
Python 3 bindings for libdnf through the hawkey interface.

%prep
%autosetup -p1

mkdir build-py2
mkdir build-py3


%build
pushd build-py2
  %cmake %{!?with_valgrind:-DDISABLE_VALGRIND=1} -DENABLE_SOLV_URPMREORDER=1 ../../
  %make_build
popd

pushd build-py3
  %cmake -DPYTHON_DESIRED:str=3 -DWITH_GIR=0 -DWITH_MAN=0 -Dgtkdoc=0 %{!?with_valgrind:-DDISABLE_VALGRIND=1} -DENABLE_SOLV_URPMREORDER=1 ../../
  %make_build
popd

%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}

if [ "$(id -u)" == "0" ] ; then
        cat <<ERROR 1>&2
Package tests cannot be run under superuser account.
Please build the package as non-root user.
ERROR
        exit 1
fi
pushd build-py2/build
  make ARGS="-V" test
popd

# FOR THE PYTHON 3 BUILD
# Run just the Python tests, not all of them, since
# we have coverage of the core from the first build
pushd build-py3/build/python/hawkey/tests
  make ARGS="-V" test
popd

%install
pushd build-py2/build
  %make_install
popd

pushd build-py3/build
  %make_install
popd


%files -n %{libname}
%license COPYING
%doc README.md AUTHORS NEWS
%{_libdir}/%{name}.so.%{somajor}

%files -n %{girname}
%{_libdir}/girepository-1.0/Dnf-%{girapi}.typelib

%files -n %{devname}
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%{_includedir}/%{name}/
%doc %{_datadir}/gtk-doc/html/%{name}/
%{_datadir}/gir-1.0/Dnf-*.gir

%files -n hawkey-man
%{_mandir}/man3/hawkey.3*

%files -n python2-hawkey
%{python2_sitearch}/hawkey/

%files -n python3-hawkey
%{python3_sitearch}/hawkey/



%changelog
* Sun Jul 02 2017 ngompa <ngompa> 0.9.2-1.mga6
+ Revision: 1108986
- Upgrade to 0.9.2

* Mon Jun 12 2017 ngompa <ngompa> 0.9.1-1.mga6
+ Revision: 1107576
- Update to 0.9.1

* Tue May 23 2017 ngompa <ngompa> 0.9.0-1.mga6
+ Revision: 1104146
- Upgrade to 0.9.0

* Wed May 03 2017 ngompa <ngompa> 0.8.2-1.mga6
+ Revision: 1098838
- Upgrade to v0.8.2

* Sun Apr 02 2017 ngompa <ngompa> 0.8.1-1.mga6
+ Revision: 1095673
- Update to 0.8.1

* Thu Mar 23 2017 ngompa <ngompa> 0.8.0-1.mga6
+ Revision: 1094579
- Upgrade to 0.8.0

* Sun Mar 19 2017 ngompa <ngompa> 0.7.4-1.mga6
+ Revision: 1093589
- Update to 0.7.4
- Add patch to add armv5tl to arm basearch
- Re-enable basic unit tests for armv5tl

* Thu Feb 16 2017 ngompa <ngompa> 0.7.3-1.mga6
+ Revision: 1086443
- Upgrade to 0.7.3

* Sun Dec 18 2016 ngompa <ngompa> 0.7.0-0.5.git20161218.378d315.mga6
+ Revision: 1075897
- Update to latest snapshot

* Fri Dec 02 2016 ngompa <ngompa> 0.7.0-0.4.git20161129.f9b798c.mga6
+ Revision: 1071664
- Update to latest snapshot

* Sun Nov 27 2016 ngompa <ngompa> 0.7.0-0.3.git20161125.2d8ba15.mga6
+ Revision: 1070490
- Bump for rebuilding against core/release

* Sat Nov 26 2016 ngompa <ngompa> 0.7.0-0.2.git20161125.2d8ba15.mga6
+ Revision: 1070222
- Disable running tests for armv5tl

* Sat Nov 26 2016 ngompa <ngompa> 0.7.0-0.1.git20161125.2d8ba15.mga6
+ Revision: 1070216
- Import from ngompa/dnf2-mga COPR