%define version @CPACK_PACKAGE_VERSION_MAJOR@.@CPACK_PACKAGE_VERSION_MINOR@
%define release @CPACK_PACKAGE_VERSION_PATCH@

Name: @PROJECT_NAME@
Version: %{version}
Release: %{release}
License: GPL
Group: Amusements/Games/Action/Arcade

URL: http://blinkensisters.sourceforge.net
Packager: Wolfgang Dautermann <dauti@oeh.tu-graz.ac.at>

# source + patches
Source: @CPACK_SOURCE_PACKAGE_FILE_NAME@.tar.gz


BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
BuildRequires: cmake

%define srcdirname %{name}-%{version}
%define builddirname %{_tmppath}/%{name}.build

Summary: BlinkenSisters - Hunt for the Lost Pixels

%description
Blinkensisters is a new Parallax-style 2D scrolling gaming 
system for Windows, MacOSX, Linux and POSIX-compatible 
Unix-Systems (every platform that can run SDL). 
You can even make your own levels with a simple text-editor...

%prep -n%{name}-%{version}

%setup -q -n %{srcdirname}

%build
rm -rf %{builddirname}
mkdir %{builddirname}
cd %{builddirname}
cmake @CMAKE_SOURCE_DIR@ -DCMAKE_INSTALL_PREFIX:PATH=/usr
make


%install
rm -rf %{buildroot}
cd %{builddirname}
%makeinstall



#%pre
#%post
#%preun
#%postun


%clean
rm -rf %{buildroot}
rm -rf %{builddirname}

%files
%defattr(-,root,root,-)
%{_bindir}/*
%{_datadir}/blinkensisters


#/blinkensisters
# FIXME: Probably that absolute path can substitued by something?
#/usr/share/applications/*
#/usr/share/pixmaps/*

# FIXME: %docdir %{_defaultdocdir}/blinkensisters
# should be correct, but then cpack/cmake does not work as it should...
/usr/share/doc/blinkensisters

#%config

%changelog

*  Wed Nov 10 2007 Wolfgang Dautermann <dauti@oeh.tu-graz.ac.at> - 0.5.2-1

- created spec.in file for building RPMs with cmake/cpack

*  Wed Apr 05 2006 Wolfgang Dautermann <dauti@oeh.tu-graz.ac.at> - 0.4-1

- Integrated Menu-entry for Windowmanagers.

*  Sun Mar 12 2006 Wolfgang Dautermann <dauti@oeh.tu-graz.ac.at>

- Updated to 0.3, added documentation.

*  Sun Jan 22 2006 Wolfgang Dautermann <dauti@oeh.tu-graz.ac.at>

- First RPM Build
