-%define _optdir /opt
-%define _appdir %{_optdir}/apps
-%define _ugdir %{_optdir}/ug
-%define _libdir %{_appdir}/org.tizen.email/lib
-
Name: org.tizen.email
-Summary: email application
-Version: 0.0.6
+Summary: Native email application
+Version: 0.0.40
Release: 1
Group: devel
License: Flora
Source0: %{name}-%{version}.tar.gz
Requires(post): /usr/bin/vconftool
-BuildRequires: cmake
-BuildRequires: libug-contacts-devel
-BuildRequires: libicu-devel
-BuildRequires: edje-tools
-BuildRequires: embryo-bin
-BuildRequires: gettext-tools
-BuildRequires: pkgconfig(appcore-common)
-BuildRequires: pkgconfig(appcore-efl)
-BuildRequires: pkgconfig(email-service)
-BuildRequires: pkgconfig(ecore)
-BuildRequires: pkgconfig(glib-2.0)
-BuildRequires: pkgconfig(elementary)
-BuildRequires: pkgconfig(db-util)
-BuildRequires: pkgconfig(sysman)
-BuildRequires: pkgconfig(utilX)
-BuildRequires: pkgconfig(ewebkit2)
-BuildRequires: pkgconfig(dlog)
-BuildRequires: pkgconfig(ui-gadget-1)
-BuildRequires: pkgconfig(bundle)
-BuildRequires: pkgconfig(edbus)
-BuildRequires: pkgconfig(efreet)
-BuildRequires: pkgconfig(capi-appfw-application)
-BuildRequires: pkgconfig(capi-base-common)
-BuildRequires: pkgconfig(contacts-service)
-BuildRequires: pkgconfig(ethumb)
-BuildRequires: pkgconfig(libmedia-utils)
-BuildRequires: pkgconfig(calendar)
-BuildRequires: pkgconfig(drm-client)
-BuildRequires: pkgconfig(status)
-BuildRequires: pkgconfig(capi-media-metadata-extractor)
-BuildRequires: pkgconfig(capi-media-image-util)
+BuildRequires: cmake
+BuildRequires: edje-tools
+BuildRequires: embryo-bin
+BuildRequires: gettext-tools
+BuildRequires: libug-contacts-devel
+BuildRequires: pkgconfig(icu-i18n)
+BuildRequires: pkgconfig(appcore-common)
+BuildRequires: pkgconfig(appcore-efl)
+BuildRequires: pkgconfig(email-service)
+BuildRequires: pkgconfig(ecore)
+BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(elementary)
+BuildRequires: pkgconfig(db-util)
+BuildRequires: pkgconfig(sysman)
+BuildRequires: pkgconfig(utilX)
+BuildRequires: pkgconfig(ewebkit2)
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(ui-gadget-1)
+BuildRequires: pkgconfig(bundle)
+BuildRequires: pkgconfig(edbus)
+BuildRequires: pkgconfig(efreet)
+BuildRequires: pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(capi-base-common)
+BuildRequires: pkgconfig(contacts-service2)
+BuildRequires: pkgconfig(ethumb)
+BuildRequires: pkgconfig(calendar-service2)
+BuildRequires: pkgconfig(drm-client)
+BuildRequires: pkgconfig(status)
+BuildRequires: pkgconfig(notification)
+BuildRequires: pkgconfig(capi-media-metadata-extractor)
+BuildRequires: pkgconfig(capi-media-image-util)
+BuildRequires: pkgconfig(capi-content-media-content)
+BuildRequires: pkgconfig(libexif)
+BuildRequires: pkgconfig(libxml-2.0)
+BuildRequires: pkgconfig(accounts-svc)
+Requires: email-service
+Requires: libug-worldclock-efl
%description
-Description: email application
+Description: Native email application
%prep
%setup -q
%build
+%define _usrdir /usr
+%define _ugdir %{_usrdir}/ug
+%define _appdir %{_usrdir}/apps
+%define _pkgdir %{_appdir}/%{name}
+%define _libdir %{_pkgdir}/lib
+%define _sharedir %{_usrdir}/share
+
export CFLAGS="${CFLAGS} -fPIC -Wall -g"
export CXXFLAGS="${CXXFLAGS} -fPIC -Wall -g"
export LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,-zdefs"
-cmake . -DCMAKE_INSTALL_PREFIX=%{_appdir}/org.tizen.email
+cmake . -DCMAKE_INSTALL_PREFIX=%{_pkgdir}
#make %{?jobs:-j%jobs}
make
%install
rm -rf %{buildroot}
-%make_install
+mkdir -p %{buildroot}/usr/share/license
+%make_install
%post
/usr/bin/vconftool set -t int file/private/org.tizen.email/defaultaccount "1" -g 6514
/usr/bin/vconftool set -t int file/private/org.tizen.email/slot_size "50" -g 6514
/usr/bin/vconftool set -t int file/private/org.tizen.email/spam_rule_changed "0" -g 6514
/usr/bin/vconftool set -t int file/private/org.tizen.email/threadlist "1" -g 6514
-/usr/bin/vconftool set -t string file/private/org.tizen.email/aol_sending_address "smtp.aol.com" -g 6514
-/usr/bin/vconftool set -t int file/private/org.tizen.email/aol_sending_port "587" -g 6514
-/usr/bin/vconftool set -t int file/private/org.tizen.email/aol_sending_ssl "0" -g 6514
-/usr/bin/vconftool set -t int file/private/org.tizen.email/aol_receiving_type "2" -g 6514
-/usr/bin/vconftool set -t string file/private/org.tizen.email/aol_receiving_address "imap.aol.com" -g 6514
-/usr/bin/vconftool set -t int file/private/org.tizen.email/aol_receiving_port "143" -g 6514
-/usr/bin/vconftool set -t int file/private/org.tizen.email/aol_receiving_ssl "0" -g 6514
-/usr/bin/vconftool set -t string file/private/org.tizen.email/gmail_sending_address "smtp.gmail.com" -g 6514
-/usr/bin/vconftool set -t int file/private/org.tizen.email/gmail_sending_port "465" -g 6514
-/usr/bin/vconftool set -t int file/private/org.tizen.email/gmail_sending_ssl "1" -g 6514
-/usr/bin/vconftool set -t int file/private/org.tizen.email/gmail_receiving_type "2" -g 6514
-/usr/bin/vconftool set -t string file/private/org.tizen.email/gmail_receiving_address "imap.gmail.com" -g 6514
-/usr/bin/vconftool set -t int file/private/org.tizen.email/gmail_receiving_port "993" -g 6514
-/usr/bin/vconftool set -t int file/private/org.tizen.email/gmail_receiving_ssl "1" -g 6514
-/usr/bin/vconftool set -t string file/private/org.tizen.email/yahoo_sending_address "smtp.mail.yahoo.co.kr" -g 6514
-/usr/bin/vconftool set -t int file/private/org.tizen.email/yahoo_sending_port "465" -g 6514
-/usr/bin/vconftool set -t int file/private/org.tizen.email/yahoo_sending_ssl "1" -g 6514
-/usr/bin/vconftool set -t int file/private/org.tizen.email/yahoo_receiving_type "1" -g 6514
-/usr/bin/vconftool set -t string file/private/org.tizen.email/yahoo_receiving_address "pop.mail.yahoo.co.kr" -g 6514
-/usr/bin/vconftool set -t int file/private/org.tizen.email/yahoo_receiving_port "995" -g 6514
-/usr/bin/vconftool set -t int file/private/org.tizen.email/yahoo_receiving_ssl "1" -g 6514
-/usr/bin/vconftool set -t string file/private/org.tizen.email/hotmail_sending_address "smtp.live.com" -g 6514
-/usr/bin/vconftool set -t int file/private/org.tizen.email/hotmail_sending_port "587" -g 6514
-/usr/bin/vconftool set -t int file/private/org.tizen.email/hotmail_sending_ssl "2" -g 6514
-/usr/bin/vconftool set -t int file/private/org.tizen.email/hotmail_receiving_type "1" -g 6514
-/usr/bin/vconftool set -t string file/private/org.tizen.email/hotmail_receiving_address "pop3.live.com" -g 6514
-/usr/bin/vconftool set -t int file/private/org.tizen.email/hotmail_receiving_port "995" -g 6514
-/usr/bin/vconftool set -t int file/private/org.tizen.email/hotmail_receiving_ssl "1" -g 6514
-
-chown -R 5000:5000 /opt/apps/org.tizen.email/data
-mkdir -p /opt/ug/bin/
-ln -sf /usr/bin/ug-client /opt/ug/bin/email-composer-efl
+chown -R 5000:5000 %{_pkgdir}/data
+mkdir -p %{_ugdir}/bin/
+ln -sf /usr/bin/ug-client %{_ugdir}/bin/email-composer-efl
+ln -sf /usr/bin/ug-client %{_ugdir}/bin/email-setting-efl
%files
+%manifest org.tizen.email.manifest
%defattr(-,root,root,-)
-%exclude %{_datadir}/process-info/email.ini
-%{_appdir}/org.tizen.email/lib/libemail-common.so
+%exclude %{_sharedir}/process-info/email.ini
+%{_libdir}/libemail-common.so
%{_ugdir}/lib/libug-email-composer-efl.so
%{_ugdir}/lib/libug-email-viewer-efl.so
-%{_ugdir}/lib/libug-email-account-efl.so
-%{_ugdir}/lib/libug-email-block-efl.so
-%{_ugdir}/lib/libug-email-mailbox-efl.so
+%{_libdir}/libug-email-account-efl.so
+%{_libdir}/libug-email-mailbox-efl.so
%{_ugdir}/lib/libug-email-setting-efl.so
-%{_appdir}/org.tizen.email/res/edje/email-viewer-theme.edj
-%{_appdir}/org.tizen.email/res/edje/email-setting-theme.edj
-%{_appdir}/org.tizen.email/res/edje/email-block-theme.edj
-%{_appdir}/org.tizen.email/res/edje/email-account-theme.edj
-%{_appdir}/org.tizen.email/res/edje/email-effect-layout.edj
-%{_appdir}/org.tizen.email/res/edje/email-composer-view.edj
-%{_appdir}/org.tizen.email/res/edje/email-mailbox-theme.edj
-%{_appdir}/org.tizen.email/res/locale/*/LC_MESSAGES/*
-%{_appdir}/org.tizen.email/res/images/*
-%{_appdir}/org.tizen.email/bin/email
-%{_appdir}/org.tizen.email/data/_email_default.html
-%{_optdir}/share/packages/org.tizen.email.xml
-%{_optdir}/share/icons/default/small/org.tizen.email.png
+%{_pkgdir}/res/edje/email-viewer-theme.edj
+%{_pkgdir}/res/edje/email-setting-theme.edj
+%{_pkgdir}/res/edje/email-account-theme.edj
+%{_pkgdir}/res/edje/email-effect-layout.edj
+%{_pkgdir}/res/edje/email-composer-view.edj
+%{_pkgdir}/res/edje/email-mailbox-theme.edj
+%{_pkgdir}/res/locale/*/LC_MESSAGES/*
+%{_pkgdir}/res/images/*
+%{_pkgdir}/res/xml/sp_list.xml
+%{_pkgdir}/bin/email
+%{_pkgdir}/data/_email_default.html
+%{_sharedir}/packages/org.tizen.email.xml
+/opt/usr/share/account/email-setting-efl.account.xml
+%{_sharedir}/icons/default/small/org.tizen.email.png
+%{_sharedir}/license/%{name}/LICENSE
+