Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[voicecall] voicecall-manager.service uses new boot targets
Signed-off-by: Pekka Lundstrom <pekka.lundstrom@jollamobile.com>
  • Loading branch information
Pekka Lundstrom committed Jul 3, 2013
1 parent a4c55c8 commit fb33bfe
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
25 changes: 22 additions & 3 deletions rpm/voicecall-qt5.spec
Expand Up @@ -17,6 +17,8 @@ URL: http://github.com/nemomobile/voicecall
Source0: %{name}-%{version}.tar.bz2
Source100: voicecall-qt5.yaml
Requires: telepathy-ring
Requires: systemd
Requires: systemd-user-session-targets
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
BuildRequires: pkgconfig(Qt5Qml)
Expand Down Expand Up @@ -99,11 +101,27 @@ rm -rf %{buildroot}
%qmake_install

# >> install post
mkdir -p %{buildroot}%{_libdir}/systemd/user/user-session.target.wants
ln -s ../voicecall-manager.service %{buildroot}%{_libdir}/systemd/user/user-session.target.wants/
# << install post

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig
%post
/sbin/ldconfig
# >> post
if [ "$1" -ge 1 ]; then
systemctl-user daemon-reload || :
systemctl-user restart voicecall-manager.service || :
fi
# << post

%postun
/sbin/ldconfig
# >> postun
if [ "$1" -eq 0 ]; then
systemctl-user stop voicecall-manager.service || :
systemctl-user daemon-reload || :
fi
# << postun

%files
%defattr(-,root,root,-)
Expand All @@ -119,6 +137,7 @@ rm -rf %{buildroot}
%config %{_sysconfdir}/xdg/autostart/voicecall-manager.desktop
%{_libdir}/systemd/user/voicecall-manager.service
# >> files
%{_libdir}/systemd/user/user-session.target.wants/voicecall-manager.service
# << files

%files devel
Expand Down
2 changes: 2 additions & 0 deletions rpm/voicecall-qt5.yaml
Expand Up @@ -21,6 +21,8 @@ PkgConfigBR:
Builder: qmake5
Requires:
- telepathy-ring
- systemd
- systemd-user-session-targets
Files:
- "%{_libdir}/libvoicecall.so.1"
- "%{_libdir}/libvoicecall.so.1.0"
Expand Down
4 changes: 4 additions & 0 deletions src/voicecall-manager.service
@@ -1,7 +1,11 @@
[Unit]
Description=Voicecall manager
Requires=dbus.socket ngfd.service tone-generator.service
After=pre-user-session.target

[Service]
ExecStart=/usr/bin/voicecall-manager
Restart=always

[Install]
WantedBy=user-session.target

0 comments on commit fb33bfe

Please sign in to comment.