This patch adds a missing dependency of the libaul-blink.
Currently, if the library is not used, the library is not loaded forcedly
by '--wl,--as-needed' option.
Change-Id: Ic3939dcc096e8f2c14ab4aa3eca7cd9f3d986f3a
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
sqlite3 .component.db < ./src/parser/component/data/component_db.sql
%check
-export LD_LIBRARY_PATH="../../src/aul"
+export LD_LIBRARY_PATH="../../src/aul:../../src/blink"
ctest -V
%if 0%{?gcov:1}
%license LICENSE
%manifest %{name}.manifest
%attr(0644,root,root) %{_libdir}/libaul.so.*
-%attr(0644,root,root) %{_libdir}/libaul-blink.so
+%attr(0644,root,root) %{_libdir}/libaul-blink.so.*
%config %{_sysconfdir}/dbus-1/system.d/aul.conf
%{_bindir}/aulctl
%{_bindir}/aul_test
%files devel
%{_includedir}/aul/*.h
%{_includedir}/aul/api/*.h
+%{_includedir}/aul/blink/*.h
%{_libdir}/libaul.so
+%{_libdir}/libaul-blink.so
%{_libdir}/pkgconfig/aul.pc
+%{_libdir}/pkgconfig/aul-blink.pc
#################################################
# aul-gcov
#define _GNU_SOURCE
#endif
-#include <stdio.h>
+#include <aul_blink.h>
+#include <bundle_internal.h>
+#include <ctype.h>
+#include <glib.h>
#include <stdbool.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/types.h>
#include <sys/time.h>
-#include <ctype.h>
-#include <glib.h>
-#include <bundle_internal.h>
+#include <sys/types.h>
#include "aul_api.h"
#include "aul_cmd.h"
if (__context.worker == NULL)
return AUL_R_ERROR;
+ aul_blink_initialize();
return AUL_R_OK;
}
TARGET_INCLUDE_DIRECTORIES(${TARGET_AUL_BLINK} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/../
)
+SET_TARGET_PROPERTIES(${TARGET_AUL_BLINK} PROPERTIES SOVERSION ${MAJORVER})
+SET_TARGET_PROPERTIES(${TARGET_AUL_BLINK} PROPERTIES VERSION ${FULLVER})
+
APPLY_PKG_CONFIG(${TARGET_AUL_BLINK} PUBLIC
CAPI_SYSTEM_RESOURCE_DEPS
DLOG_DEPS
INSTALL(TARGETS ${TARGET_AUL_BLINK}
DESTINATION ${LIB_INSTALL_DIR}
COMPONENT RuntimeLibraries)
+
+CONFIGURE_FILE(aul-blink.pc.in aul-blink.pc @ONLY)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/aul-blink.pc
+ DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
+
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/
+ DESTINATION include/aul/blink
+ FILES_MATCHING
+ PATTERN "*.h"
+)
--- /dev/null
+# Package Information for pkg-config
+
+prefix=@PREFIX@
+exec_prefix=@EXEC_PREFIX@
+libdir=@LIB_INSTALL_DIR@
+includedir=@INCLUDE_INSTALL_DIR@
+
+Name: libaul-blink
+Description: AUL blink library
+Version: @VERSION@
+Requires: dlog capi-system-resource glib-2.0
+Libs: -L${libdir} -laul-blink
+Cflags: -I${includedir} -I${includedir}/aul-blink
* limitations under the License.
*/
+#include "aul_blink.h"
+
#include <cpu-boosting.h>
#include <glib.h>
#include <sys/types.h>
#include "blink/log_private.hh"
+#undef EXPORT
+#define EXPORT __attribute__ ((visibility("default")))
+
+#undef API
+#define API extern "C" EXPORT
+
namespace aul {
constexpr const char kAulBlink[] = "AUL_BLINK";
Blink blink;
} // namespace aul
+
+API int aul_blink_initialize(void) { return 0; }
--- /dev/null
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __AUL_BLINK_H__
+#define __AUL_BLINK_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int aul_blink_initialize(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __AUL_BLINK_H__ */