File gDesklets.spec of Package gDesklets

#
# spec file for package gDesklets
#
# 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/
#

# norootforbuild


Name:           gDesklets
Version:        0.36.2
Release:        2
Url:            http://www.gdesklets.de
Group:          System/GUI/GNOME
License:        GPLv2+
Summary:        Tiny Displays Sitting on Your Desktop
Source:         http://www.pycage.de/download/gdesklets/%{name}-%{version}.tar.bz2
Patch1:         %name-desktop.patch
# PATCH-FIX-UPSTREAM gDesklets-0.36.1-am111.patch coolo@novell.com -- remove duplicates
Patch3:         gDesklets-0.36.1-am111.patch
BuildRequires:  fdupes
BuildRequires:  intltool
BuildRequires:  libgtop-devel
BuildRequires:  librsvg-devel
BuildRequires:  python-devel
BuildRequires:  python-gnome-devel
BuildRequires:  python-gtk-devel
BuildRequires:  python-orbit-devel
BuildRequires:  shared-mime-info
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
Requires:       python-gtk
Requires:       python-orbit
Requires:       python-gnome
Requires:       python-xml
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%py_requires

%description
gDesklets provides an advanced architecture for desktop applets - tiny
displays sitting on your desktop in a symbiotic relationship of eye
candyand usefulness. Populate your desktop with status meters, icon
bars, weather sensors,news tickers and a lot more! Virtually anything
is possible and may even be available some day.

%lang_package
%prep
%setup -q
translation-update-upstream
%patch1
%patch3 -p1

%build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%configure
make

%install
%makeinstall
# Install bash completion script
install -D -m0644 contrib/bash/gdesklets %{buildroot}%{_sysconfdir}/bash_completion.d/gdesklets
%suse_update_desktop_file gdesklets -r System Applet
# Change sr@Latn to sr@latin
mv %{buildroot}%{_datadir}/locale/sr@Latn %{buildroot}%{_datadir}/locale/sr@latin
# Move icons in the right icon theme
mv %{buildroot}%{_datadir}/icons/gnome %{buildroot}%{_datadir}/icons/hicolor
%find_lang gdesklets %{?no_lang_C}
rm $RPM_BUILD_ROOT%{_libdir}/gdesklets/*/*.la $RPM_BUILD_ROOT%{_libdir}/gdesklets/*/*/*.la
%fdupes -s $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%post
%if 0%{?suse_version} > 1130
%desktop_database_post
%icon_theme_cache_post
%mime_database_post
%else
if [ -f /usr/bin/update-mime-database ]; then
  /usr/bin/update-mime-database /usr/share/mime > /dev/null
fi
%endif

%postun
%if 0%{?suse_version} > 1130
%desktop_database_postun
%icon_theme_cache_postun
%mime_database_postun
%else
if [ -f /usr/bin/update-mime-database ]; then
  /usr/bin/update-mime-database /usr/share/mime > /dev/null
fi
%endif

%files
%defattr (-, root, root)
%doc AUTHORS COPYING ChangeLog NEWS README TODO
%{_sysconfdir}/bash_completion.d/gdesklets
%{_bindir}/gdesklets
%{_libdir}/gdesklets/
%doc %{_mandir}/man1/gdesklets.*
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/48x48/mimetypes/*.png
%{_datadir}/mime/packages/gdesklets.xml
%{_datadir}/pixmaps/gdesklets.png

%files lang -f gdesklets.lang

%changelog
openSUSE Build Service is sponsored by