Fix compatibility for x64 arch 74/3774/1
authorBaptiste DURAND <baptiste.durand@eurogiciel.fr>
Thu, 30 May 2013 14:23:09 +0000 (16:23 +0200)
committerBaptiste DURAND <baptiste.durand@eurogiciel.fr>
Thu, 30 May 2013 14:23:09 +0000 (16:23 +0200)
-> Fix hardcoded library path in the code
-> Fix hardcoded library path in a txt file preload_list_wrt.txt
-> Use %cmake macro
-> Fix library install directory
-> Fix pc file install directory
-> Fix pc file
-> Fix LD FLAGS
-> Fix systemd service installation

12 files changed:
CMakeLists.txt
packaging/wrt.spec
pkgconfig/wrt-core.pc.in
src/api_new/CMakeLists.txt
src/api_new/ewk_context_manager.cpp
src/plugin-service/CMakeLists.txt
src/profiling/CMakeLists.txt
src/view/webkit/injected-bundle/CMakeLists.txt
src/wrt-client/wrt-client.cpp
src/wrt-launchpad-daemon/CMakeLists.txt
src/wrt-launchpad-daemon/legacy/preload_list_wrt.txt [deleted file]
src/wrt-launchpad-daemon/legacy/preload_list_wrt.txt.in [new file with mode: 0644]

index f079d12..7b849ec 100644 (file)
@@ -273,7 +273,7 @@ SET(PKGCONFIG_DIR ${PROJECT_SOURCE_DIR}/pkgconfig)
 
 CONFIGURE_FILE(${PKGCONFIG_DIR}/wrt-core.pc.in
     ${PKGCONFIG_DIR}/wrt-core.pc @ONLY)
