dnfdragora: new add

Add a new recipe dnfdragora.

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
Zheng Ruoqin
2017-12-20 00:13:52 +08:00
committed by Armin Kuster
parent 9473dddf8a
commit 9c63095826
5 changed files with 137 additions and 0 deletions
@@ -0,0 +1,26 @@
From 80179c297abb9de2829bd02356257241dd414d70 Mon Sep 17 00:00:00 2001
From: Lei Maohui <leimaohui@cn.fujitsu.com>
Date: Mon, 18 Dec 2017 16:25:54 +0900
Subject: [PATCH] Do not set PYTHON_INSTALL_DIR by running python.
Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7c66b39..1489ef6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,7 +19,7 @@ else(NOT SPHINX_EXECUTABLE-NOTFOUND)
message(STATUS "Could NOT find sphinx-build.")
endif(NOT SPHINX_EXECUTABLE-NOTFOUND)
-execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(), end='')" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+#execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(), end='')" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
string(REGEX REPLACE "\n$" "" ${PYTHON_INSTALL_DIR} "${PYTHON_INSTALL_DIR}")
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; sys.stdout.write('%s.%s' % (sys.version_info.major, sys.version_info.minor))" OUTPUT_VARIABLE PYTHON_MAJOR_DOT_MINOR_VERSION)
message(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}")
--
2.7.4
@@ -0,0 +1,25 @@
From 15d0afcfa4868b7b072b3434bac0064617d61f99 Mon Sep 17 00:00:00 2001
From: Lei Maohui <leimaohui@cn.fujitsu.com>
Date: Tue, 19 Dec 2017 14:53:14 +0900
Subject: [PATCH] Run python scripts using env
Otherwise the build tools hardcode the python path into them.
Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
---
bin/dnfdragora | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/dnfdragora b/bin/dnfdragora
index b8e0550..cd80f7f 100755
--- a/bin/dnfdragora
+++ b/bin/dnfdragora
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
# vim: set et ts=4 sw=4:
# Copyright 2016-2017 Angelo Naselli <anaselli@linux.it>
#
--
2.7.4
@@ -0,0 +1,31 @@
From 56d9b838b3475729d7ed9c6c156d72c28943c2b6 Mon Sep 17 00:00:00 2001
From: Lei Maohui <leimaohui@cn.fujitsu.com>
Date: Tue, 19 Dec 2017 11:15:29 +0900
Subject: [PATCH] To fix error when do_package
QA Issue: nativesdk-dnfdragora: Files/directories were installed but not shipped in any package:
/etc
/etc/dnfdragora
/etc/dnfdragora/dnfdragora.yaml
Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7c66b39..a5659f7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,7 +52,7 @@ endif(ENABLE_COMPS)
set(CMAKE_INSTALL_BINDIR "${CMAKE_INSTALL_PREFIX}/bin")
set(CMAKE_INSTALL_DATAROOTDIR "${CMAKE_INSTALL_PREFIX}/share")
set(CMAKE_INSTALL_LOCALEDIR "${CMAKE_INSTALL_DATAROOTDIR}/locale")
-set(CMAKE_INSTALL_FULL_SYSCONFDIR "/etc")
+set(CMAKE_INSTALL_FULL_SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/../etc")
# Configure files
configure_file(${CMAKE_SOURCE_DIR}/etc/dnfdragora.yaml.in ${CMAKE_BINARY_DIR}/etc/dnfdragora.yaml @ONLY)
--
2.7.4
@@ -0,0 +1,25 @@
From 2e6a0db24be373a5b7741dc5a0d322a28389fbf0 Mon Sep 17 00:00:00 2001
From: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
Date: Thu, 23 Nov 2017 16:35:44 +0900
Subject: [PATCH] disable build manpages.
Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
---
CMakeLists.txt | 1 -
1 file changed, 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7c66b39..fc32750 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -65,7 +65,6 @@ endif(GETTEXT_FOUND)
# Build and install the man-pages
if(NOT SPHINX_EXECUTABLE-NOTFOUND)
- add_subdirectory(man)
endif(NOT SPHINX_EXECUTABLE-NOTFOUND)
# Installing application code
--
2.7.4
@@ -0,0 +1,30 @@
SUMMARY = "dnfdragora is a DNF frontend, based on rpmdragora from Mageia (originally rpmdrake) Perl code."
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://LICENSE;md5=d32239bcb673463ab874e80d47fae504 \
"
SRC_URI = "git://github.com/manatools/dnfdragora.git \
file://0001-disable-build-manpages.patch \
file://0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
file://0001-To-fix-error-when-do_package.patch \
file://0001-Run-python-scripts-using-env.patch \
"
PV = "1.0.1+git"
SRCREV = "4fef4ce889b8e4fa03191d414f63bfd50796152a"
S = "${WORKDIR}/git"
inherit cmake gettext pkgconfig python3-dir python3native distutils3-base
DEPENDS += "dnf python3 "
#DEPENDS_class-nativesdk += "nativesdk-python3"
RDEPENDS_${PN}_class-target = " python3-core libyui libyui-ncurses "
# manpages generation requires http://www.sphinx-doc.org/
EXTRA_OECMAKE = " -DWITH_MAN=OFF -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3"
BBCLASSEXTEND = "nativesdk"
FILES_${PN} = "${PYTHON_SITEPACKAGES_DIR}/ ${datadir}/ ${bindir}/ ${sysconfdir}/dnfdragora "