From: Anas Nashif Date: Tue, 4 Jun 2013 11:31:38 +0000 (-0400) Subject: Remove hardcoding and fixed build X-Git-Tag: submit/tizen/20130604.113338^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0e104e26cdedf192f46a590fc2645635bd9e19f5;p=platform%2Fcore%2Flocation%2Flbs-dbus.git Remove hardcoding and fixed build --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a7b659..eae5fda 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,10 +15,9 @@ FOREACH(flag ${pkgs_CFLAGS}) ENDFOREACH(flag) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -Wl,-zdefs -fvisibility=hidden ") -SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wextra -fvisibility=hidden -fPIC") +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wextra -fvisibility=hidden -fPIC") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-parameter -Wno-missing-field-initializers -Wmissing-declarations -Wcast-align") ADD_DEFINITIONS("-DFEATURE_DLOG_DEBUG") @@ -32,9 +31,7 @@ MESSAGE(${CMAKE_EXE_LINKER_FLAGS}) SET(PREFIX ${CMAKE_INSTALL_PREFIX}) CONFIGURE_FILE(lbs-dbus.pc.in lbs-dbus.pc @ONLY) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/lbs-dbus.pc DESTINATION lib/pkgconfig) - -INSTALL(FILES ${CMAKE_SOURCE_DIR}/LICENSE DESTINATION /usr/share/license RENAME liblbs-dbus) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/lbs-dbus.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) ADD_SUBDIRECTORY(client) ADD_SUBDIRECTORY(server) diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 160c80d..91e5634 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -13,5 +13,5 @@ TARGET_LINK_LIBRARIES(lbs-dbus ${pkgs_LDFLAGS}) SET_TARGET_PROPERTIES(lbs-dbus PROPERTIES VERSION 0.1.0 SOVERSION 0 OUTPUT_NAME lbs-dbus) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/lbs_dbus_client.h DESTINATION include/lbs-dbus) -INSTALL(TARGETS lbs-dbus DESTINATION lib COMPONENT Runtime) +INSTALL(TARGETS lbs-dbus DESTINATION ${LIB_INSTALL_DIR} COMPONENT Runtime) #ADD_SUBDIRECTORY(test_src) diff --git a/packaging/lbs-dbus.changes b/packaging/lbs-dbus.changes new file mode 100644 index 0000000..23b8120 --- /dev/null +++ b/packaging/lbs-dbus.changes @@ -0,0 +1,3 @@ +* Tue Jun 04 2013 Anas Nashif submit/tizen/20130517.044934@56bc9cf +- Remove hardcoding and fixed build + diff --git a/packaging/lbs-dbus.spec b/packaging/lbs-dbus.spec index fa73040..7fe6a0a 100644 --- a/packaging/lbs-dbus.spec +++ b/packaging/lbs-dbus.spec @@ -2,28 +2,24 @@ Name: lbs-dbus Summary: Dbus interface for Location based service Version: 0.1.6 Release: 1 -Group: System/Libraries -License: Apache +Group: Location/Service +License: Apache-2.0 Source0: lbs-dbus-%{version}.tar.gz -Requires(post): /sbin/ldconfig -Requires(postun): /sbin/ldconfig BuildRequires: cmake BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gobject-2.0) BuildRequires: pkgconfig(dlog) -#BuildRequires: pkgconfig(security-server) BuildRequires: pkgconfig(gio-2.0) BuildRequires: pkgconfig(gio-unix-2.0) BuildRequires: python BuildRequires: python-xml -#BuildRequires: sec-product-features %description LBS dbus interface %package -n liblbs-dbus Summary: LBS dbus library -Group: TO_BE/FILLED_IN +Group: Location/Libraries Requires(post): sys-assert %description -n liblbs-dbus @@ -31,7 +27,7 @@ LBS client API library %package -n liblbs-dbus-devel Summary: Telephony client API (devel) -Group: Development/Libraries +Group: Development/Location Requires: liblbs-dbus = %{version}-%{release} %description -n liblbs-dbus-devel @@ -43,28 +39,25 @@ LBS client API library (devel) %build -cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} +%cmake . make %{?jobs:-j%jobs} %install -rm -rf %{buildroot} %make_install -mkdir -p %{buildroot}/usr/share/license -%post -p /sbin/ldconfig +%post -p /sbin/ldconfig -n liblbs-dbus -%postun -p /sbin/ldconfig +%postun -p /sbin/ldconfig -n liblbs-dbus %files -n liblbs-dbus %manifest liblbs-dbus.manifest +%license LICENSE %defattr(-,root,root,-) -#%doc COPYING %{_libdir}/*.so.* -%{_prefix}/etc/dbus-1/system.d/* -/usr/share/license/liblbs-dbus +%{_sysconfdir}/dbus-1/system.d/* %files -n liblbs-dbus-devel %defattr(-,root,root,-) diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt index 2abd6ca..e742568 100644 --- a/server/CMakeLists.txt +++ b/server/CMakeLists.txt @@ -8,6 +8,7 @@ SET(SRCS_S src/lbs_dbus_server.c ${CMAKE_CURRENT_SOURCE_DIR}/generated-code.c ) +SET(SYSCONFDIR "/etc") MESSAGE(Server_CMAKE_BINARY_DIR: ${CMAKE_BINARY_DIR}) MESSAGE(CMAKE_CURRENT_SOURCE_DIR: ${CMAKE_CURRENT_SOURCE_DIR}) MESSAGE(CMAKE_SOURCE_DIR: ${CMAKE_SOURCE_DIR}) @@ -21,7 +22,7 @@ ADD_LIBRARY(lbs-dbus-server SHARED ${SRCS_S}) TARGET_LINK_LIBRARIES(lbs-dbus-server ${pkgs_LDFLAGS}) SET_TARGET_PROPERTIES(lbs-dbus-server PROPERTIES VERSION 0.1.0 SOVERSION 0 OUTPUT_NAME lbs-dbus-server) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/lbs-dbus-server.conf DESTINATION ${PREFIX}/etc/dbus-1/system.d) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/lbs-dbus-server.conf DESTINATION ${SYSCONFDIR}/dbus-1/system.d) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/lbs_dbus_server.h DESTINATION include/lbs-dbus) -INSTALL(TARGETS lbs-dbus-server DESTINATION lib COMPONENT Runtime) +INSTALL(TARGETS lbs-dbus-server DESTINATION ${LIB_INSTALL_DIR} COMPONENT Runtime) #ADD_SUBDIRECTORY(test_src)