-INSTALL(FILES ${PKGCONFIG_DIR}/wrt-core.pc DESTINATION lib/pkgconfig)
+INSTALL(FILES ${PKGCONFIG_DIR}/wrt-core.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
 
 IF(WITH_TESTS)
     add_subdirectory(tests)
index 01e2f24..96e508e 100644 (file)
@@ -83,13 +83,13 @@ wrt library development headers
 %endif
 
 %build
-export LDFLAGS+="-Wl,--rpath=/usr/lib"
+export LDFLAGS+="-Wl,--rpath=%{_libdir}"
 
-cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-        -DDPL_LOG="ON"                    \
-        -DPROJECT_VERSION=%{version} \
-        -DCMAKE_BUILD_TYPE=%{?build_type:%build_type} \
+%cmake . -DDPL_LOG="ON"       \
+                -DPROJECT_VERSION=%{version} \
+         -DCMAKE_BUILD_TYPE=%{?build_type:%build_type} \
         %{?WITH_TESTS:-DWITH_TESTS=%WITH_TESTS}
+
 make %{?jobs:-j%jobs}
 
 %install
@@ -107,9 +107,9 @@ ln -sf ../../init.d/wrt_launchpad_run.sh %{buildroot}/%{_sysconfdir}/rc.d/rc3.d/
 ln -sf ../../init.d/wrt_launchpad_run.sh %{buildroot}/%{_sysconfdir}/rc.d/rc4.d/S80wrt_launchpad_run
 
 #systemd
-mkdir -p %{buildroot}%{_libdir}/systemd/system/graphical.target.wants
-install -m 0644 %SOURCE101 %{buildroot}%{_libdir}/systemd/system/wrt_launchpad_daemon@.service
-ln -s ../wrt_launchpad_daemon@.service %{buildroot}%{_libdir}/systemd/system/graphical.target.wants/wrt_launchpad_daemon@app.service
+mkdir -p %{buildroot}%{_unitdir}/graphical.target.wants
+install -m 0644 %SOURCE101 %{buildroot}%{_unitdir}/wrt_launchpad_daemon@.service
+ln -s ../wrt_launchpad_daemon@.service %{buildroot}%{_unitdir}/graphical.target.wants/wrt_launchpad_daemon@app.service
 
 %preun
 if [ $1 == 0 ]; then
@@ -170,8 +170,8 @@ systemctl daemon-reload
 /etc/smack/accesses2.d/wrt_launchpad_daemon.rule
 /opt/etc/smack/accesses.d/wrt_launchpad_daemon.rule
 #systemd
-%{_libdir}/systemd/system/graphical.target.wants/wrt_launchpad_daemon@app.service
-%{_libdir}/systemd/system/wrt_launchpad_daemon@.service
+%{_unitdir}/graphical.target.wants/wrt_launchpad_daemon@app.service
+%{_unitdir}/wrt_launchpad_daemon@.service
 ###############################################################################
 
 %files devel
index 8436f7e..66be1c1 100644 (file)
@@ -1,7 +1,7 @@
 prefix=/usr
 project_name=@CMAKE_PROJECT_NAME@
 exec_prefix=${prefix}
-libdir=${prefix}/lib/
+libdir=@LIB_INSTALL_DIR@
 includedir=${prefix}/include/${project_name}
 
 Name: WebRuntime wrt core module
index f5af14a..b57ca4f 100644 (file)
@@ -56,7 +56,7 @@ TARGET_LINK_LIBRARIES(${TARGET_CORE_MODULE_LIB}
 )
 
 INSTALL(TARGETS ${TARGET_CORE_MODULE_LIB}
-    DESTINATION lib/
+    DESTINATION ${LIB_INSTALL_DIR}/
     PERMISSIONS OWNER_READ OWNER_WRITE
     GROUP_READ GROUP_EXECUTE WORLD_READ
 )
index d3b3c58..d1f4dfc 100644 (file)
@@ -36,7 +36,7 @@
 
 namespace WRT {
 
-static const std::string bundlePath("/usr/lib/libwrt-injected-bundle.so");
+static const std::string bundlePath( LIBDIR_PREFIX "/libwrt-injected-bundle.so");
 static const std::string caCertPath("/opt/usr/share/certs/ca-certificate.crt");
 
 #ifdef __arm__
index ae0fc98..024e4d7 100644 (file)
@@ -54,4 +54,4 @@ target_link_libraries(${TARGET_PLUGIN_MODULE_LIB}
 )
 
 INSTALL(TARGETS ${TARGET_PLUGIN_MODULE_LIB}
-    DESTINATION lib)
+    DESTINATION ${LIB_INSTALL_DIR})
index 03cd2fb..a8d5b7e 100644 (file)
@@ -33,7 +33,7 @@ TARGET_LINK_LIBRARIES(${TARGET_PROFILING_LIB}
 )
 
 INSTALL(TARGETS ${TARGET_PROFILING_LIB}
-    DESTINATION lib
+    DESTINATION ${LIB_INSTALL_DIR}
     PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
     GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
 )
index 6df3a2a..8cffe57 100644 (file)
@@ -63,7 +63,7 @@ TARGET_LINK_LIBRARIES(
 )
 
 # for encryption
-TARGET_LINK_LIBRARIES(${TARGET_INJECTED_BUNDLE_LIB} -L/usr/lib/osp -losp-appfw)
+TARGET_LINK_LIBRARIES(${TARGET_INJECTED_BUNDLE_LIB} -L${LIB_INSTALL_DIR}/osp -losp-appfw)
 
 SET_TARGET_PROPERTIES(${TARGET_INJECTED_BUNDLE_LIB} PROPERTIES
     VERSION ${PROJECT_VERSION}
@@ -76,7 +76,7 @@ SET_TARGET_PROPERTIES(${TARGET_INJECTED_BUNDLE_LIB} PROPERTIES
 )
 
 INSTALL(TARGETS ${TARGET_INJECTED_BUNDLE_LIB}
-    DESTINATION lib/
+    DESTINATION ${LIB_INSTALL_DIR}/
     PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
     GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
 )
index 16aaf9e..6c2619a 100644 (file)
@@ -49,7 +49,7 @@ const char *EDJE_SHOW_BACKWARD_SIGNAL = "show,backward,signal";
 const std::string VIEWMODE_TYPE_FULLSCREEN = "fullscreen";
 const std::string VIEWMODE_TYPE_MAXIMIZED = "maximized";
 char const* const ELM_SWALLOW_CONTENT = "elm.swallow.content";
-const char* const BUNDLE_PATH = "/usr/lib/libwrt-injected-bundle.so";
+const char* const BUNDLE_PATH = LIBDIR_PREFIX "/libwrt-injected-bundle.so";
 const char* const caCertPath = "/opt/usr/share/certs/ca-certificate.crt";
 
 // process pool
index 9d78b15..13bfc35 100644 (file)
@@ -59,7 +59,8 @@ TARGET_LINK_LIBRARIES( ${WRT_LAUNCH_PAD_NAME}
     ${WRT_LAUNCH_PAD_DEPS_LIBRARIES}
     ${CMAKE_DL_LIBS}
 )
-
+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/legacy/preload_list_wrt.txt.in
+    ${CMAKE_CURRENT_SOURCE_DIR}/legacy/preload_list_wrt.txt @ONLY)
 #install
 INSTALL(TARGETS ${WRT_LAUNCH_PAD_NAME} DESTINATION bin)
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/legacy/preload_list_wrt.txt DESTINATION /usr/share/aul )
diff --git a/src/wrt-launchpad-daemon/legacy/preload_list_wrt.txt b/src/wrt-launchpad-daemon/legacy/preload_list_wrt.txt
deleted file mode 100644 (file)
index 675f10b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-/usr/bin/wrt-client
-/usr/lib/libwrt-injected-bundle.so
-/usr/lib/wrt-plugins/w3c-widget-interface/libwrt-plugins-w3c-widget-interface.so
-/usr/lib/wrt-plugins/tizen-tizen/libwrt-plugins-tizen-tizen.so
diff --git a/src/wrt-launchpad-daemon/legacy/preload_list_wrt.txt.in b/src/wrt-launchpad-daemon/legacy/preload_list_wrt.txt.in
new file mode 100644 (file)
index 0000000..4a4f9c1
--- /dev/null
@@ -0,0 +1,4 @@
+/usr/bin/wrt-client
+@LIB_INSTALL_DIR@/libwrt-injected-bundle.so
+@LIB_INSTALL_DIR@/wrt-plugins/w3c-widget-interface/libwrt-plugins-w3c-widget-interface.so
+@LIB_INSTALL_DIR@/wrt-plugins/tizen-tizen/libwrt-plugins-tizen-tizen.so
\ No newline at end of file