File gcolor2.spec of Package gcolor2

Name:		    gcolor2
Version:	    0.4
Release:	    18
Summary:	    Simple color selector
Group:		    Graphics
License:	    GPLv2+
URL:		    http://gcolor2.sourceforge.net/
Source0:	    http://prdownloads.sourceforge.net/gcolor2/%{name}-%{version}.tar.bz2
Source1:	    gcolor2-pofiles.tar.bz2
Patch0:		    %{name}-%{version}.patch
BuildRoot:	    %{_tmppath}/%{name}-%{version}
BuildRequires:	gtk2-devel
BuildRequires:	ImageMagick perl(XML::Parser)
BuildRequires:	intltool
%if 0%{?fedora} >= 15
BuildRequires:	sane-backends-libs
%endif
%if 0%{?suse_version} >= 1220
BuildRequires:  autoconf automake libtool
%endif

%define iconsdir %{_datadir}/icons/hicolor

%description 
Gcolor2 is a GTK2 color selector to provide a quick and easy way to find
colors for whatever task is at hand. Colors can be saved and deleted as well.

%prep
%setup -q -a1
%patch0 -p1

%build
echo "gcolor2.glade" >> po/POTFILES.in
autoreconf -fiv
intltoolize --force

%configure
#languages not detected
pushd po
sed -i s/"ALL_LINGUAS ="/"ALL_LINGUAS = `ls *.po | cut -d. -f1 | xargs`"/"" Makefile
popd

%{__make}

%install
rm -rf %{buildroot}
%makeinstall

# Menu
%{__mkdir_p} %{buildroot}%{_datadir}/applications
cat > %{buildroot}%{_datadir}/applications/%{name}.desktop << EOF
[Desktop Entry]
X-SuSE-translate=true
Encoding=UTF-8
Type=Application
Exec=%{_bindir}/%{name}
Icon=%{name}
Categories=GNOME;GTK;Utility;X-SuSE-DesktopUtility;
Name=Color Chooser
GenericName=Color Chooser
Comment=GTK2 color chooser
EOF

#icons
%{__mkdir_p} %{buildroot}%{iconsdir}/{16x16,32x32,48x48}/apps
convert -size 48x48 pixmaps/icon.png %{buildroot}%{iconsdir}/48x48/apps/%{name}.png
convert -size 32x32 pixmaps/icon.png %{buildroot}%{iconsdir}/32x32/apps/%{name}.png
convert -size 16x16 pixmaps/icon.png %{buildroot}%{iconsdir}/16x16/apps/%{name}.png

%find_lang %{name}

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog NEWS README
%{_bindir}/*
%{_datadir}/*


%changelog
* Sun Mar 27 2011 Agnelo de la Crotche <agnelo@unixversal.com>
- package for openSUSE 11.3/11.4
 
* Fri Sep 11 2009 Thierry Vignaud <tvignaud@mandriva.com> 0.4-18mdv2010.0
+ Revision: 437658
- rebuild

* Thu Mar 26 2009 Emmanuel Andry <eandry@mandriva.org> 0.4-17mdv2009.1
+ Revision: 361427
- provide .po files in a compressed archive
  Davy Defaud <davy.defaud@free.fr>
    - add missing Polish po file and Bulgarian menu entries
    - really fix non gettextized strings with P2
    - drop P0 and provide French as a po file like others
    - automate the list of available languages to build

* Sun Mar 22 2009 Emmanuel Andry <eandry@mandriva.org> 0.4-16mdv2009.1
+ Revision: 360345
- add more translations

* Wed Mar 18 2009 Emmanuel Andry <eandry@mandriva.org> 0.4-15mdv2009.1
+ Revision: 357364
- add more translations
- fix non gettextized strings with P2

* Sat Mar 14 2009 Emmanuel Andry <eandry@mandriva.org> 0.4-14mdv2009.1
+ Revision: 354978
- add more translations

* Thu Mar 12 2009 Emmanuel Andry <eandry@mandriva.org> 0.4-13mdv2009.1
+ Revision: 354359
- added another bunch of translations

* Thu Mar 12 2009 Emmanuel Andry <eandry@mandriva.org> 0.4-12mdv2009.1
+ Revision: 354299
- add turkish translation?\195

* Wed Mar 11 2009 Emmanuel Andry <eandry@mandriva.org> 0.4-11mdv2009.1
+ Revision: 353772
- add spanish translation

* Wed Mar 11 2009 Emmanuel Andry <eandry@mandriva.org> 0.4-10mdv2009.1
+ Revision: 353571
- update french language patch
- make it visible for kde users

* Tue Mar 10 2009 Emmanuel Andry <eandry@mandriva.org> 0.4-9mdv2009.1
+ Revision: 353498
- fix again desktop file

* Tue Mar 10 2009 Emmanuel Andry <eandry@mandriva.org> 0.4-8mdv2009.1
+ Revision: 353485
- fix license
- fix desktop categories
- improve desktop file (Davy Defaud)
- uncompress patch
- localization never applied : use intltoolize and autoreconf
- workaround undetected language file by intltoolize

* Sun Mar 08 2009 Emmanuel Andry <eandry@mandriva.org> 0.4-6mdv2009.1
+ Revision: 352937
- add gentoo patch to fix crash on x86_64 (#47608)

  + Oden Eriksson <oeriksson@mandriva.com>
    - lowercase ImageMagick

* Thu Jul 24 2008 Thierry Vignaud <tvignaud@mandriva.com> 0.4-5mdv2009.0
+ Revision: 245710
- rebuild

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

* Mon Mar 10 2008 Nicolas L├ęcureuil <neoclust@mandriva.org> 0.4-3mdv2008.1
+ Revision: 183224
- Fix Desktop file

* Sun Feb 24 2008 Nicolas L├ęcureuil <neoclust@mandriva.org> 0.4-2mdv2008.1
+ Revision: 174139
- Fix desktop file (Bug #38093)

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

  + Thierry Vignaud <tvignaud@mandriva.com>
    - fix auto conversion

* Mon Dec 17 2007 Thierry Vignaud <tvignaud@mandriva.com> 0.4-1mdv2008.1
+ Revision: 131549
- auto-convert XDG menu entry
- BR perl(XML::Parser)
- kill re-definition of %%buildroot on Pixel's request
- import gcolor2


* Sat Apr 15 2006 Austin Acton <austin@mandriva.org> 0.4-1mdk
- work with spec from Davy Defaud <davy.defaud@free.fr>