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

Summary:    User Agent daemon
4
Version:    0.11.33
5 6
Release:    0
Group:      Communications/Connectivity Adaptation
7 8
License:    LGPLv2
URL:        https://git.sailfishos.org/mer-core/connectionagent
9 10
Source0:    %{name}-%{version}.tar.bz2
Requires:   connman-qt5-declarative
11 12
Requires:   systemd
Requires:   systemd-user-session-targets
Marko Saukko's avatar
Marko Saukko committed
13
Requires:   connman >= 1.21
14
Requires:   mapplauncherd >= 4.1.23
15 16 17
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5DBus)
BuildRequires:  pkgconfig(connman-qt5)
18 19
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5Test)
20
BuildRequires:  pkgconfig(Qt5Qml)
21
BuildRequires:  pkgconfig(qt5-boostable)
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 42
%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.
Group:      Development/Tools
Requires:   %{name} = %{version}-%{release}
Requires:   %{name} = %{version}

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

%package test
43
Summary:    auto test for connection agent.
44 45 46 47 48
Group:      Development/Tools
Requires:   %{name} = %{version}-%{release}
Requires:   %{name} = %{version}

%description test
49
This package contains the auto tests for connection agent.
50

51 52 53 54 55 56 57 58
%package tracing
Summary:    Configuration for Connectionagent to enable tracing
Group:      Development/Tools
Requires:   %{name} = %{version}-%{release}

%description tracing
Will enable tracing for Connectionagent

59 60 61 62
%prep
%setup -q -n %{name}-%{version}

%build
63 64
%{!?qtc_qmake5:%define qtc_qmake5 %qmake5}
%{!?qtc_make:%define qtc_make make}
65

66 67
%qtc_qmake5
%qtc_make %{?_smp_mflags}
68 69 70 71


%install
rm -rf %{buildroot}
72
%qmake5_install
73

74 75
%make_install

76 77
mkdir -p %{buildroot}%{_libdir}/systemd/user/user-session.target.wants
ln -s ../connectionagent.service %{buildroot}%{_libdir}/systemd/user/user-session.target.wants/
78

79 80 81
mkdir -p %{buildroot}%{_datadir}/mapplauncherd/privileges.d
install -m 644 -p connd/privileges %{buildroot}%{_datadir}/mapplauncherd/privileges.d/connectionagent

82 83 84 85 86 87 88 89 90 91 92 93
%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

94 95 96 97
%files
%defattr(-,root,root,-)
%{_bindir}/connectionagent
%{_datadir}/dbus-1/services/com.jolla.Connectiond.service
98
%{_datadir}/mapplauncherd/privileges.d/connectionagent
99
%{_libdir}/systemd/user/connectionagent.service
100
%{_sysconfdir}/dbus-1/session.d/connectionagent.conf
101
%{_libdir}/systemd/user/user-session.target.wants/connectionagent.service
102
%license COPYING
103 104 105

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

108 109
%files test
%defattr(-,root,root,-)
110
%{_prefix}/opt/tests/connectionagent/*
111 112 113

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