Blob Blame History Raw
Name: crossfire-client
Version: 1.9.0
Release: 3%{?dist}
Summary: Client for connecting to crossfire servers
Group: Amusements/Games
License: GPL
URL: http://crossfire.real-time.com
Source0: http://dl.sourceforge.net/crossfire/%{name}-%{version}.tar.gz
BuildRequires: SDL-devel SDL_image-devel
BuildRequires: gtk+-devel gtk2-devel libpng-devel
BuildRequires: desktop-file-utils
# Disabled sound for Fedora until it's working again
#BuildRequires: alsa-lib-devel
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

%build
chmod 755 configure
# Disable sound for Fedora until it's working again.
%configure --datadir=%{_datadir}/crossfire \
        --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

desktop-file-install --vendor fedora                            \
        --dir ${RPM_BUILD_ROOT}%{_datadir}/applications         \
        --add-category X-Fedora                                 \
        --add-category Game                                     \
        --add-category Application                              \
        gtk/crossfire-client.desktop

# Create this directory that will be used by the client image and
# sound packages.
mkdir -p $RPM_BUILD_ROOT%{_datadir}/crossfire/%{name}

%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
%dir %{_datadir}/crossfire/%{name}
%{_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
* 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