From 8e1911c6ac0b3fdc478e369db56aa1bd94375188 Mon Sep 17 00:00:00 2001 From: Junfeng Dong Date: Fri, 29 Mar 2013 13:48:07 +0800 Subject: [PATCH] Fix for 64 bit compatibility. - Fix hardcoding path. - Use %cmake to set default paths. - systemd get service only into /usr/lib on both 32 and 64 platform. Change-Id: I73106f7acc547804cd4b771b56f023b45a81bcfc --- CMakeLists.txt | 9 ++++----- aul.pc.in | 6 +++--- feature/{preexec_list.txt => preexec_list.txt.in} | 2 +- legacy/preload_list.txt | 5 ----- legacy/preload_list.txt.in | 5 +++++ packaging/aul.spec | 20 ++++++++++---------- 6 files changed, 23 insertions(+), 24 deletions(-) rename feature/{preexec_list.txt => preexec_list.txt.in} (59%) mode change 100755 => 100644 delete mode 100644 legacy/preload_list.txt create mode 100644 legacy/preload_list.txt.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 635fd81..3bb7071 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,8 +9,6 @@ SET(VERSION "${VERSION_MAJOR}.1.0") SET(PREFIX ${CMAKE_INSTALL_PREFIX}) SET(EXEC_PREFIX "\${prefix}") -SET(LIBDIR "\${prefix}/lib") -SET(INCLUDEDIR "\${prefix}/include/aul") # Build type : Release IF("${CMAKE_BUILD_TYPE}" STREQUAL "") @@ -134,10 +132,11 @@ INSTALL(TARGETS ${LAUNCH_AGENT} DESTINATION bin) # pkgconfig file CONFIGURE_FILE(aul.pc.in aul.pc @ONLY) - +CONFIGURE_FILE(legacy/preload_list.txt.in legacy/preload_list.txt @ONLY) +CONFIGURE_FILE(feature/preexec_list.txt.in feature/preexec_list.txt @ONLY) ### Install ### -INSTALL(TARGETS aul DESTINATION lib COMPONENT RuntimeLibraries) +INSTALL(TARGETS aul DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries) INSTALL(TARGETS ${AVATAR_NAME} DESTINATION bin) INSTALL(TARGETS amd DESTINATION bin) @@ -147,7 +146,7 @@ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/SLP_AUL_PG.h DESTINATION inclu INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/aul_service.sh DESTINATION bin) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/aul_service_test.sh DESTINATION bin) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/aul_mime.sh DESTINATION bin) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/aul.pc DESTINATION lib/pkgconfig) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/aul.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/legacy/preload_list.txt DESTINATION /usr/share/aul ) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/feature/preexec_list.txt DESTINATION /usr/share/aul ) diff --git a/aul.pc.in b/aul.pc.in index edb7e62..5f451d9 100644 --- a/aul.pc.in +++ b/aul.pc.in @@ -2,12 +2,12 @@ prefix=/usr exec_prefix=@EXEC_PREFIX@ -libdir=@LIBDIR@ -includedir=@INCLUDEDIR@ +libdir=@LIB_INSTALL_DIR@ +includedir=@INCLUDE_INSTALL_DIR@ Name: libaul Description: new application utility library Version: @VERSION@ Requires: sqlite3 bundle ail glib-2.0 xdgmime Libs: -L${libdir} -laul -Cflags: -I${includedir} +Cflags: -I${includedir} -I${includedir}/aul diff --git a/feature/preexec_list.txt b/feature/preexec_list.txt.in old mode 100755 new mode 100644 similarity index 59% rename from feature/preexec_list.txt rename to feature/preexec_list.txt.in index 03f4545..6dbc726 --- a/feature/preexec_list.txt +++ b/feature/preexec_list.txt.in @@ -1,4 +1,4 @@ #preexec configuration ##usage## #[type]: [preexec so path], [preexec symbol name] -tpk: /usr/lib/libosp-env-config.so, do_pre_exec +tpk: @LIB_INSTALL_DIR@/libosp-env-config.so, do_pre_exec diff --git a/legacy/preload_list.txt b/legacy/preload_list.txt deleted file mode 100644 index fbb6fca..0000000 --- a/legacy/preload_list.txt +++ /dev/null @@ -1,5 +0,0 @@ -/usr/lib/libappcore-efl.so.1 -/usr/lib/libappcore-common.so.1 -/usr/lib/ecore/immodules/libisf-imf-module.so -/usr/lib/osp/libosp-appfw.so -/usr/lib/osp/libosp-uifw.so diff --git a/legacy/preload_list.txt.in b/legacy/preload_list.txt.in new file mode 100644 index 0000000..3d39dd4 --- /dev/null +++ b/legacy/preload_list.txt.in @@ -0,0 +1,5 @@ +@LIB_INSTALL_DIR@/libappcore-efl.so.1 +@LIB_INSTALL_DIR@/libappcore-common.so.1 +@LIB_INSTALL_DIR@/ecore/immodules/libisf-imf-module.so +@LIB_INSTALL_DIR@/osp/libosp-appfw.so +@LIB_INSTALL_DIR@/osp/libosp-uifw.so diff --git a/packaging/aul.spec b/packaging/aul.spec index 9aeb442..e4fec6a 100644 --- a/packaging/aul.spec +++ b/packaging/aul.spec @@ -52,7 +52,7 @@ Application utility library (devel) %setup -q %build -cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} +%cmake . make %{?jobs:-j%jobs} @@ -72,11 +72,11 @@ mkdir -p %{buildroot}/opt/dbspace sqlite3 %{buildroot}/opt/dbspace/.mida.db < %{buildroot}/usr/share/aul/mida_db.sql rm -rf %{buildroot}/usr/share/aul/mida_db.sql -mkdir -p %{buildroot}%{_libdir}/systemd/system/graphical.target.wants -install -m 0644 %SOURCE101 %{buildroot}%{_libdir}/systemd/system/launchpad-preload@.service -install -m 0644 %SOURCE102 %{buildroot}%{_libdir}/systemd/system/ac.service -ln -s ../launchpad-preload@.service %{buildroot}%{_libdir}/systemd/system/graphical.target.wants/launchpad-preload@app.service -ln -s ../ac.service %{buildroot}%{_libdir}/systemd/system/graphical.target.wants/ac.service +mkdir -p %{buildroot}/usr/lib/systemd/system/graphical.target.wants +install -m 0644 %SOURCE101 %{buildroot}/usr/lib/systemd/system/launchpad-preload@.service +install -m 0644 %SOURCE102 %{buildroot}/usr/lib/systemd/system/ac.service +ln -s ../launchpad-preload@.service %{buildroot}/usr/lib/systemd/system/graphical.target.wants/launchpad-preload@app.service +ln -s ../ac.service %{buildroot}/usr/lib/systemd/system/graphical.target.wants/ac.service %preun @@ -115,10 +115,10 @@ systemctl daemon-reload /usr/share/aul/preload_list.txt /usr/share/aul/preexec_list.txt %{_bindir}/launchpad_preloading_preinitializing_daemon -%{_libdir}/systemd/system/graphical.target.wants/launchpad-preload@app.service -%{_libdir}/systemd/system/graphical.target.wants/ac.service -%{_libdir}/systemd/system/launchpad-preload@.service -%{_libdir}/systemd/system/ac.service +/usr/lib/systemd/system/graphical.target.wants/launchpad-preload@app.service +/usr/lib/systemd/system/graphical.target.wants/ac.service +/usr/lib/systemd/system/launchpad-preload@.service +/usr/lib/systemd/system/ac.service /usr/bin/amd /usr/bin/daemon-manager-release-agent /usr/bin/daemon-manager-launch-agent -- 2.7.4