connectionagent-qt5.spec 2.83 KB
Newer Older
1 2 3
Name:       connectionagent-qt5

Summary:    User Agent daemon
Matti Kosola's avatar
Matti Kosola committed
4
Version:    0.11.38
5
Release:    0
6 7
License:    LGPLv2
URL:        https://git.sailfishos.org/mer-core/connectionagent
8 9
Source0:    %{name}-%{version}.tar.bz2
Requires:   connman-qt5-declarative
10 11
Requires:   systemd
Requires:   systemd-user-session-targets
Marko Saukko's avatar
Marko Saukko committed
12
Requires:   connman >= 1.21
13
Requires:   mapplauncherd >= 4.1.23
14 15 16
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5DBus)
BuildRequires:  pkgconfig(connman-qt5)
17 18
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5Test)
19
BuildRequires:  pkgconfig(Qt5Qml)
20
BuildRequires:  pkgconfig(qt5-boostable)
21
BuildRequires:  systemd
22
Provides:   connectionagent > 0.10.1
23
Obsoletes:   connectionagent <= 0.7.6
24

Marko Saukko's avatar
Marko Saukko committed
25 26 27 28
# Because of systemctl-user
Requires(post):   systemd
Requires(postun): systemd

29 30 31 32 33 34 35 36 37 38 39 40 41
%description
Connection Agent provides multi user access to connman's User Agent.
It also provides autoconnecting features.

%package declarative
Summary:    Declarative plugin for connection agent.
Requires:   %{name} = %{version}-%{release}
Requires:   %{name} = %{version}

%description declarative
This package contains the declarative plugin for connection agent.

%package test
42
Summary:    auto test for connection agent.
43 44 45 46
Requires:   %{name} = %{version}-%{release}
Requires:   %{name} = %{version}

%description test
47
This package contains the auto tests for connection agent.
48

49 50 51 52 53 54 55
%package tracing
Summary:    Configuration for Connectionagent to enable tracing
Requires:   %{name} = %{version}-%{release}

%description tracing
Will enable tracing for Connectionagent

56 57 58 59
%prep
%setup -q -n %{name}-%{version}

%build
60 61
%qmake5
make %{?_smp_mflags}
62 63 64 65


%install
rm -rf %{buildroot}
66
%qmake5_install
67

68 69
%make_install

70 71
mkdir -p %{buildroot}%{_userunitdir}/user-session.target.wants
ln -s ../connectionagent.service %{buildroot}%{_userunitdir}/user-session.target.wants/
72

73 74 75
mkdir -p %{buildroot}%{_datadir}/mapplauncherd/privileges.d
install -m 644 -p connd/privileges %{buildroot}%{_datadir}/mapplauncherd/privileges.d/connectionagent

76 77 78 79 80 81 82 83 84 85 86 87
%post
if [ "$1" -ge 1 ]; then
systemctl-user daemon-reload || :
systemctl-user restart connectionagent.service || :
fi

%postun
if [ "$1" -eq 0 ]; then
systemctl-user stop connectionagent.service || :
systemctl-user daemon-reload || :
fi

88 89 90 91
%files
%defattr(-,root,root,-)
%{_bindir}/connectionagent
%{_datadir}/dbus-1/services/com.jolla.Connectiond.service
92
%{_datadir}/mapplauncherd/privileges.d/connectionagent
93
%{_sysconfdir}/dbus-1/session.d/connectionagent.conf
94 95
%{_userunitdir}/connectionagent.service
%{_userunitdir}/user-session.target.wants/connectionagent.service
96
%license COPYING
97 98 99

%files declarative
%defattr(-,root,root,-)
100
%{_libdir}/qt5/qml/com/jolla/connection/*
101

102 103
%files test
%defattr(-,root,root,-)
104
%{_prefix}/opt/tests/connectionagent/*
105 106 107

%files tracing
%defattr(-,root,root,-)
108
%config /var/lib/environment/nemo/70-connectionagent-tracing.conf