From 8ac931fb1be23ab1ec1de3fad1118a1d82828a60 Mon Sep 17 00:00:00 2001
From: Tomas Mlcoch <tmlcoch@redhat.com>
Date: Mar 31 2014 11:07:51 +0000
Subject: Update to 1.7.0


---

diff --git a/.gitignore b/.gitignore
index c065fcf..e2d14d1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,3 +18,4 @@
 /librepo-9106f73.tar.xz
 /librepo-8a1bac3.tar.xz
 /librepo-2b2c02f.tar.xz
+/librepo-4ed3868.tar.xz
diff --git a/librepo.spec b/librepo.spec
index 2dc5db6..371e198 100644
--- a/librepo.spec
+++ b/librepo.spec
@@ -1,33 +1,42 @@
-%global gitrev 2b2c02f
+%global gitrev 4ed3868
 # gitrev is output of: git rev-parse --short HEAD
 
-Name:		librepo
-Version:	1.6.0
-Release:	1%{?dist}
-Summary:	Repodata downloading library
-
-Group:		System Environment/Libraries
-License:	GPLv2+
-URL:		https://github.com/Tojaj/librepo
+%if 0%{?rhel} != 0 && 0%{?rhel} <= 7
+# Do not build bindings for python3 for RHEL <= 7
+%bcond_with python3
+%else
+%bcond_without python3
+%endif
+
+Name:           librepo
+Version:        1.7.0
+Release:        1%{?dist}
+Summary:        Repodata downloading library
+
+Group:          System Environment/Libraries
+License:        GPLv2+
+URL:            https://github.com/Tojaj/librepo
 # Use the following commands to generate the tarball:
 #  git clone https://github.com/Tojaj/librepo.git
 #  cd librepo
 #  utils/make_tarball.sh %{gitrev}
-Source0:	librepo-%{gitrev}.tar.xz
+Source0:        librepo-%{gitrev}.tar.xz
 
-BuildRequires:	check-devel
-BuildRequires:	cmake
-BuildRequires:	doxygen
-BuildRequires:	expat-devel
+BuildRequires:  check-devel
+BuildRequires:  cmake
+BuildRequires:  doxygen
+BuildRequires:  expat-devel
 BuildRequires:  glib2-devel >= 2.22.0
-BuildRequires:	gpgme-devel
-BuildRequires:	libattr-devel
-BuildRequires:	libcurl-devel
-BuildRequires:	openssl-devel
+BuildRequires:  gpgme-devel
+BuildRequires:  libattr-devel
+BuildRequires:  libcurl-devel
+BuildRequires:  openssl-devel
 
 # prevent provides from nonstandard paths:
 %filter_provides_in %{python_sitearch}/.*\.so$
+%if %{with python3}
 %filter_provides_in %{python3_sitearch}/.*\.so$
+%endif
 %filter_setup
 
 %description
@@ -35,30 +44,31 @@ A library providing C and Python (libcURL like) API to downloading repository
 metadata.
 
 %package devel
-Summary:	Repodata downloading library
-Group:		Development/Libraries
-Requires:	%{name}%{?_isa} = %{version}-%{release}
+Summary:        Repodata downloading library
+Group:          Development/Libraries
+Requires:       %{name}%{?_isa} = %{version}-%{release}
 
 %description devel
 Development files for librepo.
 
 %package -n python-librepo
-Summary:	Python bindings for the librepo library
-Group:		Development/Languages
-BuildRequires:	pygpgme
-BuildRequires:	python2-devel
-BuildRequires:	python-flask
-BuildRequires:	python-nose
-BuildRequires:	python-sphinx
-Requires:	%{name}%{?_isa} = %{version}-%{release}
+Summary:        Python bindings for the librepo library
+Group:          Development/Languages
+BuildRequires:  pygpgme
+BuildRequires:  python2-devel
+BuildRequires:  python-flask
+BuildRequires:  python-nose
+BuildRequires:  python-sphinx
+Requires:       %{name}%{?_isa} = %{version}-%{release}
 
 %description -n python-librepo
 Python bindings for the librepo library.
 
+%if %{with python3}
 %package -n python3-librepo
 Summary:        Python 3 bindings for the librepo library
 Group:          Development/Languages
-BuildRequires:	python3-pygpgme
+BuildRequires:  python3-pygpgme
 BuildRequires:  python3-devel
 BuildRequires:  python3-flask
 BuildRequires:  python3-nose
@@ -67,36 +77,45 @@ Requires:       %{name}%{?_isa} = %{version}-%{release}
 
 %description -n python3-librepo
 Python 3 bindings for the librepo library.
+%endif
 
 %prep
 %setup -q -n librepo
 
+%if %{with python3}
 rm -rf py3
 mkdir ../py3
 cp -a . ../py3/
 mv ../py3 ./
+%endif
 
 %build
 %cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .
 make %{?_smp_mflags}
 
+%if %{with python3}
 pushd py3
 %cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPYTHON_DESIRED:str=3 .
 make %{?_smp_mflags}
 popd
+%endif
 
 %check
 make ARGS="-V" test
 
+%if %{with python3}
 pushd py3
 make ARGS="-V" test
 popd
+%endif
 
 %install
 make install DESTDIR=$RPM_BUILD_ROOT
+%if %{with python3}
 pushd py3
 make install DESTDIR=$RPM_BUILD_ROOT
 popd
+%endif
 
 %post -p /sbin/ldconfig
 
@@ -114,11 +133,28 @@ popd
 %files -n python-librepo
 %{python_sitearch}/librepo/
 
+%if %{with python3}
 %files -n python3-librepo
 %{python3_sitearch}/
+%endif
 
 %changelog
-* Tue Feb  20 2014 Tomas Mlcoch <tmlcoch at redhat.com> - 1.6.0-1
+* Mon Mar  31 2014 Tomas Mlcoch <tmlcoch at redhat.com> - 1.7.0-1
+- Support for xml:base tag in repomd.xml.
+- Downloader: If checksums don't match, include the expected values and types
+  in the error message.
+- Handle: Add LRO_HMFCB and LRI_HMFCB options.
+- API CHANGE: lr_download_single_cb() new param mfcb (LrMirrorFailureCb)
+- API CHANGE: Removed cbdata param from lr_download_single_cb(). Use specific
+  data for each target.
+- New callback LrHandleMirrorFailureCb
+- Python doc update (Check it out: http://tojaj.github.io/librepo/)
+
+* Thu Mar 27 2014 Matěj Cepl <mcepl@redhat.com> - 1.6.0-2
+- Make building of python3 components conditional
+- replace all TABs with spaces
+
+* Thu Feb  20 2014 Tomas Mlcoch <tmlcoch at redhat.com> - 1.6.0-1
 - Small API change: End callback now must return integer and not void)
 - downloader: Check for the lr_interrupt regularly
 - Handle exceptions in python callbacks as return values (RhBug: 1066321)
diff --git a/sources b/sources
index 4f3996f..2910bef 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-45d6cd4ffeffdc9eb73185c1f5a06615  librepo-2b2c02f.tar.xz
+94bd6631a620c48c2ec3f1346a9e6c9c  librepo-4ed3868.tar.xz