64bit build error fix 38/57238/1 accepted/tizen/mobile/20160119.002024 submit/tizen_mobile/20160118.105247
authorManasij Sur Roy <manasij.r@samsung.com>
Mon, 18 Jan 2016 09:46:07 +0000 (15:16 +0530)
committerManasij Sur Roy <manasij.r@samsung.com>
Mon, 18 Jan 2016 09:46:49 +0000 (15:16 +0530)
Change-Id: I6fa53679a9f7bdbbcf4c3d612577a298d8dcd916
Signed-off-by: Manasij Sur Roy <manasij.r@samsung.com>
CMakeLists.txt
client/CMakeLists.txt
packaging/fido-client.spec
test/Dummy_ASM_DBUS/CMakeLists.txt

index 9ace45f..f3c6fa3 100644 (file)
@@ -3,7 +3,6 @@ PROJECT(fido-client C)
 
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 SET(EXEC_PREFIX "\${prefix}")
-SET(LIBDIR "\${prefix}/lib")
 SET(INCLUDEDIR "\${prefix}/include ")
 SET(VERSION_MAJOR 0)
 SET(VERSION "${VERSION_MAJOR}.0.1")
index b8e4f66..a76b98c 100644 (file)
@@ -46,11 +46,7 @@ SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION ${VERSION})
 
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${CLIENT_PKGS_LDFLAGS})
 
-#CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY)
-
-##INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib/fido)
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib)
-#INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION lib/pkgconfig)
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIBDIR})
 
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/include/fido.h DESTINATION include)
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/include/fido_uaf_authenticator.h DESTINATION include)
@@ -58,4 +54,4 @@ INSTALL(FILES ${CMAKE_SOURCE_DIR}/include/fido_uaf_client.h DESTINATION include)
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/common/fido_uaf_types.h DESTINATION include)
 
 CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/client/${PROJECT_NAME}.pc.in ${CMAKE_SOURCE_DIR}/client/${PROJECT_NAME}.pc @ONLY)
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/client/${PROJECT_NAME}.pc DESTINATION lib/pkgconfig)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/client/${PROJECT_NAME}.pc DESTINATION ${LIBDIR}/pkgconfig)
index 4d8d775..24fd7fc 100644 (file)
@@ -19,6 +19,7 @@ BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(capi-base-common)
 BuildRequires: pkgconfig(glib-2.0) >= 2.26
 BuildRequires:  pkgconfig(gio-unix-2.0)
+BuildRequires:  pkgconfig(libtzplatform-config)
 BuildRequires:  pkgconfig(cynara-client)
 BuildRequires:  pkgconfig(cynara-session)
 BuildRequires:  pkgconfig(cynara-creds-gdbus)
@@ -52,16 +53,18 @@ Development files for %{name}
 %setup -q
 
 %build
-#export   CFLAGS+=" -Wextra -Wcast-align -Wcast-qual -Wshadow -Wwrite-strings -Wswitch-default"
-#export CXXFLAGS+=" -Wextra -Wcast-align -Wcast-qual -Wshadow -Wwrite-strings -Wswitch-default -Wnon-virtual-dtor -Wno-c++0x-compat"
-#export   CFLAGS+=" -Wno-unused-parameter -Wno-empty-body"
-#export CXXFLAGS+=" -Wno-unused-parameter -Wno-empty-body"
-
-#export   CFLAGS+=" -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-strict-aliasing -fno-unroll-loops -fsigned-char -fstrict-overflow -fno-common"
-#export CXXFLAGS+=" -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-strict-aliasing -fno-unroll-loops -fsigned-char -fstrict-overflow"
+%if 0%{?sec_build_binary_debug_enable}
+export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
+export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
+export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
+%endif
 
 export CFLAGS="${CFLAGS} -fPIC -fvisibility=hidden"
-cmake . -DCMAKE_INSTALL_PREFIX=/usr
+
+cmake . \
+-DCMAKE_INSTALL_PREFIX=%{_prefix} \
+-DLIBDIR=%{_libdir} \
+-DINCLUDEDIR=%{_includedir}
 
 make %{?jobs:-j%jobs}
 
@@ -81,7 +84,6 @@ mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
 install -m 644 %SOURCE3 %{buildroot}%{_unitdir}/org.tizen.fido.service
 %install_service multi-user.target.wants org.tizen.fido.service
 
-
 mkdir -p %{buildroot}/usr/share/dbus-1/system-services
 install -m 0644 %SOURCE4 %{buildroot}/usr/share/dbus-1/system-services/org.tizen.dummyasm.service
 
@@ -94,12 +96,12 @@ install -m 644 %SOURCE4 %{buildroot}%{_unitdir}/org.tizen.dummyasm.service
 
 install -m 0644  test/Dummy_ASM_DBUS/dummy_asm.json %{buildroot}%{_libdir}/fido/asm/dummy_asm.json
 
-##rm -rf %{buildroot}/usr/lib/fido
+%make_install
+mkdir -p %{buildroot}%{_libdir}
 
 %post
-mkdir -p /usr/lib/fido/asm/
-chsmack -a '_' /usr/lib/fido/
-chsmack -a '_' /usr/lib/fido/asm/
+chsmack -a '_' %{_libdir}/fido/
+chsmack -a '_' %{_libdir}/fido/asm/
 /sbin/ldconfig
 
 %postun
@@ -193,7 +195,7 @@ Summary:    Fido Sample App (Internal Dev)
 Group:      Account/Testing
 #Requires:   %{name} = %{version}-%{release}
 
-BuildRequires: cmake 
+BuildRequires: cmake
 BuildRequires: pkgconfig(capi-appfw-application)
 BuildRequires: pkgconfig(capi-system-system-settings)
 BuildRequires: pkgconfig(elementary)
index 743700a..96a60f8 100644 (file)
@@ -36,4 +36,4 @@ ADD_DEPENDENCIES(${PROJECT_NAME} ${CMAKE_SOURCE_DIR}/common/dummy-asm-stub.c)
 TARGET_LINK_LIBRARIES(${ASM_DAEMON} ${ASM_PKGS_LDFLAGS})
 
 INSTALL(TARGETS ${ASM_DAEMON} DESTINATION bin)
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/test/Dummy_ASM_DBUS/dummy_asm.json DESTINATION /usr/lib/fido/asm/)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/test/Dummy_ASM_DBUS/dummy_asm.json DESTINATION ${LIBDIR}/fido/asm/)