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
%define _name gdesklets
Version: 0.36.3
Release: 1
Url: http://www.gdesklets.de
Group: System/GUI/GNOME
License: GPL-2.0+
Summary: Tiny Displays Sitting on Your Desktop
Source: http://www.pycage.de/download/gdesklets/%{_name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM gDesklets-fix-install.patch vuntz@opensuse.org -- Fix installation, taken from upstream
Patch0: gDesklets-fix-install.patch
Patch1: gDesklets-desktop.patch
BuildRequires: fdupes
BuildRequires: intltool
BuildRequires: libgtop-devel
BuildRequires: librsvg-devel
BuildRequires: libtool
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 -n %{_name}-%{version}
translation-update-upstream
%patch0 -p0
%patch1 -p1
%build
autoreconf -fi
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%configure --disable-static
make
%install
%makeinstall
# Install bash completion script
install -D -m0644 contrib/bash/gdesklets %{buildroot}%{_sysconfdir}/bash_completion.d/gdesklets
%suse_update_desktop_file -r %{buildroot}%{_datadir}/applications/gdesklets.desktop System Applet
%suse_update_desktop_file %{buildroot}%{_sysconfdir}/xdg/autostart/gdesklets.desktop
# 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
%{_sysconfdir}/xdg/autostart/gdesklets.desktop
%{_bindir}/gdesklets
%{_libdir}/gdesklets/
%doc %{_mandir}/man1/gdesklets.*
%{_datadir}/applications/gdesklets.desktop
%{_datadir}/icons/hicolor/48x48/mimetypes/*.png
%{_datadir}/mime/packages/gdesklets.xml
%{_datadir}/pixmaps/gdesklets.png
%files lang -f gdesklets.lang
%changelog