%define version @VERSION@
%define name gtkyahoo 
%define shared %{_prefix}/share/%{name}

Summary: GTK Yahoo! Messenger client
Name: %{name}
Version: %{version}
Release: %{release}
Copyright: GPL
Group: Networking/Chat
Source: http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Requires: gtk+ >= 1.2.1
Url: http://%{name}.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-buildroot
Prefix: %{_prefix}

%description
This is GTKYahoo, a GPL'd GTK Yahoo! Messenger client. has a number of
features not available in the Windows or Java versions of the pager,
including an auto-reply (answering machine) feature and automatic forwarding 
of incoming messages via email. 

This software has been developed without the assistance, consent, or
support of Yahoo! Inc. 

They are not to be contacted regarding this product.

No guarantees are provided that this product will continue to function if
they change the protocol. 

It is written and maintained by Nathan Neulinger <nneul@users.sourceforge.net>
and Craig Emery <ranec@users.sourceforge.net> If you have any questions about
this RPM package please send them to the %{name} mailing list.
Info is available from the %{name} web page.

%prep
%setup

%build
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" 
./configure --prefix=%{_prefix} --with-debug
make
strip %{name}

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_prefix}/{bin,libexec,share/gtkyahoo/sounds,share/pixmaps}
install -m 755 %{name} $RPM_BUILD_ROOT%{_prefix}/bin/%{name}
install -m 755 %{name}-sound-handler $RPM_BUILD_ROOT%{_prefix}/libexec/%{name}-sound-handler
install -m 644 images/%{name}-icon.xpm $RPM_BUILD_ROOT%{_prefix}/share/pixmaps/%{name}-icon.xpm
install -m 644 sample.gtkyahoorc $RPM_BUILD_ROOT%{shared}/sample.gtkyahoorc
install -m 644 simple.gtkyahoorc $RPM_BUILD_ROOT%{shared}/simple.gtkyahoorc
install -m 644 sounds/*.au $RPM_BUILD_ROOT%{shared}/sounds/

mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{desktop_place}
install -m 644 %{name}.desktop $RPM_BUILD_ROOT%{_prefix}/%{desktop_place}/%{name}.desktop

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog INSTALL NEWS README TODO NOTES DISCLAIMER
%{prefix}/bin/%{name}

%{prefix}/share/pixmaps/*

%dir %{shared}
%{shared}/sample.gtkyahoorc
%{shared}/simple.gtkyahoorc

%{prefix}/libexec/gtkyahoo-sound-handler

%dir %{shared}/sounds
%{shared}/sounds/*

%{_prefix}/%{desktop_place}/%{name}.desktop

%changelog
* Wed May 16 2001 Craig Emery <ranec@users.sourceforge.net>
- Added both Gnome and Ximian code and changed version for signing
- Also split the .spec file up

* Wed May 16 2001 Craig Emery <ranec@users.sourceforge.net> 1
- Updated some fields for SourceForge

* Thu Apr 20 2000 Troels Liebe Bentsen <tlb@iname.com> 1mdk
- Upgraded to new version and added sound and menu entry.

* Sun Apr 09 2000 Troels Liebe Bentsen <tlb@iname.com> 1mdk
- First spec file for Mandrake distribution.
