Release version 0.3.1
[platform/core/base/syspopup.git] / packaging / syspopup.spec
old mode 100755 (executable)
new mode 100644 (file)
index a6edc04..527d453
@@ -1,9 +1,6 @@
-%bcond_with x
-%bcond_with wayland
-
 Name:           syspopup
 Summary:        Syspopup package
-Version:        0.0.96
+Version:        0.3.1
 Release:        0
 Group:          System/Libraries
 License:        Apache-2.0
@@ -17,21 +14,25 @@ BuildRequires:  cmake
 BuildRequires:  pkgconfig(sqlite3)
 BuildRequires:  pkgconfig(bundle)
 BuildRequires:  pkgconfig(dlog)
-BuildRequires:  pkgconfig(dbus-glib-1)
-%if %{with x}
-BuildRequires:  pkgconfig(utilX)
-BuildRequires:  pkgconfig(x11)
-BuildRequires:  pkgconfig(ecore-x)
-%endif
-BuildRequires:  pkgconfig(aul)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(gio-2.0)
+BuildRequires:  pkgconfig(ecore-wl2)
+BuildRequires:  pkgconfig(capi-ui-efl-util)
 BuildRequires:  pkgconfig(evas)
-BuildRequires:  pkgconfig(appcore-efl)
+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
 
 %description
 syspopup package for popup
 
-
 %package devel
 Summary:    Syspopup development package
 Group:      System/Libraries
@@ -58,29 +59,31 @@ Requires:   %{name} = %{version}-%{release}
 %description caller-devel
 syspopup-caller development package for popup
 
-
 %prep
 %setup -q
 cp %{SOURCE1001} %{SOURCE1002} %{SOURCE1003} %{SOURCE1004} .
 
 %build
-%cmake . \
-%if %{with wayland} && !%{with x}
--Dwith_wayland=TRUE \
-%endif
--DEXTRA_CFLAGS=-fPIC
+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_DB}
-sqlite3 %{buildroot}%{TZ_SYS_DB}/.syspopup.db < %{buildroot}/usr/share/syspopup/syspopup_db.sql
-rm -rf %{buildroot}/usr/share/syspopup/syspopup_db.sql
-
+mkdir -p %{buildroot}%{_datadir}
 touch %{buildroot}%{_datadir}/popup_noti_term
 
+mkdir -p %{buildroot}%{upgrade_script_path}
+cp -f scripts/502.syspopup_upgrade.sh %{buildroot}%{upgrade_script_path}
+
 %post -p /sbin/ldconfig
 
 %postun -p /sbin/ldconfig
@@ -89,19 +92,63 @@ touch %{buildroot}%{_datadir}/popup_noti_term
 
 %postun caller -p /sbin/ldconfig
 
+%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,-)
-%{_datadir}/icons/default/small/org.tizen.syspopup-app.png
 %{_bindir}/sp_test
-%{_bindir}/syspopup-app
-%{_libdir}/libsyspopup.so.0.1.0
-%TZ_SYS_RO_PACKAGES/org.tizen.syspopup-app.xml
+%{_bindir}/sp_initdb
+%{_libdir}/libsyspopup.so.*
 %{_datadir}/popup_noti_term
-
-%attr(644,root,%{TZ_SYS_USER_GROUP}) %{TZ_SYS_DB}/.syspopup.db
-%attr(644,root,%{TZ_SYS_USER_GROUP}) %{TZ_SYS_DB}/.syspopup.db-journal
-
+%license LICENSE
+%{upgrade_script_path}/502.syspopup_upgrade.sh
+%{_sysconfdir}/syspopup/preload/*
+%{_prefix}/share/syspopup/*
 
 %files devel
 %manifest %{name}-devel.manifest
@@ -114,7 +161,8 @@ touch %{buildroot}%{_datadir}/popup_noti_term
 %files caller
 %manifest %{name}-caller.manifest
 %defattr(-,root,root,-)
-%{_libdir}/libsyspopup_caller.so.0.1.0
+%{_libdir}/libsyspopup_caller.so.*
+%license LICENSE
 
 %files caller-devel
 %manifest %{name}-caller-devel.manifest
@@ -122,13 +170,3 @@ touch %{buildroot}%{_datadir}/popup_noti_term
 %{_libdir}/libsyspopup_caller.so
 %{_includedir}/syspopup_caller.h
 %{_libdir}/pkgconfig/syspopup-caller.pc
-
-%changelog
-* Fri Jun 21 2013 - Hyungdeuk Kim <hd3.kim@samsung.com>
-- Change end key term info of wifi-qs
-
-* Fri Apr 12 2013 - Hyungdeuk Kim <hd3.kim@samsung.com>
-- Remove drm syspopup requested by hakjoo.ko
-
-* Tue Apr 2 2013 - Hyugdeuk Kim <hd3.kim@samsung.com>
-- Add syspopup_reset_timeout api