-%define nmversion %{version}
+#
+# Conditional build:
+%bcond_without appindicator # application indicators
+#
+%define nm_ver 2:1.8
Summary: Network Manager for GNOME
Summary(pl.UTF-8): Zarządca sieci dla GNOME
Name: NetworkManager-applet
-Version: 0.8.1
+Version: 1.36.0
Release: 1
License: GPL v2
Group: X11/Applications
-Source0: http://ftp.gnome.org/pub/GNOME/sources/network-manager-applet/0.8/network-manager-applet-%{version}.tar.bz2
-# Source0-md5: b709808c1a5cfe8236061b5da4907313
-URL: http://projects.gnome.org/NetworkManager/
-BuildRequires: GConf2-devel >= 2.20.0
-BuildRequires: NetworkManager-devel >= %{nmversion}
-BuildRequires: autoconf >= 2.63
-BuildRequires: automake >= 1:1.10
-BuildRequires: dbus-devel >= 1.2.6
-BuildRequires: dbus-glib-devel >= 0.74
-BuildRequires: gettext-devel
-BuildRequires: gnome-bluetooth-devel >= 2.28.0
-BuildRequires: gtk+2-devel >= 2:2.14.0
-BuildRequires: intltool >= 0.36.2
-BuildRequires: libglade2-devel
-BuildRequires: libgnome-keyring-devel >= 2.20.0
-BuildRequires: libiw-devel >= 1:28-0.pre9.1
-BuildRequires: libnotify-devel >= 0.4.3
-BuildRequires: libtool
+Source0: https://download.gnome.org/sources/network-manager-applet/1.36/network-manager-applet-%{version}.tar.xz
+# Source0-md5: 534f7142f4cfbd81d79eec5e62bc80a8
+URL: https://wiki.gnome.org/Projects/NetworkManager
+BuildRequires: ModemManager-devel >= 1.0.0
+BuildRequires: NetworkManager-devel >= %{nm_ver}
+BuildRequires: gcr-devel >= 3.14
+BuildRequires: gcr-ui-devel >= 3.14
+BuildRequires: gettext-tools >= 0.19.8
+BuildRequires: glib2-devel >= 1:2.40
+BuildRequires: gobject-introspection-devel >= 0.9.6
+BuildRequires: gtk+3-devel >= 3.10
+BuildRequires: iso-codes
+BuildRequires: jansson-devel >= 2.7
+%{?with_appindicator:BuildRequires: libayatana-appindicator-gtk3-devel >= 0.1}
+%{?with_appindicator:BuildRequires: libdbusmenu-gtk3-devel >= 16.04.0}
+BuildRequires: libnma-devel >= 1.8.27
+BuildRequires: libsecret-devel >= 0.18
+BuildRequires: libselinux-devel
+BuildRequires: meson >= 0.46.0
+BuildRequires: ninja >= 1.5
BuildRequires: pkgconfig
-BuildRequires: polkit-devel >= 0.92
-BuildRequires: rpmbuild(macros) >= 1.311
-Requires(post,postun): gtk+2
-Requires(post,postun): hicolor-icon-theme
-Requires(post,preun): GConf2
-Requires: NetworkManager >= %{nmversion}
-Requires: dbus >= 1.2.6
+BuildRequires: rpmbuild(macros) >= 1.736
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
+Requires(post,postun): desktop-file-utils
+Requires(post,postun): glib2 >= 1:2.40
+Requires(post,postun): gtk-update-icon-cache
+Requires: NetworkManager >= %{nm_ver}
+Requires: glib2 >= 1:2.40
+Requires: hicolor-icon-theme
+Requires: jansson >= 2.7
+Requires: libnma >= 1.8.27
+Requires: libsecret >= 0.18
Requires: mobile-broadband-provider-info
Requires: polkit-gnome
Suggests: dbus(org.freedesktop.Notifications)
-Obsoletes: NetworkManager-applet-devel
-# sr@Latn vs. sr@latin
-Conflicts: glibc-misc < 6:2.7
+Obsoletes: NetworkManager-applet-devel < 0.7.0
+Obsoletes: gnome-bluetooth-plugin-nma < 1.2.2
+Conflicts: libnma-data < 1.10.4
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
%description -l pl.UTF-8
Aplet zarządcy sieci dla GNOME.
-%package -n gnome-bluetooth-plugin-nma
-Summary: NetworkManager applet plugin for GNOME Bluetooth
-Summary(pl.UTF-8): Wtyczka NetworkManager Applet dla GNOME Bluetooth
-Group: X11/Applications
-Requires: NetworkManager-applet >= %{nmversion}
-Requires: gnome-bluetooth >= 2.28.0
-
-%description -n gnome-bluetooth-plugin-nma
-NetworkManager applet plugin for GNOME Bluetooth.
-
-%description -n gnome-bluetooth-plugin-nma -l pl.UTF-8
-Wtyczka NetworkManager Applet dla GNOME Bluetooth.
-
%prep
%setup -q -n network-manager-applet-%{version}
%build
-%{__intltoolize}
-%{__libtoolize}
-%{__aclocal} -I m4
-%{__autoconf}
-%{__autoheader}
-%{__automake}
-%configure
-%{__make}
+%meson build \
+ -Dappindicator=%{?with_appindicator:ayatana}%{!?with_appindicator:no}
+
+%ninja_build -C build
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_datadir}/gnome-vpn-properties
-%{__make} install \
- DESTDIR=$RPM_BUILD_ROOT
+%ninja_install -C build
-rm -f $RPM_BUILD_ROOT%{_libdir}/gnome-bluetooth/plugins/*.{a,la}
+%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ie
%find_lang %{name} --with-gnome --all-name
%post
%update_icon_cache hicolor
-%gconf_schema_install nm-applet.schemas
-
-%preun
-%gconf_schema_uninstall nm-applet.schemas
+%glib_compile_schemas
+%update_desktop_database_post
%postun
%update_icon_cache hicolor
+if [ "$1" = "0" ]; then
+ %glib_compile_schemas
+fi
+%update_desktop_database_postun
%files -f %{name}.lang
%defattr(644,root,root,755)
-%doc AUTHORS CONTRIBUTING ChangeLog NEWS README
+%doc AUTHORS CONTRIBUTING NEWS
%attr(755,root,root) %{_bindir}/nm-applet
%attr(755,root,root) %{_bindir}/nm-connection-editor
-%{_sysconfdir}/gconf/schemas/nm-applet.schemas
+%{_datadir}/GConf/gsettings/nm-applet.convert
%dir %{_datadir}/gnome-vpn-properties
-%{_datadir}/nm-applet
+%{_datadir}/metainfo/nm-connection-editor.appdata.xml
+%{_datadir}/glib-2.0/schemas/org.gnome.nm-applet.gschema.xml
%{_sysconfdir}/xdg/autostart/nm-applet.desktop
+%{_desktopdir}/nm-applet.desktop
%{_desktopdir}/nm-connection-editor.desktop
-%{_iconsdir}/hicolor/*/apps/*.png
-%{_iconsdir}/hicolor/*/apps/*.svg
-%config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/nm-applet.conf
-
-%files -n gnome-bluetooth-plugin-nma
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/gnome-bluetooth/plugins/libnma.so
+%{_mandir}/man1/nm-applet.1*
+%{_mandir}/man1/nm-connection-editor.1*
+%{_iconsdir}/hicolor/*x*/apps/nm-*.png
+%{_iconsdir}/hicolor/scalable/apps/nm-*.svg