createrepo-c: add a recipe

This is the current C reimplementation/replacement of the original createrepo.
https://github.com/rpm-software-management/createrepo_c/wiki

(From OE-Core rev: 30e0bec70f7793a5f923fc22c56b12bc1d06027d)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alexander Kanavin 2016-12-30 18:34:07 +02:00 committed by Richard Purdie
parent c3df454357
commit 4ab1f76064
3 changed files with 86 additions and 0 deletions

View File

@ -0,0 +1,28 @@
From fef835e1fdedc72c97d9c3e5704302e56e1bdef0 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Mon, 2 Jan 2017 17:23:59 +0200
Subject: [PATCH] Correctly install the shared library
Upstream-Status: Pending
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
src/CMakeLists.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f3635e8..46dc037 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -110,7 +110,8 @@ CONFIGURE_FILE("deltarpms.h.in" "${CMAKE_CURRENT_SOURCE_DIR}/deltarpms.h" @ONLY)
IF (CMAKE_SIZEOF_VOID_P MATCHES "8")
SET (LIB_SUFFIX "64")
ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8")
-SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
+#SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
+SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}")
INSTALL(FILES ${headers} DESTINATION "include/createrepo_c")
INSTALL(FILES "createrepo_c.pc" DESTINATION "${LIB_INSTALL_DIR}/pkgconfig")
--
2.11.0

View File

@ -0,0 +1,27 @@
From bef487b5c2515062c5dd73c21082ce42f69aa717 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 30 Dec 2016 18:31:02 +0200
Subject: [PATCH] Do not set PYTHON_INSTALL_DIR by running python
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
src/python/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt
index 9f1ac64..eae0cbb 100644
--- a/src/python/CMakeLists.txt
+++ b/src/python/CMakeLists.txt
@@ -19,7 +19,7 @@ else()
FIND_PACKAGE(PythonInterp 3.0 REQUIRED)
endif()
-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)
+#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)
INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH})
MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}")
--
2.11.0

View File

@ -0,0 +1,31 @@
DESCRIPTION = "C implementation of createrepo."
HOMEPAGE = "https://github.com/rpm-software-management/createrepo_c/wiki"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
SRC_URI = "git://github.com/rpm-software-management/createrepo_c \
file://0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
file://0001-Correctly-install-the-shared-library.patch \
"
PV = "0.10.0+git${SRCPV}"
SRCREV = "748891ff8ee524c2d37926c608cd2794f88013f3"
S = "${WORKDIR}/git"
DEPENDS = "expat curl glib-2.0 libxml2 openssl bzip2 zlib file sqlite3 xz rpm"
DEPENDS_append_class-native = " file-replacement-native"
inherit cmake pkgconfig bash-completion distutils-base
EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR}"
BBCLASSEXTEND = "native"
# Direct createrepo to read rpm configuration from our sysroot, not the one it was compiled in
do_install_append_class-native() {
create_wrapper ${D}/${bindir}/createrepo_c \
RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm
}