Blob Blame History Raw
Name: crossfire-client
Version: 1.10.0
Release: 2%{?dist}
Summary: Client for connecting to crossfire servers
Group: Amusements/Games
License: GPL
URL: http://crossfire.real-time.com
Source0: http://downloads.sourceforge.net/crossfire/%{name}-%{version}.tar.gz
BuildRequires: SDL-devel SDL_image-devel
BuildRequires: gtk+-devel gtk2-devel libpng-devel
BuildRequires: desktop-file-utils ImageMagick
# Disabled sound for Fedora until it's working again
#BuildRequires: alsa-lib-devel
Requires: crossfire-client-images
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%description
Crossfire is a graphical role-playing adventure game with
characteristics reminiscent of rogue, nethack, omega, and gauntlet. 
It has multiplayer capability and presently runs under X11.

Client for playing the new client/server based version of Crossfire.
This package allows you to connect to crossfire servers around the world.
You do not need install the crossfire program in order to use this
package.

%prep
%setup -q

for size in 48x48 32x32 16x16 ; do 
    convert -transparent white pixmaps/${size}.png temp.png
    mv temp.png pixmaps/${size}.png
done

%build
chmod 755 configure
# Disable sound for Fedora until it's working again.
%configure \
        --disable-sound \
        --disable-dmalloc

make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps
install -d $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
install -d $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
install -d $RPM_BUILD_ROOT%{_datadir}/icons/locolor/16x16/apps
install -d $RPM_BUILD_ROOT%{_datadir}/icons/locolor/32x32/apps
install -d $RPM_BUILD_ROOT%{_datadir}/icons/locolor/48x48/apps

%makeinstall mandir=$RPM_BUILD_ROOT%{_mandir}

install -m 644 pixmaps/16x16.png \
	$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps/crossfire-client.png
install -m 644 pixmaps/32x32.png \
	$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps/crossfire-client.png
install -m 644 pixmaps/48x48.png \
	$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/crossfire-client.png
install -m 644 pixmaps/16x16.png \
	$RPM_BUILD_ROOT%{_datadir}/icons/locolor/16x16/apps/crossfire-client.png
install -m 644 pixmaps/32x32.png \
	$RPM_BUILD_ROOT%{_datadir}/icons/locolor/32x32/apps/crossfire-client.png
install -m 644 pixmaps/48x48.png \
	$RPM_BUILD_ROOT%{_datadir}/icons/locolor/48x48/apps/crossfire-client.png

sed -i -e 's/^Name=.*/Name=Crossfire/' gtk/crossfire-client.desktop
desktop-file-install --vendor fedora                            \
        --dir ${RPM_BUILD_ROOT}%{_datadir}/applications         \
        --add-category Game                                     \
        --add-category RolePlaying                              \
        gtk/crossfire-client.desktop

%clean
rm -rf $RPM_BUILD_ROOT

%post
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%postun
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%files
%defattr(-,root,root,-)
%{_bindir}/cfclient
%{_bindir}/gcfclient
%{_bindir}/gcfclient2
# Sound support is too broken to use in Fedora right now.
#%{_bindir}/cfsndserv
#%{_bindir}/cfsndserv_alsa9
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/16x16/apps/%{name}.png
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
%{_datadir}/icons/locolor/16x16/apps/%{name}.png
%{_datadir}/icons/locolor/32x32/apps/%{name}.png
%{_datadir}/icons/locolor/48x48/apps/%{name}.png
%{_mandir}/man6/gcfclient.6*
%{_mandir}/man6/cfclient.6*
%doc ChangeLog COPYING License NOTES README TODO


%changelog
* Wed Jul 17 2007 Wart <wart@kobold.org> 1.10.0-2
- Remove unused data directory

* Sat Mar 3 2007 Wart <wart@kobold.org> 1.10.0-1
- Update to 1.10.0

* Sat Mar 3 2007 Wart <wart@kobold.org> 1.9.1-3
- Use more precise desktop file categories
- Use better sourceforge download url
- Added dependency on crossfire-client-images so that the default
  install doesn't look so ugly.

* Thu Aug 31 2006 Wart <wart@kobold.org> 1.9.1-2
- Rebuild for Fedora extras
- Add transparency to desktop icon backgrounds

* Thu Jul 6 2006 Wart <wart@kobold.org> 1.9.1-1
- Update to 1.9.1

* Fri May 9 2006 Wart <wart@kobold.org> 1.9.0-3
- Create and own the directory for client sounds and images

* Thu Mar 9 2006 Wart <wart@kobold.org> 1.9.0-2
- Initial spec file following Fedora Extras conventions