File NetworkManager-applet.spec of Package NetworkManager-applet

#
# spec file for package NetworkManager-applet
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%if 0%{?is_opensuse}
%bcond_without appindicator
%else
%bcond_with appindicator
%endif

%define with_cacert_patch 0
%define sover   0
%define _name   network-manager-applet
Name:           NetworkManager-applet
Version:        1.4.4
Release:        0
Summary:        GTK+ tray applet for use with NetworkManager
License:        GPL-2.0+
Group:          System/GUI/GNOME
Url:            https://gnome.org/projects/NetworkManager
Source:         http://download.gnome.org/sources/network-manager-applet/1.4/network-manager-applet-%{version}.tar.xz
# PATCH-NEEDS-REBASE nm-applet-private-connection.patch boo#751211 bgo#646187 dimstar@opensuse.org -- Create private connections if the user is not authorised. Allows to create wifi connections without root access. Patch under discussion upstream. (WAS: PATCH-FIX-UPSTREAM)
Patch0:         nm-applet-private-connection.patch
# PATCH-NEEDS-REBASE nm-applet-probe-radius-server-cert.patch bsc#574266 glin@suse.com -- Probe the RADIUS server certificate. (WAS: PATCH-FIX-UPSTREAM)
Patch1:         nm-applet-probe-radius-server-cert.patch
# PATCH-FEATURE-UPSTREAM network-manager-applet-no-firewalld.patch boo#897636 bgo#737687 dimstar@opensuse.org -- Allow disabling FirewallD integration
Patch2:         network-manager-applet-no-firewalld.patch
# Needed for patch0 - disabled since patch0 is disabled.
#BuildRequires:  gnome-common
BuildRequires:  intltool
# Needed by Patch0. Patch0 is currently disabled.
#BuildRequires:  libtool
BuildRequires:  pkgconfig
# Needed by Patch0.
BuildRequires:  polkit-devel
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(NetworkManager) >= 1.3
%if %{with appindicator}
BuildRequires:  pkgconfig(appindicator3-0.1)
%endif
BuildRequires:  pkgconfig(dbusmenu-gtk3-0.4) >= 16.04.0
BuildRequires:  pkgconfig(gobject-introspection-1.0)
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.4
BuildRequires:  pkgconfig(gudev-1.0) >= 147
BuildRequires:  pkgconfig(iso-codes)
BuildRequires:  pkgconfig(jansson) >= 2.3
BuildRequires:  pkgconfig(libnm) >= 1.3
BuildRequires:  pkgconfig(libnm-glib) >= 1.3
BuildRequires:  pkgconfig(libnm-glib-vpn) >= 1.3
BuildRequires:  pkgconfig(libnm-util) >= 1.3
BuildRequires:  pkgconfig(libnotify)
BuildRequires:  pkgconfig(libsecret-unstable)
BuildRequires:  pkgconfig(mm-glib)
Requires:       NetworkManager >= 0.9.3
Requires:       libnma-data
Requires:       dbus(org.freedesktop.secrets)
# Needed for translated country names.
Requires:       iso-codes
# mobile-broadband-provider-info is required for DUN capabilities. The BT plugin crashes without it.
Requires:       mobile-broadband-provider-info
Requires:       timezone
Recommends:     %{name}-lang
Recommends:     NetworkManager-connection-editor
Provides:       NetworkManager-client
# NetworkManager-gnome was last used in openSUSE Leap 42.2.
Provides:       NetworkManager-gnome = %{version}
Obsoletes:      NetworkManager-gnome < %{version}
Obsoletes:      NetworkManager-gnome-lang
%if !0%{?is_opensuse}
BuildRequires:  translation-update-upstream
%endif
%if %{with_cacert_patch}
Requires:       NetworkManager(cacert-patch)
%endif

%description
This package contains utilities and applications for use with
NetworkManager, including a panel applet for wireless networks.

%package -n NetworkManager-connection-editor
Summary:        GUI to configure connections for NetworkManager
Group:          System/GUI/GNOME

%description -n NetworkManager-connection-editor
NetworkManager Configuration tool - take control over your
connection settings.

%package -n libnma%{sover}
Summary:        NetworkManager UI dialog library
Group:          System/Libraries
Requires:       libnma-data >= %{version}

%description -n libnma%{sover}
This library provides UI dialogs for NetworkManager integration.

%package -n libnma-data
Summary:        NetworkManager UI dialogs
Group:          System/Libraries
BuildArch:      noarch
%glib2_gsettings_schema_requires

%description -n libnma-data
This package provides GTK+ dialogs for NetworkManager integration.

%package -n typelib-1_0-NMA-1_0
Summary:        NetworkManager UI dialogs -- Introspection bindings
Group:          System/Libraries

%description -n typelib-1_0-NMA-1_0
This library provides GTK+ dialogs for NetworkManager integration
provided as introspection bindings.

