Skip to content

Commit

Permalink
[sociald] Split monolithic sociald plugin. Contributes to JB#15786
Browse files Browse the repository at this point in the history
Previously, the sociald plugin was a monolithic plugin which handled
sync of all different data types.

This commit splits it up into multiple different plugins, which means
that each one can be an independent out-of-process plugin, and that
each one can handle per-account sync profiles.

Contributes to JB#15786
  • Loading branch information
Chris Adams committed Apr 7, 2014
1 parent eb99bf0 commit 66725b7
Show file tree
Hide file tree
Showing 143 changed files with 2,583 additions and 1,216 deletions.
291 changes: 256 additions & 35 deletions rpm/sociald.spec
Expand Up @@ -2,75 +2,294 @@ Name: sociald
Summary: Syncs device data from social services
Version: 0.0.86
Release: 1
Group: System/Applications
Group: System/Libraries
License: TBD
URL: https://bitbucket.org/jolla/base-sociald
Source0: %{name}-%{version}.tar.bz2
BuildRequires: pkgconfig(Qt5Core)
# Qt5Gui requires -> hence adding over here.
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(Qt5Sql)
BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5Contacts)
BuildRequires: pkgconfig(mlite5)
BuildRequires: pkgconfig(buteosyncfw5)
BuildRequires: pkgconfig(libsignon-qt5)
BuildRequires: pkgconfig(libsailfishkeyprovider)
BuildRequires: pkgconfig(sailfishaccounts) >= 0.0.45
BuildRequires: pkgconfig(libmkcal-qt5)
BuildRequires: pkgconfig(libkcalcoren-qt5)
BuildRequires: pkgconfig(qtcontacts-sqlite-qt5-extensions)
BuildRequires: nemo-qml-plugin-notifications-qt5-devel
BuildRequires: libmeegotouchevents-qt5-devel
BuildRequires: buteo-syncfw-qt5-devel
BuildRequires: pkgconfig(socialcache) >= 0.0.17
# for lupdate
BuildRequires: pkgconfig(libsailfishkeyprovider)
BuildRequires: qt5-qttools-linguist
Requires: sailfish-components-accounts-qt5 >= 0.0.43
Requires: sailfish-components-textlinking
Requires: nemo-qml-plugin-notifications-qt5
Requires: nemo-qml-plugin-social-qt5 >= 0.0.12
Requires: nemo-qml-plugin-connectivity
Requires: buteo-syncfw-qt5-msyncd
Requires: mkcal-qt5
Obsoletes: buteo-sync-plugins-google-simple <= 0.0.2
Provides: buteo-sync-plugins-google-simple
Requires: systemd
Requires(post): systemd

%description
A daemon process which provides data synchronization with various social services.
A Buteo plugin which provides data synchronization with various social services.

%files
%defattr(-,root,root,-)
/usr/lib/buteo-plugins-qt5/libsociald-client.so
%config %{_sysconfdir}/buteo/profiles/client/sociald.xml
%config %{_sysconfdir}/buteo/profiles/sync/sociald.All.xml


%package eventfeed-shared
Summary: Provides shared components for the lipstick events feed
License: TBD
Group: System/Libraries
Requires: %{name} = %{version}-%{release}
Requires: sailfish-components-textlinking
Requires: nemo-qml-plugin-notifications-qt5
Requires: nemo-qml-plugin-social-qt5 >= 0.0.12
Requires: nemo-qml-plugin-connectivity

%description eventfeed-shared
Provides shared components for the lipstick events feed

