File tuxtype.spec of Package tuxtype

#
# spec file for package tuxtype 
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#

# norootforbuild

Name:           tuxtype
Summary:        Typing tutor for children
Url:            http://alioth.debian.org/projects/tux4kids/
%define         realname tuxtype_w_fonts
License:        GNU General Public License (GPL) v2, Open Font License v1.1, free (BSD-like) license
Group:          Amusements/Games/Action/Other
Version:        1.5.17
Release:        1
Vendor:         openSUSE-Education
Source:         %realname-%version.tar.bz2
Source1:        tuxtype-rpmlintrc
Source2:        tuxtype.desktop
Patch0:         tuxtype_w_fonts-1.5.17-printf.patch
Patch1:         tuxtype_w_fonts-1.5.17-uninitialized_variables.patch
Patch2:         tuxtype-1.5.17-german_keyboard.patch
Patch3:         tuxtype-1.5.17-german_language.patch
Patch4:         tuxtype-1.5.17-no-return-in-nonvoid-function.patch
BuildRequires:  SDL-devel SDL_image-devel SDL_mixer-devel dialog gcc-c++ SDL_Pango-devel gtk-devel
%if 0%{?suse_version} < 1010
BuildRequires:  SDL_ttf
%else
BuildRequires:  SDL_ttf-devel
%endif
BuildRequires:  ImageMagick 
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif
%if 0%{?suse_version} > 1020
BuildRequires:  fdupes
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Tux Typing is an educational typing tutor game starring Tux, the Linux
penguin.

In Fish Cascade you control Tux as he searches for fish to eat. Fish fall
from the top of the screen. These fish have letters on them.  Unforunately
for Tux, eating a fish with a letter on it will cause his stomach to
become ill, so it is up to you to help Tux eat fish!  By typing the
letters, it will cause them to disappear so tux can chow down on the
fish.

In Comet Zap you control Tux as he defends the cities from comets.  To
protect a city from a comet, type the letter on the comet and it will
cause Tux to destroy it with a laser! (In case you wondered, Comet Zap
is an adaptation of the *great* math drill game, "Tux, of Math Command").

"Lessons" and "Practice" are additional typing activities that we have
not yet completed. You will find other menu entries for planned features
that still need to be implemented.

Authors:
--------
    David Bruce <dbruce@tampabay.rr.com>
    Jesse Andrews <jdandr2@uky.edu>
    Calvin Arndt <calarndt@tux4kids.org>
    Sam Hart <hart@geekcomix.com>  --- Sam started it all with TuxType 1!!!
    Jacob Greig <bombastic@firstlinux.net>
    Sreyas Kurumanghat <k.sreyas@gmail.com>
    Sreerenj Balachandran <bsreerenj@gmail.com>
    Vimal Ravi <vimal_ravi@rediff.com>
    Prince K. Antony <prince.kantony@gmail.com>
    Mobin Mohan <mobinmohan@gmail.com>


%prep
%setup -q -n %realname-%version
%patch0 -p1
%patch1
%patch2 -p1
%patch3 -p1
%patch4 -p1

%build
## autoreconf --force --install
%configure --docdir="%{_defaultdocdir}/%{name}"
make %{?jobs:-j %jobs}

%install
%if 0%{?suse_version} < 1030
for i in $(find . -name Makefile ); do
    sed -i "s#MKDIR_P#mkdir_p#g" $i
done
%endif
%makeinstall
# remove unneeded data
rm -rf %buildroot/usr/doc/tuxtype
rm -rf %buildroot%_datadir/tuxtype/{autorun.inf,OFL.txt}
# install desktop file and icon
install -Dm644 %{SOURCE2} %buildroot%_datadir/applications/%name.desktop
mkdir -p %buildroot%_datadir/pixmaps
convert -scale 48x48 %name.ico %buildroot%_datadir/pixmaps/%name.png
rm -rf %buildroot%_datadir/tuxtype/*.ico
%if 0%{?suse_version}
%suse_update_desktop_file %name Game KidsGame
%endif
# save some discspace using symlinks
%if %suse_version > 1020
%fdupes -s %buildroot
%endif

%clean
rm -rf %buildroot

%files
%defattr(-,root,root)
%doc README AUTHORS COPYING ChangeLog OFL.txt TODO 
%doc tuxtype/docs/en/*.html
%doc tuxtype/data/sounds/README_SOUNDS.TXT
%doc tuxtype/data/images/README_IMAGES.TXT
%{_bindir}/tuxtype
%dir %_datadir/tuxtype
%dir %_datadir/tuxtype/data
%_datadir/tuxtype/data/*
%_datadir/applications/%name.desktop
%_datadir/pixmaps/%name.png

%changelog
openSUSE Build Service is sponsored by