twind/twind.spec

88 lines
2.8 KiB
RPMSpec

#
# spec file for package twind
#
# 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 http://bugs.opensuse.org/
#
Name: twind
Version: 1.1.0
Release: 0
Summary: Match and remove all of the blocks before time runs out
License: GPL-2.0
Group: Amusements/Games/Arcade/LogicGame
Url: http://twind.sourceforge.net/
Source0: %{name}-%{version}.tar.gz
Source1: %{name}.desktop
Source2: %{name}-rpmlintrc
# Correct bad code
Patch0: twind-1.1.0.twind.c.patch
%if 0%{?suse_version}
BuildRequires: fdupes
BuildRequires: update-desktop-files
%endif
BuildRequires: pkgconfig(SDL_image)
BuildRequires: pkgconfig(SDL_mixer)
BuildRequires: pkgconfig(sdl)
%description
The object of the game is to remove all of the blocks from the screen
before the time runs out. Two blocks are removed at a time,
and must be of the same color. After completing a level,
you will be rewarded with a bonus point for every tick left on the clock.
For each level thereafter, the time to complete the the level will be shorter.
%prep
%setup -q
%patch0
# Correct Path and Highscore
sed -i -e 's|chown |true |g' \
-e 's|local/share/games/twind|share/twind|' \
-e 's|/var/lib/games/twind/|%{_localstatedir}/games/twindistress/|' \
Makefile
%build
make %{?_smp_mflags}
%install
mkdir -p %{buildroot}%{_bindir}
make install BIN_PREFIX=%{buildroot}%{_bindir}/ \
DATA_PREFIX=%{buildroot}%{_datadir}/%{name}/ \
HIGH_SCORE_PREFIX=%{buildroot}%{_localstatedir}/games/twindistress/
# install icon
install -Dm 0644 graphics/%{name}.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
# install Desktop file
install -Dm 0644 %{S:1} %{buildroot}%{_datadir}/applications/%{name}.desktop
%if 0%{?suse_version}
%suse_update_desktop_file %{name}
%fdupes -s %{buildroot}%{_prefix}
%endif
%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING CREDITS ChangeLog NEWS README
%attr(0755,root,games) %{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/%{name}
%attr(0775,root,games) %{_localstatedir}/games/twindistress
# Correct Permissions
%attr(0664,root,games) %{_localstatedir}/games/twindistress/*
%changelog