+#
+# Conditional build:
+%bcond_with nftables # nftables instead of iptables
+
Summary: Connection Manager
Summary(pl.UTF-8): Zarządca połączeń
Name: connman
-Version: 1.13
+Version: 1.39
Release: 1
License: GPL v2
Group: Networking/Daemons
-Source0: http://www.kernel.org/pub/linux/network/connman/%{name}-%{version}.tar.xz
-# Source0-md5: 0623d4afe3792378da5818e2970c5f1c
-Patch0: %{name}-linux.patch
-URL: http://connman.net/
+Source0: https://www.kernel.org/pub/linux/network/connman/%{name}-%{version}.tar.xz
+# Source0-md5: b740a8859d1f0473fc76f8f590e4b57a
+URL: https://connman.net/
BuildRequires: dbus-devel >= 1.4
-BuildRequires: glib2-devel >= 1:2.28
+BuildRequires: glib2-devel >= 1:2.40
BuildRequires: gnutls-devel
-BuildRequires: iptables-devel >= 1.4.11
BuildRequires: pkgconfig
BuildRequires: polkit-devel
BuildRequires: ppp-plugin-devel
+BuildRequires: readline-devel
BuildRequires: systemd-devel
BuildRequires: tar >= 1:1.22
BuildRequires: xz
+%if %{with nftables}
+BuildRequires: libmnl-devel >= 1.0.0
+BuildRequires: libnftnl-devel >= 1.0.4
+%else
+BuildRequires: iptables-devel >= 1.4.11
+%endif
Requires: dbus >= 1.4
-Requires: glib2 >= 1:2.28
+Requires: glib2 >= 1:2.40
+%if %{with nftables}
+Requires: libmnl >= 1.0.0
+Requires: libnftnl >= 1.0.4
+%else
Requires: iptables-libs >= 1.4.11
+%endif
Obsoletes: connman-plugin-wimax
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%prep
%setup -q
-%patch0 -p1
%build
%configure \
- L2TP=/usr/sbin/xl2tpd \
+ IPTABLES_SAVE=/usr/sbin/iptables-save \
PPPD=/usr/sbin/pppd \
- PPTP=/usr/sbin/pptp \
WPASUPPLICANT=/usr/sbin/wpa_supplicant \
--disable-silent-rules \
--enable-hh2serial-gps \
--enable-iospm \
+ --enable-iwd \
--enable-l2tp \
--enable-nmcompat \
--enable-openconnect \
--enable-openvpn \
--enable-polkit \
--enable-pptp \
- --enable-threads \
--enable-tist \
--enable-vpnc \
+ %{?with_nftables:--with-firewall=nftables} \
+ --with-l2tp=/usr/sbin/xl2tpd \
--with-openconnect=/usr/sbin/openconnect \
--with-openvpn=/usr/sbin/openvpn \
+ --with-pptp=/usr/sbin/pptp \
--with-vpnc=/usr/bin/vpnc
%{__make}
%{__rm} $RPM_BUILD_ROOT%{_libdir}/connman/{plugins,plugins-vpn,scripts}/*.la
+install -d $RPM_BUILD_ROOT/var/{lib/connman{,-vpn},run/connman}
+
+install -D src/main.conf $RPM_BUILD_ROOT%{_sysconfdir}/connman/main.conf
+
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc AUTHORS ChangeLog README TODO
-%attr(755,root,root) %{_sbindir}/connmand
+%dir %{_sysconfdir}/connman
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/connman/main.conf
+%attr(755,root,root) %{_bindir}/connmanctl
%attr(755,root,root) %{_sbindir}/connman-vpnd
+%attr(755,root,root) %{_sbindir}/connmand
+%attr(755,root,root) %{_sbindir}/connmand-wait-online
%dir %{_libdir}/connman
%dir %{_libdir}/connman/plugins
%attr(755,root,root) %{_libdir}/connman/plugins/hh2serial-gps.so
%attr(755,root,root) %{_libdir}/connman/plugins-vpn/openvpn.so
%attr(755,root,root) %{_libdir}/connman/plugins-vpn/pptp.so
%attr(755,root,root) %{_libdir}/connman/plugins-vpn/vpnc.so
+%attr(755,root,root) %{_libdir}/connman/plugins-vpn/wireguard.so
%dir %{_libdir}/connman/scripts
%attr(755,root,root) %{_libdir}/connman/scripts/libppp-plugin.so*
-%attr(755,root,root) %{_libdir}/connman/scripts/openconnect-script
%attr(755,root,root) %{_libdir}/connman/scripts/openvpn-script
-/etc/dbus-1/system.d/connman.conf
-/etc/dbus-1/system.d/connman-nmcompat.conf
-/etc/dbus-1/system.d/connman-vpn-dbus.conf
+%attr(755,root,root) %{_libdir}/connman/scripts/vpn-script
+/usr/share/dbus-1/system.d/connman.conf
+/usr/share/dbus-1/system.d/connman-nmcompat.conf
+/usr/share/dbus-1/system.d/connman-vpn-dbus.conf
/usr/share/dbus-1/system-services/net.connman.vpn.service
/usr/share/polkit-1/actions/net.connman.policy
/usr/share/polkit-1/actions/net.connman.vpn.policy
%{systemdunitdir}/connman.service
%{systemdunitdir}/connman-vpn.service
+%{systemdunitdir}/connman-wait-online.service
+%{systemdtmpfilesdir}/connman_resolvconf.conf
+%dir /var/lib/connman
+%dir /var/lib/connman-vpn
+%dir /var/run/connman
+%{_mandir}/man1/connmanctl.1*
+%{_mandir}/man5/connman.conf.5*
+%{_mandir}/man5/connman-service.config.5*
+%{_mandir}/man5/connman-vpn.conf.5*
+%{_mandir}/man5/connman-vpn-provider.config.5*
+%{_mandir}/man8/connman.8*
+%{_mandir}/man8/connman-vpn.8*
%files devel
%defattr(644,root,root,755)