Fix for 64 bit compatibility.
authorJunfeng Dong <junfeng.dong@intel.com>
Fri, 29 Mar 2013 05:48:07 +0000 (13:48 +0800)
committerJunfeng Dong <junfeng.dong@intel.com>
Fri, 29 Mar 2013 05:48:50 +0000 (13:48 +0800)
- 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
aul.pc.in
feature/preexec_list.txt.in [moved from feature/preexec_list.txt with 59% similarity, mode: 0644]
legacy/preload_list.txt [deleted file]
legacy/preload_list.txt.in [new file with mode: 0644]
packaging/aul.spec

index 635fd81..3bb7071 100755 (executable)
@@ -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 )
index edb7e62..5f451d9 100644 (file)
--- 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
old mode 100755 (executable)
new mode 100644 (file)
similarity index 59%
rename from feature/preexec_list.txt
rename to feature/preexec_list.txt.in
index 03f4545..6dbc726
@@ -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 (file)
index fbb6fca..0000000
+++ /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 (file)
index 0000000..3d39dd4
--- /dev/null
@@ -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
index 9aeb442..e4fec6a 100644 (file)
@@ -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