Add multiuser support. 76/53576/3 accepted/tizen/mobile/20151208.130941 submit/tizen_mobile/20151208.051250
authorRahul Dadhich <r.dadhich@samsung.com>
Tue, 8 Dec 2015 04:23:43 +0000 (09:53 +0530)
committerRahul Dadhich <r.dadhich@samsung.com>
Tue, 8 Dec 2015 04:47:48 +0000 (10:17 +0530)
Change-Id: I3b986ed3b683cd0cd4bc6b902369085ab0c0e4c8
Signed-off-by: Rahul Dadhich <r.dadhich@samsung.com>
CMakeLists.txt
packaging/attach-panel-gallery.spec
res/po/CMakeLists.txt

index 97644d0..223b6c1 100644 (file)
@@ -57,6 +57,7 @@ pkg_check_modules(pkgs REQUIRED
        notification
        appsvc
        storage
+       libtzplatform-config
 )
 
 FOREACH(flag ${pkgs_CFLAGS})
@@ -100,17 +101,17 @@ ADD_CUSTOM_COMMAND(OUTPUT attach-panel-gallery-images.edj
 ADD_CUSTOM_TARGET(gallery_efl_edj_build DEPENDS attach-panel-gallery.edj attach-panel-gallery-images.edj)
 ADD_DEPENDENCIES(${PROJECT_NAME} gallery_efl_edj_build)
 
-INSTALL(FILES ${CMAKE_BINARY_DIR}/attach-panel-gallery.edj DESTINATION /usr/ug/res/edje/attach-panel-gallery)
-INSTALL(FILES ${CMAKE_BINARY_DIR}/attach-panel-gallery-images.edj DESTINATION /usr/ug/res/edje/attach-panel-gallery)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/attach-panel-gallery.edj DESTINATION ${RESDIR}/edje/attach-panel-gallery)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/attach-panel-gallery-images.edj DESTINATION ${RESDIR}/edje/attach-panel-gallery)
 
-INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/res/${GE_IMG_C_DIR} DESTINATION /usr/ug/res/images/attach-panel-gallery)
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /usr/ug/lib)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/res/${GE_IMG_C_DIR} DESTINATION ${RESDIR}/images/attach-panel-gallery)
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIBDIR})
 
-INSTALL(FILES attach-panel-gallery.xml DESTINATION /usr/share/packages)
+INSTALL(FILES attach-panel-gallery.xml DESTINATION ${TZ_SYS_RO_PACKAGES})
 
 # i18n
 ADD_SUBDIRECTORY(res/po)
 
 # Install appcontrol icon
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/icon/attach-panel-gallery.png DESTINATION /usr/ug/res/images/attach-panel-gallery)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/icon/attach-panel-gallery.png DESTINATION ${RESDIR}/images/attach-panel-gallery)
 
index 59a1ec8..a929498 100644 (file)
@@ -1,11 +1,3 @@
-%define _optdir        /opt/usr
-%define _usrdir        /usr
-%define _appdir        %{_usrdir}/apps
-%define _appdatadir    %{_optdir}/apps
-%define _ugdir %{_usrdir}/ug
-
-%define _datadir /opt%{_ugdir}/data
-%define _sharedir /opt/usr/media/.iv
 Name:       attach-panel-gallery
 Summary:    attach-panel-gallery UX
 Version:    1.3.21
@@ -35,6 +27,7 @@ BuildRequires: pkgconfig(capi-content-media-content)
 BuildRequires: pkgconfig(appsvc)
 BuildRequires: pkgconfig(efl-extension)
 BuildRequires: pkgconfig(storage)
+BuildRequires: pkgconfig(libtzplatform-config)
 
 %description
 Description: attach-panel-gallery UG
@@ -44,6 +37,8 @@ Description: attach-panel-gallery 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"
@@ -54,37 +49,34 @@ export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE"
 CXXFLAGS+=" -D_ARCH_ARM_ -mfpu=neon"
 %endif
 
-cmake . -DCMAKE_INSTALL_PREFIX=%{_ugdir}/ug-attach-panel-gallery  -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-gallery/data ]
-then
-        mkdir -p %{buildroot}/opt/usr/apps/attach-panel-gallery/data
-fi
 
 %make_install
 
-mkdir -p %{buildroot}/usr/share/license
-mkdir -p %{buildroot}%{_sharedir}
-cp LICENSE %{buildroot}/usr/share/license/attach-panel-gallery
+mkdir -p %{buildroot}%{_app_license_dir}
+cp LICENSE %{buildroot}%{_app_license_dir}/attach-panel-gallery
 
 
 %post
 mkdir -p /usr/ug/bin/
-ln -sf /usr/bin/ug-client /usr/ug/bin/attach-panel-gallery
+ln -sf /usr/bin/ug-client %{TZ_SYS_RO_UG}/bin/attach-panel-gallery
 %postun
 
 %files
 %manifest attach-panel-gallery.manifest
 %defattr(-,root,root,-)
-%{_ugdir}/lib/libug-attach-panel-gallery.so*
-%{_ugdir}/res/edje/attach-panel-gallery/*
-%{_ugdir}/res/images/attach-panel-gallery/*
-%{_ugdir}/res/locale/*/*/attach-panel-gallery.mo
-/usr/share/packages/attach-panel-gallery.xml
-/usr/ug/res/images/attach-panel-gallery/attach-panel-gallery.png
-/usr/share/license/attach-panel-gallery
+%{TZ_SYS_RO_UG}/lib/libug-attach-panel-gallery.so*
+%{TZ_SYS_RO_UG}/res/edje/attach-panel-gallery/*
+%{TZ_SYS_RO_UG}/res/images/attach-panel-gallery/*
+%{TZ_SYS_RO_UG}/res/locale/*/*/attach-panel-gallery.mo
+%{TZ_SYS_RO_PACKAGES}/attach-panel-gallery.xml
+%{TZ_SYS_RO_UG}/res/images/attach-panel-gallery/attach-panel-gallery.png
+%{TZ_SYS_SHARE}/license/attach-panel-gallery
 
index 8ccda18..d6c3f86 100644 (file)
@@ -8,6 +8,7 @@
 SET(POFILES ar.po az.po bg.po bn.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 gu.po hi.po hr.po hu.po hy.po is.po it_IT.po ja_JP.po ka.po kk.po kn.po ko_KR.po lt.po lv.po mk.po ml.po mn_MN.po mr.po nb.po nl.po or.po pa.po pl.po pt_BR.po pt_PT.po ro.po ru_RU.po si.po sk.po sl.po sr.po sv.po ta.po te.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})
@@ -22,8 +23,8 @@ FOREACH(pofile ${POFILES})
        )
        #INSTALL(FILES ${moFile} DESTINATION res/locale/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
 #Share mo files with Gallery UG.
-       #INSTALL(FILES ${moFile} DESTINATION /usr/ug/res/locale/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
-       INSTALL(FILES ${moFile} DESTINATION /usr/ug/res/locale/${lang}/LC_MESSAGES RENAME attach-panel-gallery.mo)
+       #INSTALL(FILES ${moFile} DESTINATION ${LOCALEDIR}/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
+       INSTALL(FILES ${moFile} DESTINATION ${LOCALEDIR}/${lang}/LC_MESSAGES RENAME attach-panel-gallery.mo)
        SET(moFiles ${moFiles} ${moFile})
 ENDFOREACH(pofile)