LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File kbang.spec of Package kbang (Project games)

#
# spec file for package kbang
#
# Copyright (c) 2013 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 http://bugs.opensuse.org/
#


Name:           kbang
Version:        0.1.3
Release:        0
Summary:        Open source implementation of the popular card game Bang!
License:        GPL-2.0+
Group:          Amusements/Games/Board/Card
Url:            http://code.google.com/p/kbang/
Source0:        http://kbang.googlecode.com/files/%{name}-%{version}-src.tar.bz2
# wget -O user-manual.html http://code.google.com/p/kbang/wiki/UserManual
Source1:        user-manual.html
# wget -O kbang.png http://code.google.com/p/kbang/logo?logo_id=1244471642
Source2:        kbang.png
Source3:        kbang.desktop
BuildRequires:  gcc-c++
BuildRequires:  qt-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif

%description
KBang is an open source implementation of the popular card game Bang!. It is
developed in C++ with Qt4 library and supports MS Windows, Linux and Mac OS X.

%prep
%setup -q -n %{name}-%{version}-src
sed -i 's|"gfx/|"%{_datadir}/%{name}/gfx/|g' ./src/client/card.cpp
cp %{SOURCE1} .

%build
qmake kbang.pro
make %{?_smp_mflags}

%install
mkdir -p %{buildroot}%{_bindir}
cp kbang-* %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_datadir}/%{name}
cp -ar gfx %{buildroot}%{_datadir}/%{name}
install -D -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/pixmaps/kbang.png
install -D -m 0644 %{SOURCE3} %{buildroot}%{_datadir}/applications/kbang.desktop
%if 0%{?suse_version}
%suse_update_desktop_file %{name}
%endif

%files
%defattr(-,root,root)
%doc COPYING user-manual.html
%{_bindir}/*
%{_datadir}/applications/kbang.desktop
%{_datadir}/pixmaps/kbang.png
%{_datadir}/%{name}/

%changelog