%files eventfeed-shared
%{_datadir}/lipstick/eventfeed/shared/*.qml
%{_datadir}/translations/sociald_eventfeed_eng_en.qm


%package facebook-calendars
Summary: Provides calendar synchronisation with Facebook
License: TBD
Group: System/Libraries
BuildRequires: pkgconfig(libmkcal-qt5)
BuildRequires: pkgconfig(libkcalcoren-qt5)
Requires: %{name} = %{version}-%{release}

%description facebook-calendars
Provides calendar synchronisation with Facebook

%files facebook-calendars
/usr/lib/buteo-plugins-qt5/libfacebook-calendars-client.so
%config %{_sysconfdir}/buteo/profiles/client/facebook-calendars.xml
%config %{_sysconfdir}/buteo/profiles/sync/facebook.Calendars.xml

%pre facebook-calendars
rm -f /home/nemo/.cache/msyncd/sync/client/facebook-calendars.xml
rm -f /home/nemo/.cache/msyncd/sync/facebook.Calendars.xml

%post facebook-calendars
systemctl-user restart msyncd.service || :


%package facebook-contacts
Summary: Provides contact synchronisation with Facebook
License: TBD
Group: System/Libraries
BuildRequires: pkgconfig(Qt5Contacts)
BuildRequires: pkgconfig(qtcontacts-sqlite-qt5-extensions)
Requires: %{name} = %{version}-%{release}

%description facebook-contacts
Provides contact synchronisation with Facebook

%files facebook-contacts
/usr/lib/buteo-plugins-qt5/libfacebook-contacts-client.so
%config %{_sysconfdir}/buteo/profiles/client/facebook-contacts.xml
%config %{_sysconfdir}/buteo/profiles/sync/facebook.Contacts.xml

%pre facebook-contacts
rm -f /home/nemo/.cache/msyncd/sync/client/facebook-contacts.xml
rm -f /home/nemo/.cache/msyncd/sync/facebook.Contacts.xml

%post facebook-contacts
systemctl-user restart msyncd.service || :


%package facebook-images
Summary: Provides image synchronisation with Facebook
License: TBD
Group: System/Libraries
Requires: %{name} = %{version}-%{release}

%description facebook-images
Provides image synchronisation with Facebook

%files facebook-images
/usr/lib/buteo-plugins-qt5/libfacebook-images-client.so
%config %{_sysconfdir}/buteo/profiles/client/facebook-images.xml
%config %{_sysconfdir}/buteo/profiles/sync/facebook.Images.xml

%pre facebook-images
rm -f /home/nemo/.cache/msyncd/sync/client/facebook-images.xml
rm -f /home/nemo/.cache/msyncd/sync/facebook.Images.xml

%post facebook-images
systemctl-user restart msyncd.service || :


%package facebook-notifications
Summary: Provides notification synchronisation with Facebook
License: TBD
Group: System/Libraries
BuildRequires: nemo-qml-plugin-notifications-qt5-devel
BuildRequires: libmeegotouchevents-qt5-devel
BuildRequires: qt5-qttools-linguist
Requires: %{name} = %{version}-%{release}

%description facebook-notifications
Provides notification synchronisation with Facebook

%files facebook-notifications
/usr/lib/buteo-plugins-qt5/libfacebook-notifications-client.so
%config %{_sysconfdir}/buteo/profiles/client/facebook-notifications.xml
%config %{_sysconfdir}/buteo/profiles/sync/facebook.Notifications.xml
%config %{_sysconfdir}/buteo/profiles/sync/twitter.Notifications.xml
%config %{_sysconfdir}/buteo/profiles/sync/twitter.Posts.xml
%config %{_sysconfdir}/buteo/profiles/sync/google.Calendars.xml
%config %{_sysconfdir}/buteo/profiles/sync/google.Contacts.xml
%{_datadir}/lipstick/notificationcategories/x-nemo.social.facebook.notification.conf

%pre facebook-notifications
rm -f /home/nemo/.cache/msyncd/sync/client/facebook-notifications.xml
rm -f /home/nemo/.cache/msyncd/sync/facebook.Notifications.xml

%post facebook-notifications
systemctl-user restart msyncd.service || :


%package facebook-posts
Summary: Provides post synchronisation with Facebook
License: TBD
Group: System/Libraries
Requires: %{name}-eventfeed-shared = %{version}-%{release}
BuildRequires: pkgconfig(Qt5Contacts)
BuildRequires: pkgconfig(qtcontacts-sqlite-qt5-extensions)
BuildRequires: qt5-qttools-linguist
Requires: %{name} = %{version}-%{release}

%description facebook-posts
Provides post synchronisation with Facebook

%files facebook-posts
%{_datadir}/lipstick/notificationcategories/x-nemo.social.facebook.statuspost.conf
%{_datadir}/lipstick/notificationcategories/x-nemo.social.twitter.mention.conf
%{_datadir}/lipstick/notificationcategories/x-nemo.social.twitter.tweet.conf
%{_datadir}/translations/sociald_eng_en.qm
%{_datadir}/translations/lipstick-jolla-home-facebook_eng_en.qm
%{_datadir}/translations/lipstick-jolla-home-twitter_eng_en.qm
%{_datadir}/lipstick/eventfeed/FacebookPostPage.qml
%{_datadir}/lipstick/eventfeed/facebook-update.qml
%{_datadir}/lipstick/eventfeed/facebook-delegate.qml
%{_datadir}/lipstick/eventfeed/FacebookFeedItem.qml
%{_datadir}/lipstick/eventfeed/facebook-feed.qml
%{_datadir}/translations/lipstick-jolla-home-facebook_eng_en.qm
###/usr/lib/buteo-plugins-qt5/libfacebook-posts-client.so
###%config %{_sysconfdir}/buteo/profiles/client/facebook-posts.xml
###%config %{_sysconfdir}/buteo/profiles/sync/facebook.Posts.xml

%pre facebook-posts
rm -f /home/nemo/.cache/msyncd/sync/client/facebook-posts.xml
rm -f /home/nemo/.cache/msyncd/sync/facebook.Posts.xml

%post facebook-posts
systemctl-user restart msyncd.service || :


%package google-calendars
Summary: Provides calendar synchronisation with Google
License: TBD
Group: System/Libraries
BuildRequires: pkgconfig(libmkcal-qt5)
BuildRequires: pkgconfig(libkcalcoren-qt5)
Requires: %{name} = %{version}-%{release}

%description google-calendars
Provides calendar synchronisation with Google

%files google-calendars
/usr/lib/buteo-plugins-qt5/libgoogle-calendars-client.so
%config %{_sysconfdir}/buteo/profiles/client/google-calendars.xml
%config %{_sysconfdir}/buteo/profiles/sync/google.Calendars.xml

%pre google-calendars
rm -f /home/nemo/.cache/msyncd/sync/client/google-calendars.xml
rm -f /home/nemo/.cache/msyncd/sync/google.Calendars.xml

%post google-calendars
systemctl-user restart msyncd.service || :


%package google-contacts
Summary: Provides contact synchronisation with Google
License: TBD
Group: System/Libraries
BuildRequires: pkgconfig(Qt5Contacts)
BuildRequires: pkgconfig(qtcontacts-sqlite-qt5-extensions)
Requires: %{name} = %{version}-%{release}

%description google-contacts
Provides contact synchronisation with Google

%files google-contacts
/usr/lib/buteo-plugins-qt5/libgoogle-contacts-client.so
%config %{_sysconfdir}/buteo/profiles/client/google-contacts.xml
%config %{_sysconfdir}/buteo/profiles/sync/google.Contacts.xml

%pre google-contacts
rm -f /home/nemo/.cache/msyncd/sync/client/google-contacts.xml
rm -f /home/nemo/.cache/msyncd/sync/google.Contacts.xml

%post google-contacts
systemctl-user restart msyncd.service || :



%package twitter-notifications
Summary: Provides notification synchronisation with Twitter
License: TBD
Group: System/Libraries
BuildRequires: pkgconfig(Qt5Contacts)
BuildRequires: pkgconfig(qtcontacts-sqlite-qt5-extensions)
BuildRequires: nemo-qml-plugin-notifications-qt5-devel
BuildRequires: libmeegotouchevents-qt5-devel
BuildRequires: qt5-qttools-linguist
Requires: %{name} = %{version}-%{release}

%description twitter-notifications
Provides notification synchronisation with Twitter

%files twitter-notifications
/usr/lib/buteo-plugins-qt5/libtwitter-notifications-client.so
%config %{_sysconfdir}/buteo/profiles/client/twitter-notifications.xml
%config %{_sysconfdir}/buteo/profiles/sync/twitter.Notifications.xml
%{_datadir}/lipstick/notificationcategories/x-nemo.social.twitter.mention.conf

%pre twitter-notifications
rm -f /home/nemo/.cache/msyncd/sync/client/twitter-notifications.xml
rm -f /home/nemo/.cache/msyncd/sync/twitter.Notifications.xml

%post twitter-notifications
systemctl-user restart msyncd.service || :


%package twitter-posts
Summary: Provides post synchronisation with Twitter
License: TBD
Group: System/Libraries
Requires: %{name}-eventfeed-shared = %{version}-%{release}
BuildRequires: pkgconfig(Qt5Contacts)
BuildRequires: pkgconfig(qtcontacts-sqlite-qt5-extensions)
BuildRequires: qt5-qttools-linguist
Requires: %{name} = %{version}-%{release}

%description twitter-posts
Provides post synchronisation with Twitter

%files twitter-posts
/usr/lib/buteo-plugins-qt5/libtwitter-posts-client.so
%config %{_sysconfdir}/buteo/profiles/client/twitter-posts.xml
%config %{_sysconfdir}/buteo/profiles/sync/twitter.Posts.xml
%{_datadir}/lipstick/notificationcategories/x-nemo.social.twitter.tweet.conf
%{_datadir}/lipstick/eventfeed/TwitterPostPage.qml
%{_datadir}/lipstick/eventfeed/twitter-update.qml
%{_datadir}/lipstick/eventfeed/twitter-delegate.qml
%{_datadir}/lipstick/eventfeed/TwitterFeedItem.qml
%{_datadir}/lipstick/eventfeed/twitter-feed.qml
%{_datadir}/lipstick/eventfeed/shared/*.qml
%{_datadir}/translations/lipstick-jolla-home-twitter_eng_en.qm

%pre twitter-posts
rm -f /home/nemo/.cache/msyncd/sync/client/twitter-posts.xml
rm -f /home/nemo/.cache/msyncd/sync/twitter.Posts.xml

%post twitter-posts
systemctl-user restart msyncd.service || :


%package ts-devel
Summary: Translation source for sociald
Expand Down Expand Up @@ -101,6 +320,7 @@ Automatable tests for sociald
%defattr(-,root,root,-)
/opt/tests/sociald/*


%prep
%setup -q -n %{name}-%{version}

Expand All @@ -110,13 +330,14 @@ make %{?jobs:-j%jobs}

%pre
rm -f /home/nemo/.cache/msyncd/sync/client/sociald.xml
rm -f /home/nemo/.cache/msyncd/sync/facebook.Calendars.xml
rm -f /home/nemo/.cache/msyncd/sync/facebook.Contacts.xml
rm -f /home/nemo/.cache/msyncd/sync/facebook.Images.xml
rm -f /home/nemo/.cache/msyncd/sync/facebook.Notifications.xml
rm -f /home/nemo/.cache/msyncd/sync/twitter.Notifications.xml
rm -f /home/nemo/.cache/msyncd/sync/twitter.Posts.xml
rm -f /home/nemo/.cache/msyncd/sync/google.Contacts.xml
rm -f /home/nemo/.cache/msyncd/sync/sociald.facebook.Calendars.xml
rm -f /home/nemo/.cache/msyncd/sync/sociald.facebook.Contacts.xml
rm -f /home/nemo/.cache/msyncd/sync/sociald.facebook.Images.xml
rm -f /home/nemo/.cache/msyncd/sync/sociald.facebook.Notifications.xml
rm -f /home/nemo/.cache/msyncd/sync/sociald.twitter.Notifications.xml
rm -f /home/nemo/.cache/msyncd/sync/sociald.twitter.Posts.xml
rm -f /home/nemo/.cache/msyncd/sync/sociald.google.Calendars.xml
rm -f /home/nemo/.cache/msyncd/sync/sociald.google.Contacts.xml

%install
rm -rf %{buildroot}
Expand Down
1 change: 0 additions & 1 deletion sociald.pro
@@ -1,6 +1,5 @@
TEMPLATE = subdirs
SUBDIRS = src tests

tests.depends = src

OTHER_FILES += rpm/sociald.spec

0 comments on commit 66725b7

Please sign in to comment.