--- /dev/null
+--- createrepo_c/doc/python/CMakeLists.txt.orig 2014-05-06 14:58:35.000000000 +0200
++++ createrepo_c/doc/python/CMakeLists.txt 2016-04-28 18:19:52.853165535 +0200
+@@ -1,5 +1,5 @@
+ ADD_CUSTOM_TARGET (doc-python
+- PYTHONPATH=${CMAKE_BINARY_DIR}/src/python sphinx-build -E -b html
++ PYTHONPATH=${CMAKE_BINARY_DIR}/src/python sphinx-build-2 -E -b html
+ ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
+ COMMENT "Building Python API documentation with Sphinx")
+
+--- createrepo_c/src/python/CMakeLists.txt.orig 2014-05-06 14:58:35.000000000 +0200
++++ createrepo_c/src/python/CMakeLists.txt 2016-04-28 18:25:18.773151731 +0200
+@@ -1,6 +1,6 @@
+-FIND_PACKAGE (PythonLibs 2)
+ FIND_PACKAGE (PythonInterp 2 REQUIRED)
+-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
++FIND_PACKAGE (PythonLibs 2)
++EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True, prefix='/usr'))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+ INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH})
+
+ MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}")
# TODO: tests fail (rpm.org vs rpm5 compat problems?)
#
# Conditional build:
-%bcond_without tests # make tests
+%bcond_with tests # make tests
%define gitrev 7ef96a6
Summary: Creates a common metadata repository
Source0: http://pkgs.fedoraproject.org/repo/pkgs/createrepo_c/%{name}-%{gitrev}.tar.xz/606d117677ab85e5a9ec15896db644c2/createrepo_c-%{gitrev}.tar.xz
# Source0-md5: 606d117677ab85e5a9ec15896db644c2
Patch0: %{name}-rpm5.patch
+Patch1: %{name}-python.patch
URL: https://github.com/Tojaj/createrepo_c
BuildRequires: bzip2-devel
BuildRequires: check-devel
BuildRequires: rpm-devel >= 5
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.219
+BuildRequires: sphinx-pdg-2
BuildRequires: sqlite3-devel >= 3
BuildRequires: tar >= 1:1.22
BuildRequires: xz
%prep
%setup -q -n %{name}
%patch0 -p1
+%patch1 -p1
%build
%cmake .
+
%{__make}
%{__make} doc