%package -n libnma-devel
Summary:        NetworkManager UI dialogs -- Development Files
Group:          Development/Libraries/GNOME
Requires:       libnma0 = %{version}
Requires:       typelib-1_0-NMA-1_0 = %{version}

%description -n libnma-devel
This library provides GTK+ dialogs for NetworkManager integration.

%package -n libnm-gtk%{sover}
Summary:        NetworkManager Gtk+ dialog library
Group:          System/Libraries
Obsoletes:      libnm-gtk-data < %{version}

%description -n libnm-gtk%{sover}
This library provides GTK+ dialogs for NetworkManager integration.

%package -n typelib-1_0-NMGtk-1_0
Summary:        NetworkManager Gtk+ dialogs -- Introspection bindings
Group:          System/Libraries

%description -n typelib-1_0-NMGtk-1_0
This library provides GTK+ dialogs for NetworkManager integration
provided as introspection bindings.

%package -n libnm-gtk-devel
Summary:        NetworkManager Gtk+ dialogs -- Development Files
Group:          Development/Libraries/GNOME
Requires:       libnm-gtk%{sover} = %{version}
Requires:       typelib-1_0-NMGtk-1_0 = %{version}

%description -n libnm-gtk-devel
This library provides GTK+ dialogs for NetworkManager integration.

%lang_package

%prep
%setup -q -n %{_name}-%{version}
# Needs rebase.
# %%patch0 -p1
%if %{with_cacert_patch}
%patch1 -p1
%endif
%patch2 -p1
%if !0%{?is_opensuse}
translation-update-upstream
%endif

%build
# Patch0 is disabled.
#NOCONFIGURE=1 gnome-autogen.sh
%configure \
  --disable-static          \
  --disable-maintainer-mode \
%if %{with appindicator}
  --with-appindicator
%else
  --without-appindicator
%endif
make %{?_smp_mflags}

%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
%suse_update_desktop_file -r nm-connection-editor GTK GNOME System X-SuSE-ServiceConfiguration
%find_lang nm-applet %{?no_lang_C}

%post
%desktop_database_post
%icon_theme_cache_post

%post -n libnma-data
%glib2_gsettings_schema_post

%postun
%desktop_database_postun
%icon_theme_cache_postun

%postun -n libnma-data
%glib2_gsettings_schema_postun

%post -n libnm-gtk%{sover} -p /sbin/ldconfig

%postun -n libnm-gtk%{sover} -p /sbin/ldconfig

%post -n libnma%{sover} -p /sbin/ldconfig

%postun -n libnma%{sover} -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc COPYING CONTRIBUTING NEWS
%{_sysconfdir}/xdg/autostart/nm-applet.desktop
%{_bindir}/nm-applet
%{_datadir}/applications/nm-applet.desktop
%{_datadir}/icons/hicolor/*/apps/*.png
%{_datadir}/icons/hicolor/*/apps/*.svg
%{_mandir}/man1/nm-applet.1%{?ext_man}

%files lang -f nm-applet.lang
%defattr(-,root,root)

%files -n NetworkManager-connection-editor
%defattr(-,root,root)
%{_bindir}/nm-connection-editor
%{_datadir}/applications/nm-connection-editor.desktop
%dir %{_datadir}/appdata/
%{_datadir}/appdata/nm-connection-editor.appdata.xml
%{_mandir}/man1/nm-connection-editor.1%{?ext_man}

%files -n libnm-gtk%{sover}
%defattr(-,root,root)
%{_libdir}/libnm-gtk.so.%{sover}*

%files -n typelib-1_0-NMGtk-1_0
%defattr(-,root,root)
%{_libdir}/girepository-1.0/NMGtk-1.0.typelib

%files -n libnm-gtk-devel
%defattr(-,root,root)
%{_datadir}/gir-1.0/NMGtk-1.0.gir
%{_includedir}/libnm-gtk/
%{_libdir}/libnm-gtk.so
%{_libdir}/pkgconfig/libnm-gtk.pc

%files -n libnma%{sover}
%defattr(-,root,root)
%{_libdir}/libnma.so.%{sover}*

%files -n typelib-1_0-NMA-1_0
%defattr(-,root,root)
%{_libdir}/girepository-1.0/NMA-1.0.typelib

%files -n libnma-data
%defattr(-,root,root)
%{_datadir}/GConf/gsettings/nm-applet.convert
%{_datadir}/glib-2.0/schemas/org.gnome.nm-applet.gschema.xml

%files -n libnma-devel
%defattr(-,root,root)
%{_includedir}/libnma/
%{_libdir}/libnma.so
%{_libdir}/pkgconfig/libnma.pc
%{_datadir}/gir-1.0/NMA-1.0.gir

%changelog
openSUSE Build Service is sponsored by