%global weak 22 %global date 20141007 %global rev 8244 %global source %{name}-%{version}svn%{rev} Name: paintown Version: 3.6.0 Release: 0.1%{?dist} Summary: Side-scrolling, action packed and fighting beatem-up game Group: Amusements/Games ##BSD 2-clause, BSD 3-clause, Apache v2, GPLv2+, LGPLv2+, LGPLv2.1+ License: BSD and GPLv2+ and LGPLv2+ URL: http://paintown.sf.net/ ##Make source tarball from svn with $ ./%{name}-svn-tarball.sh %{rev} Source0: %{source}.tar.xz Source1: %{name}-svn-tarball.sh BuildRequires: cmake scons BuildRequires: SDL-devel libpng-devel freetype-devel zlib-devel BuildRequires: python-devel BuildRequires: libvorbis-devel libogg-devel BuildRequires: ant java-devel BuildRequires: dos2unix BuildRequires: desktop-file-utils ##rpmfusion stuff is not allowed #BuildRequires: libmpg123-devel libmad-devel ##java-headless may be insufficient for editor Requires: java Requires: %{name}-data = %{version}-%{release} %if 0%{?fedora} >= %{weak} Suggests: %{name}-editor %endif %description If you are looking for a side-scrolling, action packed game like you used to play or if you are looking for an extensible engine to write your own game, look no further. Paintown supports user created content through a mod system and user defined functionality through scripting. Features - BSD License - Low CPU and GPU requirements - Network play - Dynamic lighting - Joystick support - mod/s3m/xm/it/mp3/ogg music modules - Scripting with python - M.U.G.E.N engine - Ports to many systems %package data Summary: Data files for the game %{name} Requires: %{name} = %{version}-%{release} BuildArch: noarch %description data Data files for the game %{name}: Players, Sounds, Graphics, Tools etc. %package editor Summary: Editor for the game %{name} Requires: %{name} = %{version}-%{release} BuildArch: noarch %description editor The paintown editor allows you to create new levels but does not allow creation of new animations for characters. There is a separate program for that - the 'test' executable. %prep %setup -qn %{source} %build mkdir build ; pushd build ; %cmake .. popd ; make %{?_smp_mflags} cd editor && ant || true ##TODO manual needs scribble from racket-lang #cd ../doc/manual ; make main.pdf %install #%make_install ./install.sh -d %{buildroot}%{_datadir}/%{name} -b %{buildroot}%{_bindir} cd %{buildroot} install -t .%{_datadir}/%{name} %{_builddir}/%{buildsubdir}/editor/editor.jar install -d .%{_defaultdocdir}/%{name} #FIXME install -t .%{_defaultdocdir}/%{name} doc/*. doc/changelog.txt #FIXME install -t .%{_datadir}/%{name} tools ##tune filesystem FILES=`find . -type f` chmod 0644 $FILES sed -i 's|%{buildroot}||g' $FILES ##FIXME sed -i 's/\r$//' breaks archives etc. -> better use dos2unix find $FILES -not -executable |xargs dos2unix ##executables #mv .%{_datadir}/%{name}-* .%{_datadir}/%{name} #mv .%{_bindir}/games/%{name} .%{_bindir}/%{name} sed -i -e '1i#!/usr/bin/sh' .%{_bindir}/%{name} mv .%{_datadir}/%{name}/%{name}-bin .%{_bindir}/%{name}-bin sed -i 's|%{_datadir}/%{name}/%{name}-bin|%{_bindir}/%{name}-bin|g' \ .%{_bindir}/%{name} #ln -s ../../bin/%{name}-bin .%{_datadir}/%{name}/%{name}-bin chmod a+x .%{_bindir}/* ##icons and desktop install -d .%{_datadir}/icons/hicolor/256x256 install -m0644 %{_builddir}/%{buildsubdir}/misc/logo-256x256.png \ .%{_datadir}/icons/hicolor/256x256/%{name}.png install -d .%{_datadir}/icons/hicolor/scalable/apps install -m0644 -t .%{_datadir}/icons/hicolor/scalable/apps \ %{_builddir}/%{buildsubdir}/misc/*.svg install -d .%{_datadir}/pixmaps install -m0644 -t .%{_datadir}/pixmaps \ %{_builddir}/%{buildsubdir}/data/menu/%{name}.png desktop-file-install --mode=0644 --dir=.%{_datadir}/applications \ %{_builddir}/%{buildsubdir}/misc/*.desktop %files %{_bindir}/* %{_datadir}/icons/hicolor/*/*.png %{_datadir}/icons/hicolor/scalable/apps/*.svg %{_datadir}/pixmaps/*.png %{_datadir}/applications/*.desktop %doc LEGAL LICENSE README TODO scripting.txt #%{_defaultdocdir}/%{name}/ #%doc doc/manual/main.pdf %files data %{_datadir}/%{name}/data/ #%{_datadir}/%{name}/tools/ %files editor %{_datadir}/%{name}/editor.jar %changelog * Tue Oct 07 2014 Raphael Groner - 3.6.0-0.1 - initial