1 %bcond_with connman_openconnect
2 %bcond_without connman_openvpn
3 %bcond_without connman_vpnd
9 Summary: Connection Manager
10 Url: http://connman.net
11 Group: Network & Connectivity/Connection Management
12 Source0: %{name}-%{version}.tar.gz
13 BuildRequires: systemd-devel
14 BuildRequires: pkgconfig(dbus-1)
15 BuildRequires: pkgconfig(glib-2.0)
16 BuildRequires: pkgconfig(libiptc)
17 BuildRequires: pkgconfig(xtables)
18 BuildRequires: pkgconfig(libsmack)
19 BuildRequires: pkgconfig(tpkp-gnutls)
20 BuildRequires: pkgconfig(libsystemd-daemon)
21 %if %{with connman_openconnect}
22 BuildRequires: openconnect
24 %if %{with connman_openvpn}
25 BuildRequires: openvpn
27 BuildRequires: ca-certificates-devel
28 BuildRequires: readline-devel
32 Requires(post): systemd
33 Requires(preun): systemd
34 Requires(postun): systemd
37 %define upgrade_script_filename 500.connman_upgrade.sh
38 %define upgrade_script_path /usr/share/upgrade/scripts
41 Connection Manager provides a daemon for managing Internet connections
42 within embedded devices running the Linux operating system.
44 %if %{with connman_openconnect}
45 %package plugin-openconnect
46 Summary: Openconnect Support for Connman
47 Requires: %{name} = %{version}
50 %description plugin-openconnect
51 Openconnect Support for Connman.
54 %if %{with connman_openvpn}
55 %package plugin-openvpn
56 Summary: Openvpn Support for Connman
57 Requires: %{name} = %{version}
60 %description plugin-openvpn
61 OpenVPN support for Connman.
64 %if %{with connman_vpnd}
66 Summary: VPN Support for Connman
67 #BuildRequires: %{name} = %{version}
68 Requires: %{name} = %{version}
70 %description connman-vpnd
71 Provides VPN support for Connman
75 Summary: Test Scripts for Connection Manager
76 Group: Development/Tools
77 Requires: %{name} = %{version}
83 Scripts for testing Connman and its functionality
86 Summary: Development Files for connman
87 Group: Development/Tools
88 Requires: %{name} = %{version}
91 Header files and development files for connman.
98 CFLAGS+=" -DTIZEN_EXT -lsmack -Werror"
99 CFLAGS+=" -DTIZEN_SYS_CA_BUNDLE=\"%TZ_SYS_RO_CA_BUNDLE\""
100 %if "%{profile}" == "tv"
101 CFLAGS+=" -DTIZEN_TV_EXT"
104 %if %{with connman_vpnd}
105 VPN_CFLAGS+=" -DTIZEN_EXT -lsmack -Werror"
114 --enable-wifi=builtin \
115 %if %{with connman_openconnect}
116 --enable-openconnect \
118 %if %{with connman_openvpn}
121 %if 0%{?enable_connman_features}
125 --enable-telephony=builtin \
129 --with-systemdunitdir=%{_libdir}/systemd/system \
138 #Systemd service file
139 mkdir -p %{buildroot}%{_libdir}/systemd/system/
140 %if "%{?_lib}" == "lib64"
141 mkdir -p %{buildroot}%{_unitdir}
144 %if "%{profile}" == "tv"
145 cp src/connman_tv.service %{buildroot}%{_libdir}/systemd/system/connman.service
146 %if "%{?_lib}" == "lib64"
147 cp src/connman_tv.service %{buildroot}%{_unitdir}/connman.service
148 cp vpn/connman-vpn.service %{buildroot}%{_unitdir}/connman-vpn.service
151 %if "%{?_lib}" == "lib64"
152 cp src/connman.service %{buildroot}%{_unitdir}/connman.service
153 cp vpn/connman-vpn.service %{buildroot}%{_unitdir}/connman-vpn.service
157 mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants
158 ln -s ../connman.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/connman.service
159 %if "%{?_lib}" == "lib64"
160 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
161 ln -s ../connman.service %{buildroot}%{_unitdir}/multi-user.target.wants/connman.service
164 #Systemd socket file for DNS proxy
165 %if "%{?_lib}" == "lib64"
166 cp src/connman.socket %{buildroot}%{_unitdir}/connman.socket
167 mkdir -p %{buildroot}%{_unitdir}/sockets.target.wants
168 ln -s ../connman.socket %{buildroot}%{_unitdir}/sockets.target.wants/connman.socket
170 cp src/connman.socket %{buildroot}%{_libdir}/systemd/system/connman.socket
171 mkdir -p %{buildroot}%{_libdir}/systemd/system/sockets.target.wants
172 ln -s ../connman.socket %{buildroot}%{_libdir}/systemd/system/sockets.target.wants/connman.socket
175 mkdir -p %{buildroot}/%{_localstatedir}/lib/connman
176 cp resources/var/lib/connman/settings %{buildroot}/%{_localstatedir}/lib/connman/settings
177 mkdir -p %{buildroot}%{_datadir}/dbus-1/system-services
178 cp resources/usr/share/dbus-1/system-services/net.connman.service %{buildroot}%{_datadir}/dbus-1/system-services/net.connman.service
179 mkdir -p %{buildroot}/etc/connman
181 %if "%{profile}" == "ivi"
182 cp src/main_ivi.conf %{buildroot}/etc/connman/main.conf
184 cp src/main.conf %{buildroot}/etc/connman/main.conf
187 rm %{buildroot}%{_sysconfdir}/dbus-1/system.d/*.conf
188 mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d/
189 cp src/connman.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/
192 mkdir -p %{buildroot}%{_datadir}/license
193 cp COPYING %{buildroot}%{_datadir}/license/connman
195 %if %{with connman_vpnd}
196 cp vpn/vpn-dbus.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/connman-vpn-dbus.conf
200 mkdir -p %{buildroot}%{upgrade_script_path}
201 cp -f scripts/%{upgrade_script_filename} %{buildroot}%{upgrade_script_path}
204 chsmack -a 'System' /%{_localstatedir}/lib/connman
205 chsmack -a 'System' /%{_localstatedir}/lib/connman/settings
210 systemctl daemon-reload
215 %manifest connman.manifest
216 %attr(500,root,root) %{_sbindir}/*
217 %attr(500,root,root) %{_bindir}/connmanctl
218 %attr(600,root,root) /%{_localstatedir}/lib/connman/settings
219 #%{_libdir}/connman/plugins/*.so
220 %attr(644,root,root) %{_datadir}/dbus-1/system-services/*
221 #%{_datadir}/dbus-1/services/*
222 %{_sysconfdir}/dbus-1/system.d/*
223 %attr(644,root,root) %{_sysconfdir}/connman/main.conf
224 %{_sysconfdir}/dbus-1/system.d/*.conf
225 %attr(644,root,root) %{_libdir}/systemd/system/connman.service
226 %attr(644,root,root) %{_libdir}/systemd/system/multi-user.target.wants/connman.service
227 %attr(644,root,root) %{_libdir}/systemd/system/connman-vpn.service
228 %if "%{?_lib}" == "lib64"
229 %attr(644,root,root) %{_unitdir}/connman.service
230 %attr(644,root,root) %{_unitdir}/multi-user.target.wants/connman.service
231 %attr(644,root,root) %{_unitdir}/connman-vpn.service
232 %attr(644,root,root) %{_unitdir}/connman.socket
233 %attr(644,root,root) %{_unitdir}/sockets.target.wants/connman.socket
235 %attr(644,root,root) %{_libdir}/systemd/system/connman.socket
236 %attr(644,root,root) %{_libdir}/systemd/system/sockets.target.wants/connman.socket
238 %{_datadir}/license/connman
239 %{upgrade_script_path}/%{upgrade_script_filename}
242 %manifest connman.manifest
243 %{_libdir}/%{name}/test/*
246 %manifest connman.manifest
248 %{_libdir}/pkgconfig/*.pc
250 %if %{with connman_openconnect}
251 %files plugin-openconnect
252 %manifest %{name}.manifest
253 %{_libdir}/connman/plugins-vpn/openconnect.so
254 %{_libdir}/connman/scripts/openconnect-script
255 %{_datadir}/dbus-1/system-services/net.connman.vpn.service
258 %if %{with connman_openvpn}
259 %files plugin-openvpn
260 %manifest %{name}.manifest
261 %{_libdir}/%{name}/plugins-vpn/openvpn.so
262 %{_libdir}/%{name}/scripts/openvpn-script
263 %{_datadir}/dbus-1/system-services/net.connman.vpn.service
266 %if %{with connman_vpnd}
268 %manifest %{name}.manifest
269 #%{_sbindir}/connman-vpnd
270 %dir %{_libdir}/%{name}
271 %dir %{_libdir}/%{name}/scripts
272 %dir %{_libdir}/%{name}/plugins-vpn
273 %config %{_sysconfdir}/dbus-1/system.d/connman-vpn-dbus.conf
274 %{_datadir}/dbus-1/system-services/net.connman.vpn.service