Files
twind/twind.spec
Matthias Mailänder a3ef238f9c Accepting request 253999 from home:nemysis
- Change %fdupes
- Use %{name}.desktop instead of Desktop Entry in spec
- Use %{name}-rpmlintrc instead of Patch1
- Remove not needed mkdir -p
- Use pkgconfig instead of pkgconfig(sdl)
- Change sed, cosmetical changes
- Correct Path, Highscore and Permissions, that more users can
  use same Highscore with own Results
- Use $CURRENT_YEAR
- Remove chmod g-s and use %attr(0755,root,games) %{_bindir}/%{name}
- Use %{_datadir}/%{name} instead of %{_datadir}/%{name}/*

- Add descriptions for patches
- Reordering BuildRequires, added pkgconfig(sdl)
- Add sed, /usr/bin/twind: Operation not permitted
- Simplify installation handling
- Add localstatedir
- Fix Desktop file and rpmlint only say
  no-manual-page-for-binary twind which not exist
- Add twind-1.1.0.twind.c.patch in spec
- Add forgotten twind-1.1.0.COPYING.patch to twind.spec
- Initial package creation
- Use mine first FreeBSD port games/twind for patch, new created with Quilt

  twind-1.1.0.twind.c.patch
- Add twind-1.1.0.COPYING.patch, correct Address
- Add Desktop file and icon
- Use %%fdupes macro to reduce size of the package

OBS-URL: https://build.opensuse.org/request/show/253999
OBS-URL: https://build.opensuse.org/package/show/games/twind?expand=0&rev=1
2014-10-05 12:11:01 +00:00

87 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
# Correct bad code
Patch0: twind-1.1.0.twind.c.patch
BuildRequires: desktop-file-utils
BuildRequires: update-desktop-files
BuildRequires: fdupes
BuildRequires: pkgconfig
BuildRequires: SDL-devel
BuildRequires: libSDL_image-devel
BuildRequires: libSDL_mixer-devel
%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
#configure
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
%suse_update_desktop_file %{name}
%fdupes -s %{buildroot}%{_prefix}
%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