# This spec file was generated using Kpp
# If you find any problems with this spec file please report
# the error to ian geiser <geiseri@msoe.edu>

Summary:   A block puzzle game
Name:      kslide
Version:   1.0
Release:   1
Copyright: GPL
Vendor:    Eric Coquelle <coquelle@caramail.com>
Url:       http://perso.wanadoo.fr/coquelle/taquin

Packager:  Eric Coquelle <coquelle@caramail.com>
Group:     Games
Source:    kslide-1.0.tar.gz
BuildRoot: /var/tmp/%{name}-buildroot

%description
Kslide is one of those very simple little games but time consuming ! One has a picture which is split in more or less little squares. Then they are put randomly on the game area. Now, your job is to move the squares to unscramble all of them !

%prep
rm -rf $RPM_BUILD_ROOT

%setup
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" ./configure \
                --prefix=/usr \
                $LOCALFLAGS
%build
# Setup for parallel builds
numprocs=`egrep -c ^cpu[0-9]+ /proc/stat || :`
if [ "$numprocs" = "0" ]; then
  numprocs=1
fi

make -j$numprocs

%install
make install-strip DESTDIR=$RPM_BUILD_ROOT

cd $RPM_BUILD_ROOT
find . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > $RPM_BUILD_DIR/file.list.kslide
find . -type f | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.kslide
find . -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.kslide

%clean
rm -rf $RPM_BUILD_ROOT/*
rm -rf $RPM_BUILD_DIR/kslide
rm -rf ../file.list.kslide


%files -f file.list.kslide
