File smoothlife.spec of Package smoothlife

Summary:          A generalization of Conway's Game of Life
Name:             smoothlife
Version:          004
Release:          1
License:          GPLv2
Group:		  Amusements/Games
Source: {version}.zip
Source1:	  %{name}.desktop
Source2:	  %{name}.png
Source3:	  Courier.ttf
BuildRequires:    gcc-c++, mesa-libGL-devel, mesa-libGLU-devel, GLee-devel, SDL-devel, SDL_ttf-devel

Conway's Game of Life is generalized to a continuous domain. OpenGL and GLSL
shaders are used for real-time 2D and 3D graphics. Time stepping is done via
a real to complex FFT based convolution operation.

%setup -q -n SmoothLifeAll
sed -i '/wglSwapIntervalEXT/d' */main.cpp

cd SmoothLifeSDL
g++ %{optflags} -I/usr/include/GL -lGL -lGLU -lGLee -lSDL -lSDL_ttf main.cpp -o SmoothLife

install -Dm644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
install -Dm644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}.png
mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}
cp -a readme.txt SmoothLife/SmoothLifeConfig.txt SmoothLife/shaders %{SOURCE3} $RPM_BUILD_ROOT%{_libdir}/%{name}
install -m755 SmoothLifeSDL/SmoothLife $RPM_BUILD_ROOT%{_libdir}/%{name}
mkdir -p $RPM_BUILD_ROOT%{_bindir}
cat <<EOF > $RPM_BUILD_ROOT%{_bindir}/%{name}
cd %{_libdir}/%{name}
exec ./SmoothLife


%attr(755,root,root) %{_bindir}/%{name}

* Wed May 16 2018 Huaren Zhong <> 004
- Rebuild for Fedora