File NetworkManager-gnome.spec of Package NetworkManager-gnome

#
# spec file for package NetworkManager-gnome
#
# Copyright (c) 2011 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.1.90
Release:        1
License:        GPLv2+
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  NetworkManager-devel >= 0.9.1
BuildRequires:  dbus-1-devel
BuildRequires:  dbus-1-glib-devel
BuildRequires:  gconf2-devel
BuildRequires:  gnome-bluetooth-devel
BuildRequires:  gtk3-devel
BuildRequires:  intltool
BuildRequires:  libgnome-keyring-devel
BuildRequires:  libnotify-devel
BuildRequires:  libtool
BuildRequires:  polkit-devel
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(iso-codes)
Group:          System/GUI/GNOME
Summary:        GNOME applications for use with NetworkManager
Source:         http://download.gnome.org/sources/network-manager-applet/0.9/network-manager-applet-%{version}.tar.bz2
Source1:        nm-icons.tar.gz
# PATCH-FIX-OPENSUSE NetworkManager-gnome-OnlyShowIn.patch -- Add OnlyShowIn key to autostart file
Patch1:         NetworkManager-gnome-OnlyShowIn.patch
# PATCH-FIX-UPSTREAM NetworkManager-gnome-bluetooth-crash.patch bgo#661177 vuntz@opensuse.org -- Avoid crashes in gnome-control-center when using hardware switch to disable bluetooth
Patch2:         NetworkManager-gnome-bluetooth-crash.patch
Provides:       NetworkManager-client
Requires:       NetworkManager >= 0.9.1
# 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
License:        GPLv2+
Summary:        NetworkManager Gtk+ dialogs
Group:          System/Libraries

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

%package -n libnm-gtk-devel
License:        GPLv2+
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
translation-update-upstream
%patch1 -p1
%patch2 -p1

%build
%configure \
    --disable-static \
    --disable-maintainer-mode
%__make %{?_smp_flags}

%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