Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 41fa1a09a36a0f802729a7a2af53cea7 > files > 5

ggz-txt-client-0.0.9-2mdk.src.rpm

%define version 0.0.9
%define release 2mdk

%define libggz_version 0.0.9
%define ggz_client_libs_version 0.0.9

%define games_list tttxt

Name:		ggz-txt-client
Summary:	GGZ Text Mode Client
Version:	%{version}
Release:	%{release}
License:	GPL
Group:		Games/Other
URL:		http://ggzgamingzone.org/
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot

Source0:	http://ftp.ggzgamingzone.org/pub/ggz/%{version}/%{name}-%{version}.tar.bz2
Source1:	ggz-txt-client-README.mdk
Patch0:		%{name}-0.0.7-readline.patch.bz2
Patch1:		%{name}-0.0.9-destdir.patch.bz2

BuildRequires:	libggz-devel = %{libggz_version}
BuildRequires:	ggz-client-libs-devel = %{ggz_client_libs_version}
BuildRequires:	readline-devel
BuildRequires:	ncurses-devel
BuildRequires:	automake1.7
Requires:	libggz = %{libggz_version}
Requires:	ggz-client-libs = %{ggz_client_libs_version}
# (Abel) 0.0.9-1mdk don't need game modules, the only game module
# supporting txt client is also bundled here

%description
The official GGZ Gaming Zone client for text mode, suitable for
environment where no graphical desktop is available.

It also includes the following text mode GGZ game(s):
    TicTacToe

%prep
%setup -q
%patch0 -p1 -b .readline
%patch1 -p1 -b .destdir

cp %{SOURCE1} README.mdk

# needed by patch0
AUTOMAKE=automake-1.7 ACLOCAL=aclocal-1.7 autoreconf --force --install

%build
%configure2_5x --bindir=%{_gamesbindir}
%make

%install
rm -rf %{buildroot}
%makeinstall_std

rm %{buildroot}%{_sysconfdir}/ggz.modules
rmdir %{buildroot}%{_sysconfdir}

# Get a copy of all of our .dsc files
mkdir -p %{buildroot}%{_datadir}/ggz/ggz-config
for i in %games_list; do
  install -m 0644 $i/module.dsc %{buildroot}%{_datadir}/ggz/ggz-config/txt-$i.dsc
done

%find_lang ggz-txt

%clean
rm -rf %{buildroot}

%post
# Run ggz-config vs. all installed games
if [ -f %{_sysconfdir}/ggz.modules ]; then
  for i in %games_list; do
    ggz-config --install --modfile=%{_datadir}/ggz/ggz-config/txt-$i.dsc --force
  done
fi

%preun
# Run ggz-config to uninstall all the games
if [ "$1" = "0" ]; then
  if [ -f %{_sysconfdir}/ggz.modules ]; then
    for i in %games_list; do
      ggz-config --remove --modfile=%{_datadir}/ggz/ggz-config/txt-$i.dsc
    done
  fi
fi

%files -f ggz-txt.lang
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog INSTALL NEWS README README.GGZ README.mdk TODO QuickStart.GGZ
%{_gamesbindir}/ggz-txt
%{_mandir}/man?/*
%{_libdir}/ggz/*
%{_datadir}/ggz/ggz-config/*.dsc

%changelog
* Tue Feb 08 2005 Abel Cheung <deaddog@mandrake.org> 0.0.9-2mdk
- rebuild against new readline

* Sat Nov 27 2004 Abel Cheung <deaddog@mandrake.org> 0.0.9-1mdk
- New version
- P1: Temporary hack to fix DESTDIR support in older gettext
- Now it includes a tictactoe game module (Doh)
- Include README to tell people how to connect to server.
  (fail to find any document about text client so far) But don't expect
  too much, I can't input any text into the only one available game 

* Sat Sep  6 2003 Abel Cheung <deaddog@deaddog.org> 0.0.7-1mdk
- 0.0.7
- Patch0: Hack to fix readline linkage
- configure2_5x, makeinstall_std

* Mon Mar 17 2003 Lenny Cartier <lenny@mandrakesoft.xom> 0.0.6-2mdk
- from andi payn <payn@myrealbox.com> :
	- complete the Mandrakization process

* Fri Jan 19 2003 Andi Payn <payn@myrealbox.net>
- Initial specification file