/
connectionagent-qt5.spec
135 lines (108 loc) · 3.11 KB
/
connectionagent-qt5.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
Name: connectionagent-qt5
# >> macros
# << macros
Summary: User Agent daemon
Version: 0.11.7
Release: 0
Group: Communications/Connectivity Adaptation
License: LGPLv2
URL: http://github.com/lpotter/connectionagent
Source0: %{name}-%{version}.tar.bz2
Source1: connectionagent.tracing
Requires: connman-qt5-declarative
Requires: systemd
Requires: systemd-user-session-targets
Requires: connman >= 1.21
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(connman-qt5)
BuildRequires: pkgconfig(qofono-qt5)
BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5Test)
BuildRequires: pkgconfig(Qt5Qml)
Provides: connectionagent > 0.10.1
Obsoletes: connectionagent <= 0.7.6
%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
Summary: auto test for connection agent.
Group: Development/Tools
Requires: %{name} = %{version}-%{release}
Requires: %{name} = %{version}
%description test
This package contains the auto tests for connection agent.
%package tracing
Summary: Configuration for Connectionagent to enable tracing
Group: Development/Tools
Requires: %{name} = %{version}-%{release}
%description tracing
Will enable tracing for Connectionagent
%prep
%setup -q -n %{name}-%{version}
# >> setup
# << setup
%build
# >> build pre
# << build pre
%qmake5
make %{?_smp_mflags}
# >> build post
# << build post
%install
rm -rf %{buildroot}
# >> install pre
# << install pre
%qmake5_install
%make_install
mkdir -p %{buildroot}%{_sysconfdir}/tracing/connectionagent/
cp -a %{SOURCE1} %{buildroot}%{_sysconfdir}/tracing/connectionagent/
# >> 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
%{_datadir}/dbus-1/services/com.jolla.Connectiond.service
%{_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
%defattr(-,root,root,-)
%{_libdir}/qt5/qml/com/jolla/connection/*
# >> files declarative
# << files declarative
%files test
%defattr(-,root,root,-)
%{_prefix}/opt/tests/libqofono/*
# >> files test
# << files test
%files tracing
%defattr(-,root,root,-)
%config %{_sysconfdir}/tracing/connectionagent
# >> files tracing
# << files tracing