File NetworkManager-gnome.spec of Package NetworkManager-gnome

#
# spec file for package NetworkManager-gnome
#
# Copyright (c) 2012 SUSE LINUX Products 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/
#


Name:           NetworkManager-gnome
Url:            http://www.gnome.org/projects/NetworkManager/
Version:        0.9.4.1
Release:        0
# FIXME: --disable-more-warnings should be dropped from configure when possible. Added with 0.9.2.0 for Gtk+ 3.3 build.
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  NetworkManager-devel >= 0.9.4
BuildRequires:  dbus-1-devel
BuildRequires:  dbus-1-glib-devel
BuildRequires:  gconf2-devel
BuildRequires:  gnome-bluetooth-devel
# Needed for patch0
BuildRequires:  gnome-common
BuildRequires:  gtk3-devel
BuildRequires:  intltool
BuildRequires:  libgnome-keyring-devel
BuildRequires:  libnotify-devel
BuildRequires:  libtool
# Needed by patch0
BuildRequires:  polkit-devel
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(iso-codes)
Summary:        GNOME applications for use with NetworkManager
License:        GPL-2.0+
Group:          System/GUI/GNOME
Source:         http://download.gnome.org/sources/network-manager-applet/0.9/network-manager-applet-%{version}.tar.xz
Source1:        nm-icons.tar.gz
# PATCH-FIX-UPSTREAM nm-applet-private-connection.patch bnc#751211 bgo#646187 dimstar@opensuse.org -- Create private connections if the user is not authorized. Allows to create wifi connections without root access. Patch under discussion upstream.
Patch0:         nm-applet-private-connection.patch
# PATCH-FIX-UPSTREAM nm-applet-probe-radius-server-cert.patch bnc#574266 glin@suse.com -- Probe the RADIUS server certificate
Patch1:         nm-applet-probe-radius-server-cert.patch
Provides:       NetworkManager-client
Requires:       NetworkManager >= 0.9.3
# 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
%gconf_schemas_prereq

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

%package -n libnm-gtk0
Summary:        NetworkManager Gtk+ dialogs
Group:          System/Libraries

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

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

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

%lang_package
%prep
%setup -q -n network-manager-applet-%{version} -a 1
%patch0 -p1
%patch1 -p1
translation-update-upstream

%build
# Needed for patch0
NOCONFIGURE=1 gnome-autogen.sh
%configure \
    --disable-static \
    --disable-maintainer-mode \
    --disable-more-warnings
%__make %{?_smp_mflags}

%install
%makeinstall
find %{buildroot}%{_libdir} -name '*.la' -delete -print
%suse_update_desktop_file %{buildroot}%{_datadir}/applications/nm-applet.desktop
%suse_update_desktop_file %{buildroot}%{_sysconfdir}/xdg/autostart/nm-applet.desktop
%suse_update_desktop_file -r nm-connection-editor GTK GNOME System X-SuSE-ServiceConfiguration
%find_gconf_schemas
%find_lang nm-applet %{?no_lang_C}
cp -r nm-icons/* $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/

%pre -f %{name}.schemas_pre

%post
%desktop_database_post
%icon_theme_cache_post

%preun -f %{name}.schemas_preun

%postun
%desktop_database_postun
%icon_theme_cache_postun

%posttrans -f %{name}.schemas_posttrans

%post -n libnm-gtk0 -p /sbin/ldconfig

%postun -n libnm-gtk0 -p /sbin/ldconfig

%files -f %{name}.schemas_list
%defattr(-,root,root)
%doc COPYING ChangeLog NEWS AUTHORS README CONTRIBUTING
%{_bindir}/nm-applet
%{_bindir}/nm-connection-editor
%{_libdir}/gnome-bluetooth/plugins/libnma.*
%{_datadir}/nm-applet
%{_datadir}/icons/hicolor/*/apps/*.png
%{_datadir}/icons/hicolor/*/apps/*.svg
%{_sysconfdir}/xdg/autostart/nm-applet.desktop
%{_datadir}/applications/nm-applet.desktop
%{_datadir}/applications/nm-connection-editor.desktop

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

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

%files lang -f nm-applet.lang

%changelog
openSUSE Build Service is sponsored by