File pokerth.spec of Package pokerth

# spec file for package pokerth
# Copyright (c) 2014 SUSE LINUX Products 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

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

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.

%setup -q -n PokerTH-%{version}-src
%patch0 -p1
%patch1 -p1
# fix permission of ChangeLog
chmod a-x ChangeLog COPYING
# convert dos files to unix files
dos2unix docs/server_setup_howto.txt

qmake -makefile QMAKE_CFLAGS="%optflags" QMAKE_CXXFLAGS="%optflags"
make %{?_smp_mflags}

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

%defattr(-, root, root)
%dir %{_datadir}/%{name}
%doc ChangeLog COPYING TODO


%files server
%defattr(-, root, root)
%doc ChangeLog COPYING TODO docs/server_setup_howto.txt