Separate aul_rsc_mgr library from aul library 65/305365/1
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 1 Feb 2024 01:31:59 +0000 (10:31 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Thu, 1 Feb 2024 01:38:37 +0000 (10:38 +0900)
The libaul-rsc-mgr library is added.

Change-Id: I33d077778e33488a66cfc0e934e0e633f0247313
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
packaging/aul-rsc-mgr.manifest [new file with mode: 0644]
packaging/aul.spec
src/CMakeLists.txt
src/aul/CMakeLists.txt
src/rsc-mgr/CMakeLists.txt [new file with mode: 0644]
src/rsc-mgr/aul-rsc-mgr.pc.in [new file with mode: 0644]
src/rsc-mgr/aul_rsc_mgr.c [moved from src/aul/aul_rsc_mgr.c with 99% similarity]
src/rsc-mgr/aul_rsc_mgr_internal.c [moved from src/aul/aul_rsc_mgr_internal.c with 100% similarity]
src/rsc-mgr/aul_rsc_mgr_internal.h [moved from src/aul/aul_rsc_mgr_internal.h with 100% similarity]
src/rsc-mgr/aul_rsc_mgr_schema.h [moved from src/aul/aul_rsc_mgr_schema.h with 100% similarity]
src/rsc-mgr/include/aul_rsc_mgr.h [moved from src/aul/include/aul_rsc_mgr.h with 100% similarity]

diff --git a/packaging/aul-rsc-mgr.manifest b/packaging/aul-rsc-mgr.manifest
new file mode 100644 (file)
index 0000000..2a0cec5
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+  <request>
+    <domain name="_"/>
+  </request>
+</manifest>
index 1e5dc61..6606a72 100644 (file)
@@ -8,6 +8,7 @@ Source0:    %{name}-%{version}.tar.gz
 Source1001: %{name}.manifest
 Source1002: %{name}-server.manifest
 Source1003: %{name}-exec-checker-plugin.manifest
+Source1004: %{name}-rsc-mgr.manifest
 
 Requires(post):   /sbin/ldconfig
 Requires(post):   /usr/bin/systemctl
@@ -104,6 +105,24 @@ Requires:   %{name}-server = %{version}-%{release}
 %description server-devel
 Application Utility Library (devel)
 
+#################################################
+# aul-rsc-mgr
+#################################################
+%package rsc-mgr
+Summary:    Application Utility Library (Resource Manager)
+Group:      Development/Libraries
+
+%description rsc-mgr
+Application Utility Library (Resource Manager)
+
+%package rsc-mgr-devel
+Summary:    Application Utility Library (Resource Manager)
+Group:      Development/Libraries
+Requires:   %{name}-rsc-mgr = %{version}-%{release}
+
+%description rsc-mgr-devel
+Application Utility Library (devel)
+
 %package unittests
 Summary:    %{name} unittests binary
 
@@ -126,6 +145,7 @@ sed -i 's|TZ_SYS_DB|%{TZ_SYS_DB}|g' %{SOURCE1001}
 cp %{SOURCE1001} .
 cp %{SOURCE1002} .
 cp %{SOURCE1003} .
+cp %{SOURCE1004} .
 
 %build
 %if 0%{?gcov:1}
@@ -246,6 +266,12 @@ chsmack -a 'User::Home' %{TZ_SYS_DB}/.component.db-journal
 %post server
 /sbin/ldconfig
 
+%postun rsc-mgr
+/sbin/ldconfig
+
+%post rsc-mgr
+/sbin/ldconfig
+
 %files
 %license LICENSE
 %manifest %{name}.manifest
@@ -313,6 +339,15 @@ chsmack -a 'User::Home' %{TZ_SYS_DB}/.component.db-journal
 %{_libdir}/libaul-server.so
 %{_libdir}/pkgconfig/aul-server.pc
 
+%files rsc-mgr
+%manifest %{name}-rsc-mgr.manifest
+%attr(0644,root,root) %{_libdir}/libaul-rsc-mgr.so.*
+
+%files rsc-mgr-devel
+%{_includedir}/aul/rsc-mgr/*.h
+%{_libdir}/libaul-rsc-mgr.so
+%{_libdir}/pkgconfig/aul-rsc-mgr.pc
+
 %files unittests
 %attr(0755,root,root) %{_bindir}/aul-unit-tests
 %attr(0755,root,root) %{_bindir}/app-control-tests
index cd5f6cc..341502b 100644 (file)
@@ -1,4 +1,5 @@
 ADD_SUBDIRECTORY(aul)
 ADD_SUBDIRECTORY(parser)
+ADD_SUBDIRECTORY(rsc-mgr)
 ADD_SUBDIRECTORY(server)
 ADD_SUBDIRECTORY(tool)
index f372ce9..8349001 100644 (file)
@@ -26,7 +26,6 @@ TARGET_INCLUDE_DIRECTORIES(${TARGET_AUL} PUBLIC
   ${CMAKE_CURRENT_SOURCE_DIR}
   ${CMAKE_CURRENT_SOURCE_DIR}/../
   ${CMAKE_CURRENT_SOURCE_DIR}/include
-  ${CMAKE_CURRENT_SOURCE_DIR}/include/internal
   ${CMAKE_CURRENT_SOURCE_DIR}/api
   ${CMAKE_CURRENT_SOURCE_DIR}/app_control
   ${CMAKE_CURRENT_SOURCE_DIR}/app_manager
@@ -48,7 +47,6 @@ APPLY_PKG_CONFIG(${TARGET_AUL} PUBLIC
   INIPARSER_DEPS
   LIBSMACK_DEPS
   LIBTZPLATFORM_CONFIG_DEPS
-  LIBXML_DEPS
   PARCEL_DEPS
   PKGMGR_INFO_DEPS
   STORAGE_DEPS
diff --git a/src/rsc-mgr/CMakeLists.txt b/src/rsc-mgr/CMakeLists.txt
new file mode 100644 (file)
index 0000000..a2a38ef
--- /dev/null
@@ -0,0 +1,38 @@
+SET(TARGET_AUL_RSC_MGR "aul-rsc-mgr")
+
+AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} AUL_RSC_MGR_SRCS)
+
+ADD_LIBRARY(${TARGET_AUL_RSC_MGR} SHARED ${AUL_RSC_MGR_SRCS})
+
+TARGET_INCLUDE_DIRECTORIES(${TARGET_AUL_RSC_MGR} PUBLIC
+  ${CMAKE_CURRENT_SOURCE_DIR}
+  ${CMAKE_CURRENT_SOURCE_DIR}/include
+  ${CMAKE_CURRENT_SOURCE_DIR}/../aul/include
+)
+
+SET_TARGET_PROPERTIES(${TARGET_AUL_RSC_MGR} PROPERTIES SOVERSION ${MAJORVER})
+SET_TARGET_PROPERTIES(${TARGET_AUL_RSC_MGR} PROPERTIES VERSION ${FULLVER})
+
+APPLY_PKG_CONFIG(${TARGET_AUL_RSC_MGR} PUBLIC
+  BUNDLE_DEPS
+  CAPI_SYSTEM_INFO_DEPS
+  DLOG_DEPS
+  GLIB_DEPS
+  LIBXML_DEPS
+  VCONF_DEPS
+)
+
+TARGET_LINK_LIBRARIES(${TARGET_AUL_RSC_MGR} PRIVATE ${TARGET_AUL})
+
+INSTALL(TARGETS ${TARGET_AUL_RSC_MGR} DESTINATION ${LIB_INSTALL_DIR}
+  COMPONENT RuntimeLibraries)
+
+CONFIGURE_FILE(${TARGET_AUL_RSC_MGR}.pc.in ${TARGET_AUL_RSC_MGR}.pc @ONLY)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${TARGET_AUL_RSC_MGR}.pc
+    DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
+
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/
+  DESTINATION include/aul/rsc-mgr
+  FILES_MATCHING
+  PATTERN "*.h"
+)
diff --git a/src/rsc-mgr/aul-rsc-mgr.pc.in b/src/rsc-mgr/aul-rsc-mgr.pc.in
new file mode 100644 (file)
index 0000000..59fe80f
--- /dev/null
@@ -0,0 +1,13 @@
+# Package Information for pkg-config
+
+prefix=@PREFIX@
+exec_prefix=@EXEC_PREFIX@
+libdir=@LIB_INSTALL_DIR@
+includedir=@INCLUDE_INSTALL_DIR@
+
+Name: libaul-rsc-mgr
+Description: Application Utility Libarary (Resource Manager)
+Version: @VERSION@
+Requires: bundle glib-2.0
+Libs: -L${libdir} -laul-rsc-mgr
+Cflags: -I${includedir} -I${includedir}/aul/rsc-mgr
similarity index 99%
rename from src/aul/aul_rsc_mgr.c
rename to src/rsc-mgr/aul_rsc_mgr.c
index 460d472..6b67e40 100644 (file)
 #include <system_info.h>
 
 #include "aul.h"
-#include "aul_api.h"
 #include "aul_rsc_mgr.h"
 #include "aul_rsc_mgr_internal.h"
 
+#undef API
+#define API __attribute__ ((visibility("default")))
+
 #define WEIGHT_SCREEN_DPI 10000
 #define WEIGHT_SCREEN_DPI_RANGE 10000
 #define WEIGHT_SCREEN_BPP 1000