LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File pokerth.spec of Package pokerth (Project home:susnux:branches:games)

#
# spec file for package pokerth
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           pokerth
Version:        1.1.1
Release:        0
Summary:        Multi-Player "Texas Hold'em" Poker Game
License:        GPL-2.0
Group:          Amusements/Games/Board/Card
Url:            http://www.pokerth.net/
Source0:        http://downloads.sourceforge.net/pokerth/PokerTH-%{version}-src.tar.bz2
#Source1:        %{name}.desktop
Patch0:         pokerth-disable_no_dead_strip_inits_and_terms.patch
Patch1:         pokerth-change_path_libircclient_h.patch
Patch2:         fix-newer-gcc.patch
BuildRequires:  SDL_mixer-devel
BuildRequires:  boost-devel
BuildRequires:  dos2unix
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  glib2-devel
BuildRequires:  gnutls-devel
BuildRequires:  libbz2-devel
BuildRequires:  libcurl-devel
BuildRequires:  libgcrypt-devel
BuildRequires:  libgnutls-openssl-devel
BuildRequires:  libgsasl-devel
BuildRequires:  libicu-devel
BuildRequires:  libircclient-devel
BuildRequires:  libqt4-devel
BuildRequires:  protobuf-devel
BuildRequires:  sqlite3-devel
BuildRequires:  tinyxml-devel
BuildRequires:  update-desktop-files
BuildRequires:  xorg-x11-devel
BuildRequires:  zlib-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
PokerTH is a poker game written in C++/QT4. You can play the popular "Texas Hold'em" poker variant
against up to nine computer-opponents or play network games with people all over the world.
This poker engine is available for Linux, Windows, and MacOSX.

%package -n %{name}-server
Summary:        Multi-Player "Texas Hold'em" Poker Game
Group:          Amusements/Games/Board/Card

%description -n %{name}-server
Dedicated server for PokerTH. Run 'pokerth_server' to start the server,
and use a terminal window. You don't have to, if you want to run game on
a PokerTH server in the internet.

%prep
%setup -q -n PokerTH-%{version}-src
%patch0 -p1
%patch1 -p1
%patch2 -p1

# fix permission of ChangeLog
chmod a-x ChangeLog COPYING
# convert dos files to unix files
dos2unix docs/server_setup_howto.txt

%build
qmake -makefile  pokerth.pro QMAKE_CFLAGS="%{optflags}" QMAKE_CXXFLAGS="%{optflags}"
make %{?_smp_mflags}

%install
make INSTALL_ROOT=%{buildroot} install
mkdir -p %{buildroot}/%{_datadir}/pixmaps
install -m 644 pokerth.png %{buildroot}/%{_datadir}/pixmaps
%suse_update_desktop_file -i %{name} Game CardGame
mkdir -p %{buildroot}/%{_bindir}
install -m 755 %{name} %{buildroot}/%{_bindir}
install -m 755 bin/%{name}_server %{buildroot}/%{_bindir}/%{name}_server
# Remove duplicate file with fdupes
%fdupes -s %{buildroot}/%{_datadir}

%files
%defattr(-, root, root)
%{_bindir}/%{name}
%dir %{_datadir}/%{name}
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop
%doc ChangeLog COPYING TODO

%defattr(644,root,root)
%{_datadir}/%{name}/*

%files server
%defattr(-, root, root)
%{_bindir}/%{name}_server
%doc ChangeLog COPYING TODO docs/server_setup_howto.txt

%changelog