From d1a59585ccd256984ef13cadc5e888ba22bc1ce4 Mon Sep 17 00:00:00 2001 From: Jongkyu Koo Date: Mon, 8 Aug 2016 17:14:51 +0900 Subject: [PATCH] changed to always-on for mobile Change-Id: Icb389bbfbde58d7151f8aa4044655a09f727bd3c Signed-off-by: Jongkyu Koo --- packaging/contacts-service-mobile.service | 12 ++++++++++++ packaging/contacts-service.spec | 10 ++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 packaging/contacts-service-mobile.service diff --git a/packaging/contacts-service-mobile.service b/packaging/contacts-service-mobile.service new file mode 100644 index 0000000..4f36550 --- /dev/null +++ b/packaging/contacts-service-mobile.service @@ -0,0 +1,12 @@ +[Unit] +Description=Start the Contacts service helper service + +[Service] +Type=simple +ExecStart=/usr/bin/contacts-service-ipcd +Restart=always +RestartSec=1 + +[Install] +WantedBy=default.target + diff --git a/packaging/contacts-service.spec b/packaging/contacts-service.spec index 55eea94..8b7ed27 100644 --- a/packaging/contacts-service.spec +++ b/packaging/contacts-service.spec @@ -1,12 +1,13 @@ Name: contacts-service Summary: Contacts Service -Version: 0.13.56 +Version: 0.13.57 Release: 0 Group: Social & Content/Service License: Apache-2.0 Source0: %{name}-%{version}.tar.gz Source1: %{name}.service Source2: %{name}.socket +Source3: %{name}-mobile.service Source1001: %{name}.manifest BuildRequires: cmake BuildRequires: pkgconfig(db-util) @@ -64,7 +65,6 @@ chmod g-w %_sourcedir/* cp %{SOURCE1001} ./%{name}.manifest cp %{SOURCE1001} ./%{name}-test.manifest - %build export CFLAGS="$CFLAGS -DTIZEN_ENGINEER_MODE" export CXXFLAGS="$CXXFLAGS -DTIZEN_ENGINEER_MODE" @@ -86,7 +86,12 @@ rm -rf %{buildroot} %make_install mkdir -p %{buildroot}%{_unitdir_user}/default.target.wants +%if "%{profile}" == "mobile" +install -m 0644 %SOURCE3 %{buildroot}%{_unitdir_user}/contacts-service.service +%else install -m 0644 %SOURCE1 %{buildroot}%{_unitdir_user}/contacts-service.service +%endif +ln -s ../contacts-service.service %{buildroot}%{_unitdir_user}/default.target.wants/contacts-service.service mkdir -p %{buildroot}%{_unitdir_user}/sockets.target.wants install -m 0644 %SOURCE2 %{buildroot}%{_unitdir_user}/contacts-service.socket @@ -104,6 +109,7 @@ chsmack -e "User" /usr/bin/contacts-service-test %{_libdir}/libcontacts-service2.so.* %{_bindir}/contacts-service-ipcd* %{_unitdir_user}/contacts-service.service +%{_unitdir_user}/default.target.wants/contacts-service.service %{_unitdir_user}/sockets.target.wants/contacts-service.socket %{_unitdir_user}/contacts-service.socket %license LICENSE.APLv2 -- 2.7.4