Release version 0.3.1
[platform/core/base/syspopup.git] / packaging / syspopup.spec
index 532c148..527d453 100644 (file)
@@ -1,6 +1,6 @@
 Name:           syspopup
 Summary:        Syspopup package
-Version:        0.2.4
+Version:        0.3.1
 Release:        0
 Group:          System/Libraries
 License:        Apache-2.0
@@ -16,7 +16,7 @@ BuildRequires:  pkgconfig(bundle)
 BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(gio-2.0)
-BuildRequires:  pkgconfig(ecore-wayland)
+BuildRequires:  pkgconfig(ecore-wl2)
 BuildRequires:  pkgconfig(capi-ui-efl-util)
 BuildRequires:  pkgconfig(evas)
 BuildRequires:  pkgconfig(elementary)
@@ -24,6 +24,9 @@ BuildRequires:  pkgconfig(libtzplatform-config)
 BuildRequires:  pkgconfig(aul)
 BuildRequires:  pkgconfig(capi-system-info)
 BuildRequires:  pkgconfig(libsmack)
+BuildRequires:  pkgconfig(libxml-2.0)
+
+Requires(posttrans): /usr/bin/rm
 
 %define upgrade_script_path /usr/share/upgrade/scripts
 
@@ -61,13 +64,14 @@ syspopup-caller development package for popup
 cp %{SOURCE1001} %{SOURCE1002} %{SOURCE1003} %{SOURCE1004} .
 
 %build
-
+export CFLAGS+=" -DEFL_BETA_API_SUPPORT "
 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
 %cmake -DTZ_SYS_RO_PACKAGES=%{TZ_SYS_RO_PACKAGES} \
        -DTZ_SYS_RO_SHARE=%{TZ_SYS_RO_SHARE} \
        -DEXTRA_CFLAGS=-fPIC \
        -DFULLVER=%{version} \
        -DMAJORVER=${MAJORVER} \
+       -DSYSCONFDIR=%{_sysconfdir} \
        .
 
 make %{?jobs:-j%jobs}
@@ -91,6 +95,49 @@ cp -f scripts/502.syspopup_upgrade.sh %{buildroot}%{upgrade_script_path}
 %posttrans
 /usr/bin/sp_initdb
 
+if [ -e %{_sysconfdir}/config/model-config.xml ]; then
+       PROFILE=`grep "feature\/profile" %{_sysconfdir}/config/model-config.xml`
+       if [[ "${PROFILE}" == *"mobile"* ]]; then
+               rm -rf %{_datarootdir}/syspopup/wearable
+               rm -rf %{_datarootdir}/syspopup/tv
+               rm -rf %{_datarootdir}/syspopup/common
+               rm -rf %{_datarootdir}/syspopup/ivi
+       elif [[ "${PROFILE}" == *"wearable"* ]]; then
+               rm -rf %{_datarootdir}/syspopup/mobile
+               rm -rf %{_datarootdir}/syspopup/tv
+               rm -rf %{_datarootdir}/syspopup/common
+               rm -rf %{_datarootdir}/syspopup/ivi
+       elif [[ "${PROFILE}" == *"tv"* ]]; then
+               rm -rf %{_datarootdir}/syspopup/mobile
+               rm -rf %{_datarootdir}/syspopup/wearable
+               rm -rf %{_datarootdir}/syspopup/common
+               rm -rf %{_datarootdir}/syspopup/ivi
+       elif [[ "${PROFILE}" == *"common"* ]]; then
+               rm -rf %{_datarootdir}/syspopup/mobile
+               rm -rf %{_datarootdir}/syspopup/wearable
+               rm -rf %{_datarootdir}/syspopup/tv
+               rm -rf %{_datarootdir}/syspopup/ivi
+       elif [[ "${PROFILE}" == *"ivi"* ]]; then
+               rm -rf %{_datarootdir}/syspopup/mobile
+               rm -rf %{_datarootdir}/syspopup/wearable
+               rm -rf %{_datarootdir}/syspopup/tv
+               rm -rf %{_datarootdir}/syspopup/common
+       else
+               rm -rf %{_datarootdir}/syspopup/mobile
+               rm -rf %{_datarootdir}/syspopup/wearable
+               rm -rf %{_datarootdir}/syspopup/tv
+               rm -rf %{_datarootdir}/syspopup/common
+               rm -rf %{_datarootdir}/syspopup/ivi
+
+       fi
+else
+       rm -rf %{_datarootdir}/syspopup/mobile
+       rm -rf %{_datarootdir}/syspopup/wearable
+       rm -rf %{_datarootdir}/syspopup/tv
+       rm -rf %{_datarootdir}/syspopup/common
+       rm -rf %{_datarootdir}/syspopup/ivi
+fi
+
 %files
 %manifest %{name}.manifest
 %defattr(-,root,root,-)
@@ -100,6 +147,8 @@ cp -f scripts/502.syspopup_upgrade.sh %{buildroot}%{upgrade_script_path}
 %{_datadir}/popup_noti_term
 %license LICENSE
 %{upgrade_script_path}/502.syspopup_upgrade.sh
+%{_sysconfdir}/syspopup/preload/*
+%{_prefix}/share/syspopup/*
 
 %files devel
 %manifest %{name}-devel.manifest