Changes in attach panel voicerecoder for Multi user 45/53645/2 accepted/tizen/mobile/20151208.131207 submit/tizen_mobile/20151208.112134
authorsahil.ch525 <sahil.ch525@samsung.com>
Tue, 8 Dec 2015 10:46:10 +0000 (16:16 +0530)
committersahil.ch525 <sahil.ch525@samsung.com>
Tue, 8 Dec 2015 10:51:38 +0000 (16:21 +0530)
Change-Id: Ibbdb44d4bcc61b78af1a270fe6d6eb752915a6ed
Signed-off-by: sahil.ch525 <sahil.ch525@samsung.com>
CMakeLists.txt
packaging/attach-panel-voicerecorder.spec
res/po/CMakeLists.txt

index 91e7973..bcb54f3 100644 (file)
@@ -6,7 +6,7 @@ IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
 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")
@@ -47,6 +47,7 @@ pkg_check_modules(pkgs REQUIRED
        capi-appfw-application
        ui-gadget-1
        capi-content-media-content
+       libtzplatform-config
 )
 
 FOREACH(flag ${pkgs_CFLAGS})
@@ -88,15 +89,15 @@ ADD_CUSTOM_COMMAND(OUTPUT audio_recorder.edj
 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)
index 19e7ccd..57fbcf7 100644 (file)
@@ -1,7 +1,3 @@
-%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
@@ -28,6 +24,7 @@ BuildRequires: pkgconfig(capi-media-recorder)
 BuildRequires: pkgconfig(capi-appfw-application)
 BuildRequires: pkgconfig(ui-gadget-1)
 BuildRequires: pkgconfig(capi-content-media-content)
+BuildRequires: pkgconfig(libtzplatform-config)
 
 %description
 Description: voicerecorder UG
@@ -37,6 +34,8 @@ 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"
@@ -47,34 +46,31 @@ export FFLAGS="$FFLAGS -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
 
index 1c0c79b..06850be 100644 (file)
@@ -8,6 +8,7 @@
 SET(POFILES ar.po az.po bg.po ca.po cs.po da.po de.po el_GR.po en_PH.po en.po en_US.po es_ES.po es_US.po et.po eu.po fi.po fr_CA.po fr.po ga.po gl.po hi.po hr.po hu.po hy.po is.po it_IT.po ja_JP.po ka.po kk.po ko_KR.po lt.po lv.po mk.po nb.po nl.po pl.po pt_BR.po pt_PT.po ro.po ru_RU.po sk.po sl.po sr.po sv.po tr_TR.po uk.po uz.po zh_CN.po zh_HK.po zh_TW.po)
 
 SET(MSGFMT "/usr/bin/msgfmt")
+SET(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/res/locale")
 
 FOREACH(pofile ${POFILES})
        SET(pofile ${CMAKE_CURRENT_SOURCE_DIR}/${pofile})