Modified building scripts according to the plugin api
authorSangYoun Kwak <sy.kwak@samsung.com>
Mon, 13 Mar 2023 02:01:44 +0000 (11:01 +0900)
committerSangYoun Kwak <sy.kwak@samsung.com>
Fri, 21 Apr 2023 08:17:42 +0000 (17:17 +0900)
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 <sy.kwak@samsung.com>
CMakeLists.txt
packaging/plugin-backend-resourced-rpi.spec
src/resourced-memory-lmk/CMakeLists.txt

index ef29410e66603f3491fe1542b98df1cc9b86d97e..6067c2d6a47483f57b5e29edebd0d583e504e146 100644 (file)
@@ -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)
index 645d139d37fd2f27a2926467513970af291f5284..84b2c7e2960c09a983fa9aff2e4a6095af423632 100644 (file)
@@ -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
index dfec877ec80b9dc1f38f90bb80f0559072ec57da..141bb86490006031e74053a57a251281c7e41949 100644 (file)
@@ -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)