Sophie

Sophie

distrib > Mandriva > 2008.0 > x86_64 > by-pkgid > 8078bb3f36788bcff6c6ae17ed5042ab > files > 3

ggz-grubby-0.0.14-2mdv2008.0.src.rpm

%define version 0.0.14
%define release %mkrel 2

%define libggz_version %{version}
%define ggz_client_libs_version %{version}
%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:		%name-0.0.9-check-perl.patch
BuildRequires:	popt-devel
BuildRequires:	expat-devel
BuildRequires:	perl-devel
BuildRequires:	python-devel
BuildRequires:	ruby-devel
BuildRequires:	libggz-devel = %{libggz_version}
BuildRequires:	ggz-client-libs-devel = %{ggz_client_libs_version}
Requires(pre):	libggz = %{libggz_version}
Requires(pre):	ggz-client-libs = %{ggz_client_libs_version}


%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

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

%build
%configure --with-libggz-libraries=%{_libdir} --with-ggzmod-libraries=%{_libdir} --with-ggzcore-libraries=%{_libdir}
%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
* Fri Aug 31 2007 Emmanuel Andry <eandry@mandriva.org> 0.0.14-2mdv2008.0
+ Revision: 77190
- change old prereq to Requires(pre)


* Sun Feb 11 2007 Emmanuel Andry <eandry@mandriva.org> 0.0.14-1mdv2007.0
+ Revision: 118828
- New version 0.0.14
- bunzip2 patch
- Import ggz-grubby

* Sun Sep 03 2006 Emmanuel Andry <eandry@mandriva.org> 0.0.13-2mdv2007.0
- fix x86_64 build

* Mon May 22 2006 Emmanuel Andry <eandry@mandriva.org> 0.0.13-1mdk
- 0.0.13
- mkrel
- drop patch 1 and 2

* Sat May 21 2005 Buchan Milne <bgmilne@linux-mandrake.com> 0.0.9-2mdk
- Rebuild for new libperl.so

* 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