Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 3e7e4d58b8c57658f93a00fd5c476e86 > files > 5

ggz-grubby-0.0.9-1mdk.src.rpm

%define version 0.0.9
%define release 1mdk

%define libggz_version 0.0.9
%define ggz_client_libs_version 0.0.9

%define games_list chess ttt

Name:		ggz-grubby
Summary:	GGZ Gaming Zone - Grubby, the chat bot
Version:	%{version}
Release:	%{release}
License:	GPL
Group:		Games/Other
URL:		http://www.ggzgamingzone.org/
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot

Source0:	http://ftp.ggzgamingzone.org/pub/ggz/%{version}/%{name}-%{version}.tar.bz2
# (Abel) 0.0.9-1mdk fix libperl detection
Patch0:		ggz-grubby-0.0.9-check-perl.patch.bz2
# (Abel) 0.0.9-1mdk check for python 2.4 too
Patch1:		ggz-grubby-0.0.9-check-python.patch.bz2
# (Abel) 0.0.9-1mdk modules shouldn't include version
Patch2:		ggz-grubby-0.0.9-module-noversion.patch.bz2

Buildrequires:	popt-devel
Buildrequires:	expat-devel
BuildRequires:	perl-devel
BuildRequires:	python-devel
BuildRequires:	libggz-devel = %{libggz_version}
BuildRequires:	ggz-client-libs-devel = %{ggz_client_libs_version}
BuildRequires:	automake1.7
Prereq:		libggz = %{libggz_version}
Prereq:		ggz-client-libs = %{ggz_client_libs_version}
# ruby only includes shared library after 1.8.0-7mdk
BuildRequires:	ruby-devel >= 1.8.0-7mdk

%description
This package contains grubby, a chatbot for GGZ Gaming Zone. It's
a single binary, but it is very flexible and extensible by plugins
and scripts.

Grubby is intended to be used on servers so it doesn't miss players,
but it is in fact a client program. It reads all necessary startup
information from your home folder and runs as long as it isn't shut
down by its owner. See the Setup file to view a common setup, or
generate one using grubby-config.

%package	embed
Summary:	Scripting functionality for Grubby, the GGZ Gaming Zone chat bot
Group:		Games/Other
Requires:	%{name} = %{version}-%{release}

%description	embed
This package contains module and scripts for grubby, the chatbot
for GGZ Gaming Zone. Please install this package if you want grubby
to support perl, python and ruby scripting.

%prep
%setup -q
%patch0 -p1 -b .check-perl
%patch1 -p1 -b .check-python
%patch2 -p1 -b .module-noversion

# Needed for patches
libtoolize -c -f
ACLOCAL=aclocal-1.7 AUTOMAKE=automake-1.7 autoreconf --force --install

%build
%configure2_5x
%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 games/guru-$i/module.dsc %{buildroot}%{_datadir}/ggz/ggz-config/guru-$i.dsc
done

%find_lang grubby

# remove unneeded files
rm -f %{buildroot}%{_libdir}/grubby/{,core}modules/*.{a,la}

%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/guru-$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/guru-$i.dsc
    done
  fi
fi

%files -f grubby.lang
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README

%{_bindir}/*
%{_datadir}/ggz/ggz-config/*.dsc
%{_libdir}/ggz/*
%{_libdir}/grubby
%exclude %{_libdir}/grubby/modules/libgurumod_embed.so

%{_mandir}/man?/*
%lang(de) %{_mandir}/de/man?/*

%files embed
%defattr(-,root,root)
%{_libdir}/grubby/modules/libgurumod_embed.so
%{_datadir}/grubby

%changelog
* Sat Dec 04 2004 Abel Cheung <deaddog@mandrake.org> 0.0.9-1mdk
- New version
- Remove unnecessary python/perl version checks bcz rpm already
  include sane requirements
- Regen patches
- Split scripting module into subpackage

* Sun Sep  7 2003 Abel Cheung <deaddog@deaddog.org> 0.0.7-1mdk
- 0.0.7
- Merged so called -devel package back into main package, they are
  not for development at all
- BuildRequires and Requires redone
- WARN: This package does not build ruby binding at all because ruby
  package doesn't build any shared library

* Tue Apr 29 2003 Lenny Cartier <lenny@mandrakesoft.com> 0.0.6-3mdk
- buildrequires

* Mon Mar 17 2003 Lenny Cartier <lenny@mandrakesoft.com> 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