Commit 1a07ac39 authored by Pekka Lundstrom's avatar Pekka Lundstrom

[boot] service file uses new boot targets

Signed-off-by: default avatarPekka Lundstrom <pekka.lundstrom@jollamobile.com>
parent 47063ae2
[Unit]
Description=Connection Agent
Requires=dbus.service
After=pre-user-session.target
[Service]
ExecStart=/usr/bin/connectionagent
......@@ -8,5 +9,5 @@ Type=dbus
BusName=com.jolla.Connectiond
Restart=always
[Install]
WantedBy=jolla-middleware.target
[Install]
WantedBy=user-session.target
......@@ -17,6 +17,8 @@ URL: http://github.com/lpotter/connectionagent
Source0: %{name}-%{version}.tar.bz2
Source100: connectionagent-qt5.yaml
Requires: connman-qt5-declarative
Requires: systemd
Requires: systemd-user-session-targets
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(connman-qt5)
......@@ -73,8 +75,26 @@ rm -rf %{buildroot}
%qmake_install
# >> install post
mkdir -p %{buildroot}%{_libdir}/systemd/user/user-session.target.wants
ln -s ../connectionagent.service %{buildroot}%{_libdir}/systemd/user/user-session.target.wants/
# << install post
%post
# >> post
if [ "$1" -ge 1 ]; then
systemctl-user daemon-reload || :
systemctl-user restart connectionagent.service || :
fi
# << post
%postun
# >> postun
if [ "$1" -eq 0 ]; then
systemctl-user stop connectionagent.service || :
systemctl-user daemon-reload || :
fi
# << postun
%files
%defattr(-,root,root,-)
%{_bindir}/connectionagent
......@@ -82,6 +102,7 @@ rm -rf %{buildroot}
%{_libdir}/systemd/user/connectionagent.service
%{_sysconfdir}/dbus-1/session.d/connectionagent.conf
# >> files
%{_libdir}/systemd/user/user-session.target.wants/connectionagent.service
# << files
%files declarative
......
......@@ -13,6 +13,8 @@ Sources:
- "%{name}-%{version}.tar.bz2"
Requires:
- connman-qt5-declarative
- systemd
- systemd-user-session-targets
Provides:
- connectionagent > 0.7.6
Obsoletes:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment