Sophie

Sophie

distrib > Mandriva > 2007.1 > x86_64 > by-pkgid > 4f8fc27d8e566c5a4cc14ae44ceef6db > files > 4

poker-network-1.0.35-1mdv2007.1.src.rpm

Name:           poker-network
Version:        1.0.35
Release:        %mkrel 1
Epoch:          0
Summary:        A poker server, client and abstract user interface library
Group:          Development/Python
License:        GPL
URL:            http://pokersource.org/poker-network/
Source0:        http://download.gna.org/pokersource/sources/%{name}-%{version}.tar.gz
Source1:        poker-network-server.init
Patch0:         poker-network-no-nusoap.patch
Requires(post): desktop-file-utils
Requires(postun): desktop-file-utils
Requires:       python
Requires:       python-libxml2
Requires:       python-libxslt
Requires:       python-gobject
Requires:       gnome-python
Requires:       python-twisted
Requires:       python-mysql
Requires:       python-OpenSSL
Requires:       python-soap
Requires:       rsync
Requires:       pygame
Requires:       pygtk2.0
Requires:       pygtk2.0-libglade
Requires:       python-pokerclient2d = %{epoch}:%{version}-%{release}
Requires:       python-pokernetwork = %{epoch}:%{version}-%{release}
Requires:       python-pokerui = %{epoch}:%{version}-%{release}
Requires:       poker-engine
Requires:       wget
BuildRequires:  desktop-file-utils
BuildRequires:  pkgconfig
BuildRequires:  python-devel
BuildRequires:  pypoker-eval-devel
BuildRequires:  python-twisted
BuildRequires:  python-mysql
BuildRequires:  python-OpenSSL
BuildRequires:  python-soap
BuildRequires:  rsync
BuildRequires:  glib2-devel
BuildRequires:  libglade2.0-devel
BuildRequires:  python-gobject
BuildRequires:  gnome-python
BuildRequires:  poker-engine-devel
BuildRequires:  pygame
BuildRequires:  pygtk2.0
BuildRequires:  pygtk2.0-libglade
BuildRequires:  python-libxml2
BuildRequires:  python-libxslt
BuildRoot:      %{_tmppath}/%{name}-%{epoch}:%{version}-%{release}-root

%description
poker-network includes a poker server, a client library, an abstract
user interface library and a client based on it.

The server deals the cards and checks the user actions using a poker
game engine (poker-engine). It listens on a TCP/IP port and
understands a poker-network specific protocol. The persistent
informations (accounts, hand history etc.) are stored in a MySQL
database. The server was designed and tested to gracefully handle 1000
simultaneous players on a single machine also running the MySQL
server.

The client library implements the poker-network protocol for
the client. It runs a poker-engine identical to the one used by
the server and uses it to simplify the implementation of a client.
For instance it creates an event indicating that the player lost
position although the server does not send such a packet. A simple
minded bot is provided as an example usage of the client library.

The abstract user interface library provides a framework based on the
client library and suited to implement a user friendly client. A
display is fed with events such as give seat S to player P or get
amount A from side pot P to player P so that the rendering part of the
user interface does not need to maintain contextual game
information. A toolkit is fed with high level interaction actions such
as ask login and password or display the following holdem tables. An
animation module is fed with events that can trigger animations or
sounds such as player P timeouted or player P wins the pot.

The client based on the user interface library uses GTK.

%package -n python-pokerclient2d
Summary:        Poker client 2D  library
Group:          Development/Python

%description -n python-pokerclient2d
This package contains files for the poker client 2D library.

%package -n python-pokerclient2d-devel
Summary:        Poker client 2D library development files
Group:          Development/Python
Provides:       %{name}-devel = %{epoch}:%{version}-%{release}
Requires:       %{name} = %{epoch}:%{version}-%{release}

%description -n python-pokerclient2d-devel
This package contains files required to build applications that use
poker-network.

%package -n python-pokernetwork
Summary:        Poker network library
Group:          Development/Python

%description -n python-pokernetwork
This package contains files for the poker network library.

%package -n python-pokerui
Summary:        Poker UI library
Group:          Development/Python

%description -n python-pokerui
This package contains files for the poker UI library.

%package server
Summary:        Poker server
Group:          System/Servers
Requires:       %{name} = %{epoch}:%{version}-%{release}
Requires(post): mysqlserver
Requires(post): rpm-helper
Requires(preun): rpm-helper

%description server
The poker-network server.

%package -n poker-web
Summary:        Poker web
Group:          System/Servers
Requires:       %{name}-server = %{epoch}:%{version}-%{release}
Requires:       apache
Requires:       nusoap
Requires:       php-mysql
Requires(post): rpm-helper
Requires(postun): rpm-helper

%description -n poker-web
The poker-network web site.

%prep
%setup -q
%patch0 -p1

%build
export POKERCONFIGUPGRADE=%{_sbindir}/pokerconfigupgrade
%{configure2_5x} --disable-static 
#                --with-poker-server-host=%HOST% \
#                --with-poker-database=%DATABASE% \
#                --with-poker-dbhost=%DBHOST% \
#                --with-poker-dbuser=%USER% \
#                --with-poker-dbuser-password=%PASS%
%{make}

%install
%{__rm} -rf %{buildroot}
%{__rm} -f pokerweb/pages/nusoap.php
%{makeinstall_std}
(cd %{buildroot}%{_datadir} && %{__ln_s} %{_datadir}/poker-network/poker2d poker2d)

%{__mkdir_p} %{buildroot}%{_initrddir}
%{__cp} -a %{SOURCE1} %{buildroot}%{_initrddir}/poker-network-server
%{__perl} -pi -e 's|\@PYTHON_SITELIB\@|%{python_sitelib}|g;' \
              -e 's|\@PYTHON_SITEARCH\@|%{python_sitearch}|g' \
  %{buildroot}%{_initrddir}/poker-network-server

%{__mkdir_p} %{buildroot}%{_datadir}/poker-web
%{__cp} -a pokerweb/pages/* %{buildroot}%{_datadir}/poker-web
%{__rm} -f %{buildroot}%{_datadir}/poker-web/.htaccess
%{__perl} -p -e 's|\r$||g;' \
             -e 's|\@POKER_SERVER_HOST\@|localhost|;' \
  pokerweb/conf/constants.php.in > %{buildroot}%{_datadir}/poker-web/constants.php

# apache configuration
%{__mkdir_p} %{buildroot}%{_webappconfdir}
%{__cat} > %{buildroot}%{_webappconfdir}/poker-web.conf <<EOF
# poker-web configuration

Alias /poker-web %{_datadir}/poker-web

<Directory %{_datadir}/poker-web>
    Allow from all
</Directory>
EOF

%{__perl} -pi -e 's|/usr/bin/wget wget|%{_bindir}/wget|g;' \
              -e 's|poker-web-test|poker-web|g;' \
  %{buildroot}%{_sysconfdir}/poker-network/poker.bot.xml  

%{_bindir}/desktop-file-install --vendor="" \
  --remove-category="Application" \
  --add-category="X-MandrivaLinux-MoreApplications-Games-Cards" \
  --dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/python-poker2d.desktop

%{__rm} %{buildroot}%{_datadir}/locale/fr/LC_MESSAGES/poker2d.mo

%clean
%{__rm} -rf %{buildroot}

%post
%{update_desktop_database}
#%%update_icon_cache hicolor

%postun
%{clean_desktop_database}
#%%clean_icon_cache hicolor

%post server
%_post_service poker-network
if ! %{_bindir}/mysql -h localhost -u root pokernetwork < /dev/null > /dev/null 2>&1; then
        (%{_bindir}/mysqladmin -h localhost -u root create pokernetwork
        %{_bindir}/mysql -h localhost -u root pokernetwork < /usr/share/poker-network/schema.sql
        %{_bindir}/mysql -h localhost -u root -e "insert into user (Host, User, Password, Select_priv, Insert_priv, Update_priv, Delete_priv) values ('localhost', 'pokernetwork', password('pokernetwork'), 'Y', 'Y', 'Y', 'Y')" mysql || /bin/true
        %{_bindir}/mysqladmin -h localhost -u root reload || :) > /dev/null 2>&1
fi

%preun server
%_preun_service poker-network

%post -n poker-web
%{_post_webapp}

%postun -n poker-web
%{_postun_webapp}

%files
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/poker-network/*
%{_exec_prefix}/games/poker2d
%{_libdir}/%{name}
%{_sbindir}/*
%{_datadir}/applications/python-poker2d.desktop
%{_datadir}/apps/khotkeys/poker2d.khotkeys
%{_datadir}/poker-network/poker2d
%{_datadir}/poker-network/conf
%{_datadir}/poker-network/upgrades
%{_datadir}/poker2d
%{_datadir}/pixmaps/poker2D-16.xpm
%{_datadir}/pixmaps/poker2D.xpm
%{_mandir}/man?/*

%files -n python-pokerclient2d
%{python_sitelib}/pokerclient2d
%{python_sitearch}/_pokerinterface*.so*

%files -n python-pokernetwork
%{python_sitelib}/pokernetwork

%files -n python-pokerclient2d-devel
%defattr(-,root,root,-)
%{_libdir}/pkgconfig/%{name}.pc
%{python_sitearch}/_pokerinterface*.la

%files -n python-pokerui
%{python_sitelib}/pokerui

%files server
%defattr(-,root,root,-)
%attr(0755,root,root) %{_initrddir}/*
%{_datadir}/poker-network/*.sql

%files -n poker-web
%defattr(-,root,root,-)
%{_datadir}/poker-web
%dir %{_sysconfdir}/poker-web
%config(noreplace) %{_sysconfdir}/poker-web/apache.conf
%config(noreplace) %{_sysconfdir}/poker-web/htaccess
%config(noreplace) %{_webappconfdir}/poker-web.conf


%changelog
* Wed Feb 14 2007 David Walluck <walluck@mandriva.org> 1.0.35-1mdv2007.0
+ Revision: 121137
- 1.0.35

* Wed Jan 24 2007 David Walluck <walluck@mandriva.org> 0:1.0.34-1mdv2007.1
+ Revision: 113029
- 1.0.34

* Thu Jan 11 2007 David Walluck <walluck@mandriva.org> 0:1.0.33-1mdv2007.1
+ Revision: 107649
- fix build
- 1.0.33

* Wed Jan 03 2007 David Walluck <walluck@mandriva.org> 0:1.0.32-4mdv2007.1
+ Revision: 103890
- use relative include path

* Tue Jan 02 2007 David Walluck <walluck@mandriva.org> 0:1.0.32-3mdv2007.1
+ Revision: 103047
- patch to remove internal nusoap
- fix nusoap dependency
  better initscript
  remove .htaccess file

* Wed Dec 13 2006 David Walluck <walluck@mandriva.org> 0:1.0.32-1mdv2007.1
+ Revision: 96083
- 1.0.32

* Sat Oct 21 2006 David Walluck <walluck@mandriva.org> 0:1.0.28-2mdv2007.1
+ Revision: 71611
- mow uses sitelib instead of sitearch
- 1.0.28
- (Build)Requires: pygtk2.0-libglade
- add requires for glade
- 1.0.26
- Import poker-network



* Sun Sep 10 2006 David Walluck <walluck@mandriva.org> 0:1.0.24-5mdv2007.0
- really fix pokerbot

* Sun Sep 10 2006 David Walluck <walluck@mandriva.org> 0:1.0.24-4mdv2007.0
- fix pokerbot
- own directories

* Sat Sep 09 2006 David Walluck <walluck@mandriva.org> 0:1.0.24-3mdv2007.0
- add poker-web package

* Sat Sep 09 2006 David Walluck <walluck@mandriva.org> 0:1.0.24-2mdv2007.0
- fix location of pokerbot.py in initscript

* Fri Sep 08 2006 David Walluck <walluck@mandriva.org> 0:1.0.24-1mdv2007.0
- - 1.0.24

* Mon Sep 04 2006 David Walluck <walluck@mandriva.org> 0:1.0.23-2mdv2007.0
- (Build)Requires: pygtk2.0

* Sat Sep 02 2006 David Walluck <walluck@mandriva.org> 0:1.0.23-1mdv2007.0
- release

* Mon Aug 21 2006 Loic Dachary <loic at gnu.org> - 1.0.23-1
- upstream sync

* Tue Jul 25 2006 Loic Dachary <loic at gnu.org> - 1.0.22-1
- upstream sync

* Wed Jun 14 2006 Loic Dachary <loic at gnu.org> - 1.0.21-1
- upstream sync

* Sun May 21 2006 Loic Dachary <loic at gnu.org> - 1.0.20-1
- upstream sync

* Sat Apr 22 2006 Loic Dachary <loic at gnu.org> - 1.0.19-1
- upstream sync

* Thu Mar 30 2006 Loic Dachary <loic at gnu.org> - 1.0.18-1
- upstream sync

* Sat Mar 25 2006 Loic Dachary <loic@gnu.org> - 1.0.17
- server split, init.d, create database

* Fri Mar 17 2006 Christopher Stone <chris.stone@gmail.com> 1.0.14-1
- Initial RPM release