From: SangYoun Kwak Date: Mon, 13 Mar 2023 02:01:44 +0000 (+0900) Subject: Modified building scripts according to the plugin api X-Git-Tag: accepted/tizen/unified/20230607.160238~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b08c902a05e7073123ed0616f0342793777cfa08;p=platform%2Fcore%2Fsystem%2Fplugin%2Fresourced-generic.git Modified building scripts according to the plugin api plugin-backend-resourced-rpi.spec * BuildRequires for plugin-api-resourced since the package plugin-api-resourced was separated from the package libsyscommon. * Versioning was changed. (It will start from 0.1.0) * Definitions for cmake was rearranged. (remove unused ones) * Files to be included to the package were modified. CMakeLists.txt * Installation for the license file was removed since the license file will be included through the %file section of the .spec file. src/resourced-memory-lmk/CMakeLists.txt * The package plugin-api-resourced was added. Signed-off-by: SangYoun Kwak --- diff --git a/CMakeLists.txt b/CMakeLists.txt index ef29410..6067c2d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,4 @@ IF(${ENABLE_DLOG}) ADD_DEFINITIONS("-DENABLE_DLOG") ENDIF() -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.Apache-2.0 - DESTINATION ${PLUGIN_LICENSE_DIR}) - ADD_SUBDIRECTORY(src/resourced-memory-lmk) diff --git a/packaging/plugin-backend-resourced-rpi.spec b/packaging/plugin-backend-resourced-rpi.spec index 645d139..84b2c7e 100644 --- a/packaging/plugin-backend-resourced-rpi.spec +++ b/packaging/plugin-backend-resourced-rpi.spec @@ -1,9 +1,8 @@ %define PLUGIN_LIBDIR %{_libdir}/plugin -%define PLUGIN_LICENSEDIR /usr/share/plugin/%{name} Name: plugin-backend-resourced-rpi Summary: Resourced plugin backend for rpi targets -Version: 0.0.1 +Version: 0.1.0 Release: 0 Group: System/Libraries License: Apache-2.0 @@ -16,6 +15,7 @@ Requires(postun): /sbin/ldconfig BuildRequires: cmake BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(libsyscommon) +BuildRequires: pkgconfig(plugin-api-resourced) %description Resourced plugin backend for rpi targets @@ -25,11 +25,9 @@ Resourced plugin backend for rpi targets cp %{SOURCE1} . %build -%cmake . -DENABLE_DLOG=1 \ - -DPLUGIN_BACKEND_RESOURCED_MEMORY_LMK_ENABLE_DLOG=1 \ - -DPLUGIN_NAME=%{name} \ - -DPLUGIN_LICENSE_DIR=%{PLUGIN_LICENSEDIR} \ - -DPLUGIN_LIB_DIR=%{PLUGIN_LIBDIR} +%cmake . -DPLUGIN_NAME=%{name} \ + -DPLUGIN_LIB_DIR=%{PLUGIN_LIBDIR} \ + -DPLUGIN_BACKEND_RESOURCED_MEMORY_LMK_ENABLE_DLOG=1 make %{?jobs:-j%jobs} @@ -43,6 +41,7 @@ make %{?jobs:-j%jobs} /sbin/ldconfig %files -%{PLUGIN_LIBDIR}/libplugin-backend-resourced-memory-lmk.so +%defattr(-,root,root,-) %manifest %{name}.manifest -%{PLUGIN_LICENSEDIR}/LICENSE.Apache-2.0 +%license LICENSE.Apache-2.0 +%{PLUGIN_LIBDIR}/libplugin-backend-resourced-memory-lmk.so diff --git a/src/resourced-memory-lmk/CMakeLists.txt b/src/resourced-memory-lmk/CMakeLists.txt index dfec877..141bb86 100644 --- a/src/resourced-memory-lmk/CMakeLists.txt +++ b/src/resourced-memory-lmk/CMakeLists.txt @@ -6,12 +6,14 @@ SET(PREFIX ${CMAKE_INSTALL_PREFIX}) if (${PLUGIN_BACKEND_RESOURCED_MEMORY_LMK_ENABLE_DLOG}) SET(PKG_MODULES libsyscommon + plugin-api-resourced glib-2.0) ADD_DEFINITIONS("-DENABLE_DLOG") ADD_DEFINITIONS("-DLOG_TAG=\"PLUGIN_BACKEND_RESOURCED_MEMORY_LMK\"") else() SET(PKG_MODULES - libsyscommon) + libsyscommon + plugin-api-resourced) endif() INCLUDE(FindPkgConfig)