File tuxtype.spec of Package tuxtype

## - process with configure to substitute in PACKAGE
## VERSION strings
# 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
Obsoletes:      tuxtype_preview < 1.8.0
Provides:       tuxtype_preview = 1.8.0
Summary:        Typing tutor for children
%define         realname tuxtype_w_fonts
%define         progname tuxtype
License:        GNU General Public License (GPL) v2
Group:          Amusements/Teaching/Language
Version:        1.8.1
Release:        1
Vendor:         openSUSE-Education
Source:         %{realname}-%version.tar.bz2
Source1:        %{name}-rpmlintrc
# PATCH-FIX-OPENSUSE: chown does not work in build enviroment - disable it
Patch0:         tuxtype_w_fonts-1.8.1-install.patch
BuildRequires:  SDL_image-devel >= 1.2.2
#BuildRequires:  SDL_ttf-devel > 2.0.8
BuildRequires:  SDL-devel
BuildRequires:  SDL_mixer-devel
#BuildRequires:  SDL_net-devel
BuildRequires:  SDL_Pango-devel
#BuildRequires:  librsvg2-devel
BuildRequires:  ImageMagick

%if 0%{?suse_version}
BuildRequires:  update-desktop-files  
BuildRequires:  fdupes

%if 0%{?fedora_version}  
BuildRequires:  desktop-file-utils

%if 0%{?mandriva_version}  
BuildRequires:  desktop-file-utils
Requires(post): desktop-file-utils
Requires(postun): desktop-file-utils
%if 0%{?mandriva_version} >= 2009
BuildRequires: pulseaudio-esound-compat

BuildRoot:      %{_tmppath}/%{progname}-%{version}-build

Tux Typing is an educational typing tutor game starring Tux, the Linux
penguin. It is designed to be entertaining for children, but can be used
by all ages to improve typing skills. Tux Typing includes two video game-style activities that give practice typing individual characters and words.  There
is also a phrase typing activity that provides practice with phrases and sentences, with on-screen display of accuracy and typing speed.

Tux Typing supports all commonly used desktop platforms, and is packaged with translation files and word lists for many (human) languages. The program is capable of displaying essentially the entire Unicode character set.

    Current maintainer and programming lead:
    David Bruce <>

    Jesse Andrews <>
    Calvin Arndt <>
    Sam Hart <>  --- Sam started it all with TuxType 1!!!
    Jacob Greig <>
    Sreyas Kurumanghat <>
    Sreerenj Balachandran <>
    Vimal Ravi <>
    Prince K. Antony <>
    Mobin Mohan <>

# prep section: ---------------------------------------------------------

%setup -q -n %realname-%version
%patch0 -p1
rm -rf $(find . -type d -name CVS)
rm -rf $(find . -type d -name .svn)
rm -rf $(find . -type d -name .xvpics)

# build section: ---------------------------------------------------------

%configure --disable-rpath \
           --prefix=%_prefix \
           --localstatedir=%_localstatedir/lib \
           --sysconfdir=%_sysconfdir \
make %{?jobs:-j %jobs}

# install section: ---------------------------------------------------------

install -d %buildroot/%_bindir
install -d %buildroot/%_datadir/pixmaps
install -d %buildroot/%_datadir/applications
install -d %buildroot/%_datadir/%progname
install -d %buildroot/%_defaultdocdir/%progname

make DESTDIR=%{buildroot} install
install -m 644 data/images/icons/icon.png %buildroot%_datadir/pixmaps/%progname.png

%if 0%{?suse_version}
# handle special docdir path
mv %buildroot/%_datadir/doc/%progname/* %buildroot/%_defaultdocdir/%progname/
rm -rf %buildroot/%_datadir/doc/%progname
# install desktop file
%suse_update_desktop_file -i %progname Education Languages
%fdupes -s %buildroot
%if 0%{?fedora_version}
# install desktop file
desktop-file-install --vendor="%{vendor}" \
  --dir=%buildroot/%_datadir/applications \
%if 0%{?mandriva_version}
desktop-file-install --vendor="%{vendor}" \
  --dir=%buildroot/%_datadir/applications \
# remove invalid locale directories
rm -rf %buildroot/%{_datadir}/locale/en@*
%find_lang %progname

%if 0%{?mandriva_version}


rm -rf %buildroot

# files section: ---------------------------------------------------------

%files -f %progname.lang

%doc %_defaultdocdir/%progname
%attr(755, root, root) %_localstatedir/lib/%progname
%attr(755, root, root) %_localstatedir/lib/%progname/words
%attr(755, root, root) %_sysconfdir/%progname
%if 0%{?suse_version} <= 01120