From: Youngjae Shin Date: Mon, 2 Sep 2013 02:20:18 +0000 (+0900) Subject: remove common library X-Git-Tag: accepted/tizen/20130913.122541~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c40df9b91a16c2269884fbf626e96f330d1162c4;p=platform%2Fcore%2Fconnectivity%2Fnfc-manager.git remove common library Change-Id: I259ce2e8589a9c05e6212cf6f10f46c6345e4c55 --- diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index a55df66..bc7510d 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -15,15 +15,12 @@ AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} COMMON_SRCS) pkg_check_modules(common_pkgs REQUIRED glib-2.0 gio-2.0 gio-unix-2.0 dlog bluetooth-api libssl) -SET(EXTRA_CFLAGS "-fPIC -Wall -Werror-implicit-function-declaration") - FOREACH(flag ${common_pkgs_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") ENDFOREACH(flag) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") -ADD_LIBRARY(${NFC_COMMON} SHARED ${COMMON_SRCS}) -SET_TARGET_PROPERTIES(${NFC_COMMON} PROPERTIES VERSION ${FULLVER} SOVERSION ${MAJORVER}) +ADD_LIBRARY(${NFC_COMMON} STATIC ${COMMON_SRCS}) TARGET_LINK_LIBRARIES(${NFC_COMMON} ${common_pkgs_LDFLAGS}) FILE(GLOB COMMON_HEADER include/*.h) @@ -31,8 +28,6 @@ FILE(GLOB COMMON_HEADER include/*.h) CONFIGURE_FILE(${NFC_COMMON}.pc.in ${NFC_COMMON}.pc @ONLY) INSTALL(FILES ${NFC_COMMON}.pc DESTINATION lib/pkgconfig) -INSTALL(TARGETS ${NFC_COMMON} DESTINATION lib) - FOREACH(hfile ${COMMON_HEADER}) INSTALL(FILES ${hfile} DESTINATION include/${NFC_COMMON}) ENDFOREACH(hfile) diff --git a/common/net_nfc_util.c b/common/net_nfc_util.c index e317d1e..aab4e28 100644 --- a/common/net_nfc_util.c +++ b/common/net_nfc_util.c @@ -73,9 +73,7 @@ static const char *schema[] = static uint8_t *bt_addr = NULL; /* for log tag */ -#define NET_NFC_MANAGER_NAME "nfc-manager-daemon" static const char *log_tag = LOG_CLIENT_TAG; -extern char *__progname; FILE *nfc_log_file; const char *net_nfc_get_log_tag() @@ -83,16 +81,9 @@ const char *net_nfc_get_log_tag() return log_tag; } -void __attribute__ ((constructor)) lib_init() -{ - if (__progname != NULL && strncmp(__progname, NET_NFC_MANAGER_NAME, strlen(NET_NFC_MANAGER_NAME)) == 0) - { - log_tag = LOG_SERVER_TAG; - } -} - -void __attribute__ ((destructor)) lib_fini() +void net_nfc_change_log_tag() { + log_tag = LOG_SERVER_TAG; } void net_nfc_manager_init_log() diff --git a/common/net_nfc_util_internal.h b/common/net_nfc_util_internal.h index 0f3034b..79bbe0e 100644 --- a/common/net_nfc_util_internal.h +++ b/common/net_nfc_util_internal.h @@ -33,6 +33,7 @@ typedef enum CRC_B, } CRC_type_e; +void net_nfc_change_log_tag(); void net_nfc_manager_init_log(); void net_nfc_manager_fini_log(); diff --git a/common/nfc-common.pc.in b/common/nfc-common.pc.in index a1a676e..9e0e227 100644 --- a/common/nfc-common.pc.in +++ b/common/nfc-common.pc.in @@ -4,8 +4,8 @@ libdir=@LIB_INSTALL_DIR@ includedir=@INCLUDE_INSTALL_DIR@/@NFC_COMMON@ Name: @NFC_COMMON@ -Description: NFC Common Library +Description: NFC Common Headers Version: @FULLVER@ Requires: -Libs: -L${libdir} -l@NFC_COMMON@ +Libs: Cflags: -I${includedir} diff --git a/daemon/net_nfc_server.c b/daemon/net_nfc_server.c index 8977cd6..6a79137 100644 --- a/daemon/net_nfc_server.c +++ b/daemon/net_nfc_server.c @@ -314,6 +314,8 @@ int main(int argc, char *argv[]) GOptionContext *option_context; GError *error = NULL; + net_nfc_change_log_tag(); + option_context = g_option_context_new("Nfc manager"); g_option_context_add_main_entries(option_context, option_entries, NULL); diff --git a/packaging/nfc-manager.spec b/packaging/nfc-manager.spec index f42a2ac..ce48289 100644 --- a/packaging/nfc-manager.spec +++ b/packaging/nfc-manager.spec @@ -1,6 +1,6 @@ Name: nfc-manager Summary: NFC framework manager -Version: 0.1.1 +Version: 0.1.2 Release: 0 Group: Network & Connectivity/NFC License: Flora Software License @@ -32,7 +32,6 @@ BuildRequires: gettext-tools Requires(post): /sbin/ldconfig Requires(post): /usr/bin/vconftool Requires(postun): /sbin/ldconfig -Requires: nfc-common-lib = %{version} Requires: nfc-client-lib = %{version} @@ -44,29 +43,19 @@ Tizen NFC framework manager. %setup -q cp %{SOURCE1001} . -%package -n nfc-common-lib -Summary: NFC common library -Group: Network & Connectivity/Development - - -%description -n nfc-common-lib -NFC Common library. - -%package -n nfc-common-lib-devel +%package -n nfc-common-devel Summary: NFC common library (devel) Group: Network & Connectivity/Development -Requires: nfc-common-lib = %{version} -%description -n nfc-common-lib-devel -NFC manager common library for internal development. +%description -n nfc-common-devel +NFC manager common header for internal development. %package -n nfc-client-lib Summary: NFC client library Group: Network & Connectivity/NFC -Requires: nfc-common-lib = %{version} %description -n nfc-client-lib @@ -116,7 +105,6 @@ if [ $1 == 1 ]; then systemctl restart %{name}.service fi -%post -n nfc-common-lib -p /sbin/ldconfig %post -n nfc-client-lib /sbin/ldconfig @@ -133,7 +121,6 @@ if [ $1 == 0 ]; then fi systemctl daemon-reload -%postun -n nfc-common-lib -p /sbin/ldconfig %postun -n nfc-client-lib -p /sbin/ldconfig @@ -166,16 +153,8 @@ systemctl daemon-reload %{_includedir}/nfc/*.h -%files -n nfc-common-lib -%manifest %{name}.manifest -%defattr(-,root,root,-) -%{_libdir}/libnfc-common.so.* -%license LICENSE.Flora - - -%files -n nfc-common-lib-devel +%files -n nfc-common-devel %defattr(-,root,root,-) -%{_libdir}/libnfc-common.so %{_libdir}/pkgconfig/nfc-common.pc %{_includedir}/nfc-common/*.h