ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
-SET(PREFIX ${CMAKE_INSTALL_PREFIX}/ug)
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(LIBDIR "${PREFIX}/lib")
SET(RESDIR "${PREFIX}/res")
SET(DATADIR "${PREFIX}/data")
capi-appfw-application
ui-gadget-1
capi-content-media-content
+ libtzplatform-config
)
FOREACH(flag ${pkgs_CFLAGS})
ADD_CUSTOM_TARGET(audio_recorder_edj_build DEPENDS audio_recorder.edj)
ADD_DEPENDENCIES(${PROJECT_NAME} audio_recorder_edj_build)
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /usr/apps/${PROJECT_NAME}/lib/ug/)
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIBDIR})
-INSTALL(FILES ${CMAKE_BINARY_DIR}/audio_recorder.edj DESTINATION /usr/ug/res/edje/${PROJECT_NAME}/)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/audio_recorder.edj DESTINATION ${RESDIR}/edje/${PROJECT_NAME}/)
-INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/res/images/ DESTINATION /usr/ug/res/images/${PROJECT_NAME}/)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/res/images/ DESTINATION ${RESDIR}/images/${PROJECT_NAME}/)
#INSTALL(FILES ${PROJECT_NAME}.xml DESTINATION /usr/share/packages)
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/${PROJECT_NAME}.xml DESTINATION /usr/share/packages/)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/${PROJECT_NAME}.xml DESTINATION ${TZ_SYS_RO_PACKAGES}/)
# i18n
ADD_SUBDIRECTORY(res/po)
-%define _appdir %{_prefix}/apps
-%define _ugdir %{_prefix}/ug
-%define _datadir %{_prefix}/share
-%define _sharedir /opt/usr/media/.iv
Name: attach-panel-voicerecorder
Summary: voicerecorder UX
Version: 0.1.0
BuildRequires: pkgconfig(capi-appfw-application)
BuildRequires: pkgconfig(ui-gadget-1)
BuildRequires: pkgconfig(capi-content-media-content)
+BuildRequires: pkgconfig(libtzplatform-config)
%description
Description: voicerecorder UG
%build
+%define _app_license_dir %{TZ_SYS_SHARE}/license
+
%if 0%{?tizen_build_binary_release_type_eng}
export CFLAGS="$CFLAGS -DTIZEN_ENGINEER_MODE"
export CXXFLAGS="$CXXFLAGS -DTIZEN_ENGINEER_MODE"
CXXFLAGS+=" -D_ARCH_ARM_ -mfpu=neon"
%endif
-%cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_DATA_DIR=%{_datadir} -DARCH=%{ARCH}
+%cmake . -DCMAKE_INSTALL_PREFIX=%{TZ_SYS_RO_UG} \
+ -DARCH=%{ARCH} \
+ -DTZ_SYS_RO_PACKAGES=%{TZ_SYS_RO_PACKAGES}
make %{?jobs:-j%jobs}
%install
rm -rf %{buildroot}
-if [ ! -d %{buildroot}/opt/usr/apps/attach-panel-voicerecorder/data ]
-then
- mkdir -p %{buildroot}/opt/usr/apps/attach-panel-voicerecorder/data
-fi
%make_install
-mkdir -p %{buildroot}/usr/share/license
-mkdir -p %{buildroot}%{_sharedir}
-cp LICENSE %{buildroot}/usr/share/license/attach-panel-voicerecorder
+mkdir -p %{buildroot}%{_app_license_dir}
+cp LICENSE %{buildroot}%{_app_license_dir}/attach-panel-voicerecorder
%post
-mkdir -p %{_prefix}/apps/%{name}/bin/
-ln -sf %{_prefix}/bin/ug-client %{_prefix}/apps/%{name}/bin/%{name}
+mkdir -p /usr/ug/bin/
+ln -sf %{_prefix}/bin/ug-client %{TZ_SYS_RO_UG}/bin/%{name}
%postun
%files
%manifest %{name}.manifest
%defattr(-,root,root,-)
-%{_appdir}/%{name}/lib/ug/libattach-panel-voicerecorder.so*
-%{_prefix}/ug/res/edje/attach-panel-voicerecorder/*
-%{_prefix}/ug/res/images/attach-panel-voicerecorder/*
-%{_prefix}/ug/res/locale/*
-%{_datadir}/packages/attach-panel-voicerecorder.xml
-%{_datadir}/license/attach-panel-voicerecorder
+%{TZ_SYS_RO_UG}/lib/libattach-panel-voicerecorder.so*
+%{TZ_SYS_RO_UG}/res/edje/attach-panel-voicerecorder/*
+%{TZ_SYS_RO_UG}/res/images/attach-panel-voicerecorder/*
+%{TZ_SYS_RO_UG}/res/locale/*
+%{TZ_SYS_RO_PACKAGES}/attach-panel-voicerecorder.xml
+%{TZ_SYS_SHARE}/license/attach-panel-voicerecorder