1 %bcond_with connman_openconnect
2 %bcond_without connman_openvpn
3 %bcond_without connman_ipsec
4 %bcond_without connman_vpnd
10 Summary: Connection Manager
11 Url: http://connman.net
12 Group: Network & Connectivity/Connection Management
13 Source0: %{name}-%{version}.tar.gz
14 BuildRequires: systemd-devel
15 BuildRequires: pkgconfig(dbus-1)
16 BuildRequires: pkgconfig(glib-2.0)
17 BuildRequires: pkgconfig(gio-2.0)
18 BuildRequires: pkgconfig(libiptc)
19 BuildRequires: pkgconfig(xtables)
20 BuildRequires: pkgconfig(libsmack)
21 BuildRequires: pkgconfig(libnl-3.0)
22 BuildRequires: pkgconfig(libnl-genl-3.0)
23 BuildRequires: pkgconfig(libsystemd-daemon)
24 %if %{with connman_openconnect}
25 BuildRequires: openconnect
27 %if %{with connman_openvpn}
28 BuildRequires: openvpn
30 %if %{with connman_ipsec}
31 BuildRequires: strongswan
33 BuildRequires: readline-devel
37 Requires(post): systemd
38 Requires(preun): systemd
39 Requires(postun): systemd
41 Requires: security-config
42 Provides: %{name}-profile_common = %{version}-%{release}
43 Provides: %{name}-profile_mobile = %{version}-%{release}
44 Provides: %{name}-profile_wearable = %{version}-%{release}
47 Connection Manager provides a daemon for managing Internet connections
48 within embedded devices running the Linux operating system.
50 %if %{with connman_openconnect}
51 %package plugin-openconnect
52 Summary: Openconnect Support for Connman
53 Requires: %{name} = %{version}
56 %description plugin-openconnect
57 Openconnect Support for Connman.
60 %if %{with connman_openvpn}
61 %package plugin-openvpn
62 Summary: Openvpn Support for Connman
63 Requires: %{name} = %{version}
66 %description plugin-openvpn
67 OpenVPN support for Connman.
70 %if %{with connman_ipsec}
72 Summary: IPsec Support for Connman
73 Requires: %{name} = %{version}
76 %description plugin-ipsec
77 OpenVPN support for Connman.
80 %if %{with connman_vpnd}
82 Summary: VPN Support for Connman
83 #BuildRequires: %{name} = %{version}
84 Requires: %{name} = %{version}
86 %description connman-vpnd
87 Provides VPN support for Connman
91 Summary: Test Scripts for Connection Manager
92 Group: Development/Tools
93 Requires: %{name} = %{version}
99 Scripts for testing Connman and its functionality
102 Summary: Development Files for connman
103 Group: Development/Tools
104 Requires: %{name} = %{version}
107 Header files and development files for connman.
109 %package extension-tv
110 Summary: Connman service script for TV profile
111 Requires: %{name} = %{version}-%{release}
112 Provides: %{name}-profile_tv = %{version}-%{release}
113 Conflicts: %{name}-extension-ivi
114 Conflicts: %{name}-extension-disable-eth
115 %description extension-tv
116 Supplies Tizen TV profile systemd service scripts instead of the default one.
117 This overwrites service script of %{name}.
119 %package extension-ivi
120 Summary: Connman configuration for IVI profile
121 Requires: %{name} = %{version}-%{release}
122 Provides: %{name}-profile_ivi = %{version}-%{release}
123 Conflicts: %{name}-extension-tv
124 Conflicts: %{name}-extension-disable-eth
125 %description extension-ivi
126 Supplies Tizen IVI profile configuration instead of the default one.
127 This overwrites conf file of %{name}.
129 %package extension-disable-eth
130 Summary: Connman configuration for testing which requires the ethernet to be disabled
131 Requires: %{name} = %{version}-%{release}
132 Conflicts: %{name}-extension-tv
133 Conflicts: %{name}-extension-ivi
134 %description extension-disable-eth
135 Connman without ethernet support
136 This overwrites conf file of %{name}.
143 %if %{with connman_vpnd}
144 VPN_CFLAGS+=" -DTIZEN_EXT -lsmack -Werror"
153 --disable-tizen-ext-ins \
154 --enable-tizen-ext-eap-on-ethernet \
156 --enable-wifi=builtin \
157 %if %{with connman_openconnect}
158 --enable-openconnect \
160 %if %{with connman_openvpn}
163 %if %{with connman_ipsec}
166 %if 0%{?enable_connman_features}
170 --enable-telephony=builtin \
174 --with-systemdunitdir=%{_libdir}/systemd/system \
177 --disable-backtrace \
185 #Systemd service file
186 mkdir -p %{buildroot}%{_libdir}/systemd/system/
187 %if "%{?_lib}" == "lib64"
188 mkdir -p %{buildroot}%{_unitdir}
191 %if "%{?_lib}" == "lib64"
192 cp src/connman_tv.service %{buildroot}%{_unitdir}/connman.service.tv
193 cp src/connman.service %{buildroot}%{_unitdir}/connman.service
194 cp vpn/connman-vpn.service %{buildroot}%{_unitdir}/connman-vpn.service
196 cp src/connman_tv.service %{buildroot}%{_libdir}/systemd/system/connman.service.tv
199 mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants
200 ln -s ../connman.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/connman.service
201 %if "%{?_lib}" == "lib64"
202 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
203 ln -s ../connman.service %{buildroot}%{_unitdir}/multi-user.target.wants/connman.service
206 #Systemd socket file for DNS proxy
207 %if "%{?_lib}" == "lib64"
208 cp src/connman.socket %{buildroot}%{_unitdir}/connman.socket
209 mkdir -p %{buildroot}%{_unitdir}/sockets.target.wants
210 ln -s ../connman.socket %{buildroot}%{_unitdir}/sockets.target.wants/connman.socket
212 cp src/connman.socket %{buildroot}%{_libdir}/systemd/system/connman.socket
213 mkdir -p %{buildroot}%{_libdir}/systemd/system/sockets.target.wants
214 ln -s ../connman.socket %{buildroot}%{_libdir}/systemd/system/sockets.target.wants/connman.socket
217 mkdir -p %{buildroot}/%{_localstatedir}/lib/connman
218 cp resources/var/lib/connman/settings %{buildroot}/%{_localstatedir}/lib/connman/settings
219 mkdir -p %{buildroot}%{_datadir}/dbus-1/system-services
220 cp resources/usr/share/dbus-1/system-services/net.connman.service %{buildroot}%{_datadir}/dbus-1/system-services/net.connman.service
221 mkdir -p %{buildroot}/etc/connman
223 cp src/main_ivi.conf %{buildroot}/etc/connman/main.conf.ivi
224 cp src/main_tv.conf %{buildroot}/etc/connman/main.conf.tv
225 cp src/main_disable_eth.conf %{buildroot}/etc/connman/main.conf.disable.eth
226 cp src/main.conf %{buildroot}/etc/connman/main.conf
228 rm %{buildroot}%{_sysconfdir}/dbus-1/system.d/*.conf
229 mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d/
230 cp src/connman.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/
232 %if %{with connman_vpnd}
233 cp vpn/vpn-dbus.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/connman-vpn-dbus.conf
237 #chsmack -a 'System' /%{_localstatedir}/lib/connman
238 #chsmack -a 'System' /%{_localstatedir}/lib/connman/settings
243 systemctl daemon-reload
248 %manifest connman.manifest
249 %attr(500,network_fw,network_fw) %{_bindir}/connmand
250 %attr(500,network_fw,network_fw) %{_bindir}/connmanctl
251 %attr(755,network_fw,network_fw) /%{_localstatedir}/lib/connman
252 %attr(600,network_fw,network_fw) /%{_localstatedir}/lib/connman/settings
253 %attr(644,root,root) %{_datadir}/dbus-1/system-services/net.connman.service
254 %attr(644,root,root) %{_sysconfdir}/dbus-1/system.d/*
255 %attr(644,network_fw,network_fw) %{_sysconfdir}/connman/main.conf
256 %attr(644,root,root) %{_sysconfdir}/dbus-1/system.d/*.conf
257 %attr(644,root,root) %{_libdir}/systemd/system/connman.service
258 %attr(644,root,root) %{_libdir}/systemd/system/multi-user.target.wants/connman.service
259 %if "%{?_lib}" == "lib64"
260 %attr(644,root,root) %{_unitdir}/connman.service
261 %attr(644,root,root) %{_unitdir}/multi-user.target.wants/connman.service
262 %attr(644,root,root) %{_unitdir}/connman.socket
263 %attr(644,root,root) %{_unitdir}/sockets.target.wants/connman.socket
265 %attr(644,root,root) %{_libdir}/systemd/system/connman.socket
266 %attr(644,root,root) %{_libdir}/systemd/system/sockets.target.wants/connman.socket
271 %manifest connman.manifest
272 %{_libdir}/%{name}/test/*
275 %manifest connman.manifest
277 %{_libdir}/pkgconfig/*.pc
279 %if %{with connman_openconnect}
280 %files plugin-openconnect
281 %manifest %{name}.manifest
282 %{_libdir}/connman/plugins-vpn/openconnect.so
283 %{_libdir}/connman/scripts/openconnect-script
287 %if %{with connman_openvpn}
288 %files plugin-openvpn
289 %manifest %{name}.manifest
290 %{_libdir}/%{name}/plugins-vpn/openvpn.so
291 %{_libdir}/%{name}/scripts/openvpn-script
295 %if %{with connman_ipsec}
297 %manifest %{name}.manifest
298 %{_libdir}/%{name}/plugins-vpn/ipsec.so
299 %{_libdir}/%{name}/scripts/ipsec-script
303 %if %{with connman_vpnd}
305 %manifest %{name}.manifest
306 %{_bindir}/connman-vpnd
307 %dir %{_libdir}/%{name}
308 %dir %{_libdir}/%{name}/scripts
309 %dir %{_libdir}/%{name}/plugins-vpn
310 %attr(644,root,root) %config %{_sysconfdir}/dbus-1/system.d/connman-vpn-dbus.conf
311 %{_datadir}/dbus-1/system-services/net.connman.vpn.service
313 %attr(644,root,root) %{_libdir}/systemd/system/connman-vpn.service
314 %if "%{?_lib}" == "lib64"
315 %attr(644,root,root) %{_unitdir}/connman-vpn.service
320 mv -f %{_libdir}/systemd/system/connman.service.tv %{_libdir}/systemd/system/connman.service
321 mv -f %{_sysconfdir}/connman/main.conf.tv %{_sysconfdir}/connman/main.conf
323 %attr(644,network_fw,network_fw) %{_sysconfdir}/connman/main.conf.tv
325 %if "%{?_lib}" == "lib64"
326 %attr(644,root,root) %{_unitdir}/connman.service.tv
328 %attr(644,root,root) %{_libdir}/systemd/system/connman.service.tv
331 mv -f %{_sysconfdir}/connman/main.conf.ivi %{_sysconfdir}/connman/main.conf
333 %attr(644,network_fw,network_fw) %{_sysconfdir}/connman/main.conf.ivi
335 %post extension-disable-eth
336 mv -f %{_sysconfdir}/connman/main.conf.disable.eth %{_sysconfdir}/connman/main.conf
337 %files extension-disable-eth
338 %attr(644,network_fw,network_fw) %{_sysconfdir}/connman/main.conf.disable.eth