- 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
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 "")
# 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)
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 )
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
#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
+++ /dev/null
-/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
--- /dev/null
+@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
%setup -q
%build
-cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
+%cmake .
make %{?jobs:-j%jobs}
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
/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