File powder.spec of Package powdertoy

# spec file for package powder
# Copyright (c) 2015 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

Summary:        Physics sandbox game
License:        GPL-2.0+
Group:          Amusements/Games/Other
Name:           powder
Version:        90.2.322
Release:        0
Source1:        %{name}.desktop
# PATCH-FIX-OPENSUSE not to force build arch and to fix arm & ppc builds.
Patch0:         arm_ppc.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  ImageMagick
BuildRequires:  SDL-devel
BuildRequires:  SDL_mixer-devel
BuildRequires:  fftw3-devel
BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  git
BuildRequires:  hicolor-icon-theme
BuildRequires:  libbz2-devel
BuildRequires:  lua51-devel
BuildRequires:  python-devel
BuildRequires:  scons
BuildRequires:  update-desktop-files
BuildRequires:  zlib-devel

The Powder Toy is a free physics sandbox game, which simulates
air pressure and velocity, heat, gravity and a countless number
of interactions between different substances! The game provides
you with various building materials, liquids, gases and electronic
components which can be used to construct complex machines, guns,
bombs, realistic terrains and almost anything else.

%setup -q -n The-Powder-Toy-%{version}
convert resources/powder.ico resources/powder.png

scons --lin --release

%ifarch %ix86
install -D -m 0755 build/powder %{buildroot}%{_bindir}/powder
%ifarch x86_64
install -D -m 0755 build/powder64 %{buildroot}%{_bindir}/powder
install -D -m 0644 resources/powder-0.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/powder.png
install -D -m 0644 resources/powder-1.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/powder.png
install -D -m 0644 resources/powder-2.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/powder.png
install -D -m 0644 resources/powder-3.png %{buildroot}%{_datadir}/icons/hicolor/24x24/apps/powder.png
install -D -m 0644 resources/powder-4.png %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/powder.png

install -D -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/applications/powder.desktop
%suse_update_desktop_file powder

%defattr(-, root, root)

openSUSE Build Service is sponsored by