Release version 0.3.1
[platform/core/base/syspopup.git] / packaging / syspopup.spec
index 4a4506f..527d453 100644 (file)
@@ -1,9 +1,6 @@
-%bcond_with x
-%bcond_with wayland
-
 Name:           syspopup
 Summary:        Syspopup package
-Version:        0.1.0
+Version:        0.3.1
 Release:        0
 Group:          System/Libraries
 License:        Apache-2.0
@@ -19,22 +16,17 @@ BuildRequires:  pkgconfig(bundle)
 BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(gio-2.0)
-%if %{with wayland}
-BuildRequires:  pkgconfig(ecore-wayland)
+BuildRequires:  pkgconfig(ecore-wl2)
 BuildRequires:  pkgconfig(capi-ui-efl-util)
-%else
-%if %{with x}
-BuildRequires:  pkgconfig(utilX)
-BuildRequires:  pkgconfig(x11)
-BuildRequires:  pkgconfig(ecore-x)
-%endif
-%endif
 BuildRequires:  pkgconfig(evas)
 BuildRequires:  pkgconfig(elementary)
 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
 
@@ -72,30 +64,21 @@ syspopup-caller development package for popup
 cp %{SOURCE1001} %{SOURCE1002} %{SOURCE1003} %{SOURCE1004} .
 
 %build
-
-%cmake \
-%if %{with wayland}
-       -Dwith_wayland=TRUE \
-%else
-%if %{with x}
-       -Dwith_x11=TRUE \
-%endif
-%endif
-       -DTZ_SYS_RO_PACKAGES=%{TZ_SYS_RO_PACKAGES} \
+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}
 
 %install
 %make_install
-mkdir -p %{buildroot}%{TZ_SYS_RO_SHARE}/license
-install LICENSE %{buildroot}%{TZ_SYS_RO_SHARE}/license/%{name}
-install LICENSE %{buildroot}%{TZ_SYS_RO_SHARE}/license/%{name}-devel
-install LICENSE %{buildroot}%{TZ_SYS_RO_SHARE}/license/%{name}-caller
-install LICENSE %{buildroot}%{TZ_SYS_RO_SHARE}/license/%{name}-caller-devel
-
+mkdir -p %{buildroot}%{_datadir}
 touch %{buildroot}%{_datadir}/popup_noti_term
 
 mkdir -p %{buildroot}%{upgrade_script_path}
@@ -112,15 +95,60 @@ 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,-)
 %{_bindir}/sp_test
 %{_bindir}/sp_initdb
-%{_libdir}/libsyspopup.so.0.1.0
+%{_libdir}/libsyspopup.so.*
 %{_datadir}/popup_noti_term
-%TZ_SYS_RO_SHARE/license/%{name}
+%license LICENSE
 %{upgrade_script_path}/502.syspopup_upgrade.sh
+%{_sysconfdir}/syspopup/preload/*
+%{_prefix}/share/syspopup/*
 
 %files devel
 %manifest %{name}-devel.manifest
@@ -129,13 +157,12 @@ cp -f scripts/502.syspopup_upgrade.sh %{buildroot}%{upgrade_script_path}
 %{_includedir}/syspopup.h
 %{_libdir}/libsyspopup.so
 %{_libdir}/pkgconfig/syspopup.pc
-%TZ_SYS_RO_SHARE/license/%{name}-devel
 
 %files caller
 %manifest %{name}-caller.manifest
 %defattr(-,root,root,-)
-%{_libdir}/libsyspopup_caller.so.0.1.0
-%TZ_SYS_RO_SHARE/license/%{name}-caller
+%{_libdir}/libsyspopup_caller.so.*
+%license LICENSE
 
 %files caller-devel
 %manifest %{name}-caller-devel.manifest
@@ -143,4 +170,3 @@ cp -f scripts/502.syspopup_upgrade.sh %{buildroot}%{upgrade_script_path}
 %{_libdir}/libsyspopup_caller.so
 %{_includedir}/syspopup_caller.h
 %{_libdir}/pkgconfig/syspopup-caller.pc
-%TZ_SYS_RO_SHARE/license/%{name}-caller-devel