File rezerwar.spec of Package rezerwar

#
# spec file for package rezerwar
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright Vincent Petry <PVince81@yahoo.fr>
#
# 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:           rezerwar
Version:        0.4.2
Release:        0
Summary:        A big mess of networked blocks and pipes
License:        BSD-2-Clause
Group:          Amusements/Games/Board/Puzzle
Url:            http://tamentis.com/projects/rezerwar/
Source:         http://tamentis.com/projects/rezerwar/files/%{name}-%{version}.tar.gz
Source1:        %{name}.desktop
Source2:        %{name}.png
BuildRequires:  SDL-devel
BuildRequires:  SDL_mixer-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif

%description
rezerwar is a puzzle game that could be quickly described as the illegitimate child of a known tetromino game and the average pipe game.

%prep
%setup -q

TARGET_BIN="%{_bindir}" TARGET_DATA="%{_datadir}/%{name}" TARGET_DOC="%{_docdir}/%{name}" ./configure Linux
sed -i -e "1i CFLAGS += %{optflags}" src/Makefile

%build
make %{?_smp_mflags}
strip src/%{name}

%install
make DESTDIR=%{buildroot} install
install -d -D -m 755 %{buildroot}/%{_datadir}/applications/
install -D -m 644  %{SOURCE1} %{buildroot}/%{_datadir}/applications/
install -d -D -m 755 %{buildroot}/%{_datadir}/pixmaps/
install -D -m 644 %{SOURCE2} %{buildroot}/%{_datadir}/pixmaps/
%if 0%{?suse_version}
%suse_update_desktop_file %{name}
%endif

%files
%defattr(-,root,root,-)
%{_bindir}/%{name}
%dir %{_datadir}/%{name}/
%dir %{_docdir}/%{name}/
%{_docdir}/%{name}/*
%{_datadir}/%{name}/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png

%changelog
openSUSE Build Service is sponsored by