Sophie

Sophie

distrib > Mandriva > current > i586 > by-pkgid > 9f07097a384db445016db910d3266357 > files > 4

screenlets-0.1.2-3mdv2010.0.src.rpm

%define name screenlets
%define version 0.1.2
%define release %mkrel 3

Name: %name
Version: %version
Release: %release
License: GPL
URL: http://www.screenlets.org/
Summary: Widget mini-apps (like OSX Dashboard or Vista Gadgets)
Group: System/X11
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Source: %name-%version.tar.bz2
Patch0: fix-dotdesktop.patch
Source1: logo24.png
BuildRequires: python-devel
BuildRequires: desktop-file-utils
Buildarch: noarch
Requires(post): desktop-file-utils
Requires(postun): desktop-file-utils
Requires: pyxdg
Requires: dbus-python
Requires: gnome-python-desktop

%description
Screenlets are small owner-drawn applications (written in Python) 
that can be described as "the virtual representation of things 
lying/standing around on your desk". Sticknotes, clocks, rulers, ... 
the possibilities are endless

Screenlets work best with the Widget plugin for Compiz Fusion.

%prep
%setup -qn %{name}
%patch0 -p0 -b .desktop
# Fix paths
grep -rl '/usr/local' * | xargs sed -i 's,/usr/local,%{_prefix},g'
# Fix dodgy desktop files
find -name *.desktop -exec sed -i 's/^\(Exec=.*\) >.*$/\1/' {} \;

%build
%{__python} setup.py build

%install
rm -rf %{buildroot}
%{__python} setup.py install --root %{buildroot}
# Remove useless egg-info file
rm -f %{buildroot}%{py_puresitedir}/*.egg-info

install -d %{buildroot}%{_datadir}/%{name}
install -m0644 %{SOURCE1} %{buildroot}%{_datadir}/%{name}/logo24.png

install -d %{buildroot}%{_datadir}/icons
install -m0644 desktop-menu/screenlets.svg %{buildroot}%{_datadir}/icons/screenlets.svg

desktop-file-install \
  --vendor="" \
  --add-category="Settings" \
  --add-category="DesktopSettings" \
  --add-category="X-MandrivaLinux-CrossDesktop" \
  --dir %{buildroot}%{_datadir}/applications \
  desktop-menu/%{name}-manager.desktop

echo "Icon=%{_datadir}/%{name}/logo24.png" >>desktop-menu/%{name}-daemon.desktop
desktop-file-install \
  --vendor="" \
  --add-category="Settings" \
  --add-category="DesktopSettings" \
  --add-category="X-MandrivaLinux-CrossDesktop" \
  --dir %{buildroot}%{_datadir}/applications \
  desktop-menu/%{name}-daemon.desktop

%find_lang %name %name %name-manager

%if %mdkversion < 200900
%post
%update_menus
%{update_desktop_database}
%endif

%if %mdkversion < 200900
%postun
%clean_menus
%{clean_desktop_database}
%endif

%clean
rm -rf %{buildroot}

%files -f %name.lang
%defattr(-, root, root, 0755)
%doc CHANGELOG README TODO
%{_bindir}/*
%{_datadir}/applications/%{name}-*.desktop
%{_datadir}/%{name}
%{_datadir}/%{name}-manager
%{_datadir}/icons/%{name}.svg
%{py_puresitedir}/screenlets/*


%changelog
* Sun Sep 20 2009 Thierry Vignaud <tvignaud@mandriva.com> 0.1.2-3mdv2010.0
+ Revision: 445090
- rebuild

* Sun Dec 28 2008 Funda Wang <fundawang@mandriva.org> 0.1.2-2mdv2009.1
+ Revision: 320367
- rediff patch
- rebuild for new python

* Sun Jul 06 2008 Funda Wang <fundawang@mandriva.org> 0.1.2-1mdv2009.0
+ Revision: 232203
- New version 0.1.2
- should be noarch package

  + Pixel <pixel@mandriva.com>
    - rpm filetriggers deprecates update_menus/update_scrollkeeper/update_mime_database/update_icon_cache/update_desktop_database/post_install_gconf_schemas

* Sun Mar 16 2008 Funda Wang <fundawang@mandriva.org> 0.0.12-2mdv2008.1
+ Revision: 188159
- drop gtk1 and gnome1 dependencies

* Sat Mar 08 2008 Colin Guthrie <cguthrie@mandriva.org> 0.0.12-1mdv2008.1
+ Revision: 182109
- New version 0.0.12

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill re-definition of %%buildroot on Pixel's request

* Mon Oct 29 2007 Colin Guthrie <cguthrie@mandriva.org> 0.0.10-3mdv2008.1
+ Revision: 103321
- Fix #34987 - fix .desktop files to include Type=Application

* Wed Oct 17 2007 Colin Guthrie <cguthrie@mandriva.org> 0.0.10-2mdv2008.1
+ Revision: 99546
- Add missing dep - thanks to Doucet Franck for pointing it out

* Wed Sep 12 2007 Colin Guthrie <cguthrie@mandriva.org> 0.0.10-1mdv2008.0
+ Revision: 84590
- New Upstream Version 0.0.10
- Remove patches in favour of greps, seds and finds
- Install .desktop files


* Fri Mar 23 2007 Sébastien Savarin <plouf@mandriva.org> 0.0.7-1mdv2007.1
+ Revision: 148296
- add forgoten sources + add tray
- fix python dbus.proxy issue

  + Colin Guthrie <cguthrie@mandriva.org>
    - Import screenlets