summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhang zhengguang <zhengguang.zhang@intel.com>2014-07-04 06:37:58 (GMT)
committerZhang zhengguang <zhengguang.zhang@intel.com>2014-10-31 08:06:20 (GMT)
commit509d88ad3a5d229a5df0e7f349ac70e02148396e (patch)
tree76c1c6aebbf3cdd6b9fb35756ca48d62558ea979
parent346988b0c78109cce94fec48f8eeb16719426fa3 (diff)
downloadconnman-509d88ad3a5d229a5df0e7f349ac70e02148396e.zip
connman-509d88ad3a5d229a5df0e7f349ac70e02148396e.tar.gz
connman-509d88ad3a5d229a5df0e7f349ac70e02148396e.tar.bz2
Enable ConnMan VPND/OpenVPN/OpenConnect configurable in spec file
-rw-r--r--packaging/connman.spec88
1 files changed, 88 insertions, 0 deletions
diff --git a/packaging/connman.spec b/packaging/connman.spec
index 5438f4c..edc1d53 100644
--- a/packaging/connman.spec
+++ b/packaging/connman.spec
@@ -1,3 +1,6 @@
+%bcond_with connman_openconnect
+%bcond_with connman_openvpn
+%bcond_with connman_vpnd
%bcond_with connman_ntp
Name: connman
@@ -17,6 +20,12 @@ BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(libiptc)
BuildRequires: pkgconfig(xtables)
BuildRequires: pkgconfig(gnutls)
+%if %{with connman_openconnect}
+BuildRequires: openconnect
+%endif
+%if %{with connman_openvpn}
+BuildRequires: openvpn
+%endif
BuildRequires: readline-devel
%systemd_requires
Requires: iptables
@@ -25,6 +34,36 @@ Requires: iptables
Connection Manager provides a daemon for managing Internet connections
within embedded devices running the Linux operating system.
+%if %{with connman_openconnect}
+%package plugin-openconnect
+Summary: Openconnect Support for Connman
+Requires: %{name} = %{version}
+Requires: openconnect
+
+%description plugin-openconnect
+Openconnect Support for Connman.
+%endif
+
+%if %{with connman_openvpn}
+%package plugin-openvpn
+Summary: Openvpn Support for Connman
+Requires: %{name} = %{version}
+Requires: openvpn
+
+%description plugin-openvpn
+OpenVPN support for Connman.
+%endif
+
+%if %{with connman_vpnd}
+%package connman-vpnd
+Summary: VPN Support for Connman
+BuildRequires: %{name} = %{version}
+Requires: %{name} = %{version}
+
+%description connman-vpnd
+Provides VPN support for Connman
+%endif
+
%package test
Summary: Test Scripts for Connection Manager
Requires: %{name} = %{version}
@@ -56,6 +95,12 @@ chmod +x bootstrap
--enable-client \
--enable-pacrunner \
--enable-wifi=builtin \
+%if %{with connman_openconnect}
+ --enable-openconnect \
+%endif
+%if %{with connman_openvpn}
+ --enable-openvpn \
+%endif
--enable-test \
--enable-loopback \
--enable-ethernet \
@@ -80,12 +125,23 @@ cp src/main.conf %{buildroot}%{_sysconfdir}/connman/main.conf
%install_service network.target.wants connman.service
%install_service multi-user.target.wants connman.service
+%if %{with connman_vpnd}
+%install_service network.target.wants connman-vpn.service
+%install_service multi-user.target.wants connman-vpn.service
+%endif
+
%post
systemctl daemon-reload
systemctl restart connman.service
+%if %{with connman_vpnd}
+systemctl restart connman-vpn.service
+%endif
%preun
systemctl stop connman.service
+%if %{with connman_vpnd}
+systemctl stop connman-vpn.service
+%endif
%postun
systemctl daemon-reload
@@ -118,4 +174,36 @@ systemctl daemon-reload
%{_includedir}/connman/*.h
%{_libdir}/pkgconfig/*.pc
+%if %{with connman_openconnect}
+%files plugin-openconnect
+%manifest %{name}.manifest
+%{_unitdir}/connman-vpn.service
+%{_libdir}/connman/plugins-vpn/openconnect.so
+%{_libdir}/connman/scripts/openconnect-script
+%{_datadir}/dbus-1/system-services/net.connman.vpn.service
+%endif
+
+%if %{with connman_openvpn}
+%files plugin-openvpn
+%manifest %{name}.manifest
+%{_unitdir}/connman-vpn.service
+%{_libdir}/%{name}/plugins-vpn/openvpn.so
+%{_libdir}/%{name}/scripts/openvpn-script
+%{_datadir}/dbus-1/system-services/net.connman.vpn.service
+%endif
+
+%if %{with connman_vpnd}
+%files connman-vpnd
+%manifest %{name}.manifest
+%{_sbindir}/connman-vpnd
+%{_unitdir}/connman-vpn.service
+%{_unitdir}/network.target.wants/connman-vpn.service
+%{_unitdir}/multi-user.target.wants/connman-vpn.service
+%dir %{_libdir}/%{name}
+%dir %{_libdir}/%{name}/scripts
+%dir %{_libdir}/%{name}/plugins-vpn
+%config %{_sysconfdir}/dbus-1/system.d/connman-vpn-dbus.conf
+%{_datadir}/dbus-1/system-services/net.connman.vpn.service
+%endif
+
%changelog