Name: golly Version: 2.1 Release: 6%{?dist} Summary: Cellular automata simulator (includes Conway's Game of Life) Group: Amusements/Games License: GPLv2+ URL: http://golly.sourceforge.net/ # Standard Sourceforge path doesn't work. :-( Source0: http://downloads.sourceforge.net/%{name}/v%{version}/%{name}-%{version}-src.tar.gz # patch to compile using optflags Patch0: golly-optflags.patch # patch to use %{_datadir}/%{name} for supplied files, rather than current dir Patch1: golly-appdir.patch # patch to use libpython2.6 as default Patch2: golly-2.1-py26.patch # patch to fix python scripting on 64 bits: upstream ref: # http://golly.cvs.sourceforge.net/viewvc/golly/golly/src/wxpython.cpp?r1=1.70&r2=1.71 Patch3: golly-2.1-py-64bit.patch # patch for Perl 5.10.1: # https://sourceforge.net/tracker/?func=detail&atid=743285&aid=3009700&group_id=139354 Patch4: golly-perl5101.patch # patch to let location of libperl.so be passed at buildtime Patch5: golly-2.1-perl.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: wxGTK-devel BuildRequires: perl-devel perl-ExtUtils-Embed BuildRequires: python-devel BuildRequires: ImageMagick BuildRequires: desktop-file-utils # Because we're embedding an path into the binary depend on that path. See: # https://www.redhat.com/archives/fedora-packaging/2008-March/thread.html#00070 # https://www.redhat.com/archives/fedora-devel-list/2008-March/msg00922.html # https://bugzilla.redhat.com/show_bug.cgi?id=590355 %global libperldir %(%{__perl} -MExtUtils::Embed -e ldopts 2> /dev/null | egrep -o '/[^[:space:]]*CORE' | head -1) %if "%{?libperldir}" != "%{nil}" Requires: %{?libperldir}/libperl.so %endif # We're also going to pick up a versioned dependency, to help track things: Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) %description Golly is an open source application for exploring Conway's Game of Life and other cellular automata. Golly supports unbounded universes with up to 256 states. Golly supports multiple algorithms, including Bill Gosper's super fast hashlife algorithm. Many different types of CA are included: John von Neumann's 29-state CA, Wolfram's 1D rules, WireWorld, Generations, Langton's Loops, Paterson's Worms, etc. %package devel Summary: Development files for Golly cellular automata simulator Group: Development/Tools Requires: %{name} = %{version}-%{release} %description devel Development files for Golly celluar automata simulator. %prep %setup -q -n %{name}-%{version}-src %patch -P 0 -p1 -b .optflags %patch -P 1 -p1 -b .appdir %patch -P 2 -p1 -b .py26 %patch -P 3 -p0 -b .py-64bit %patch -P 4 -p1 -b .perl5101 %patch -P 5 -p1 -b .perl-location # remove unnecessary AppleDouble stuff find . -name '._*' -exec rm {} \; find . -name '.DS*' -exec rm {} \; find . -name '.#*' -exec rm {} \; # fix permissions - no normal files should have execute permissions set find . -type f -exec chmod 644 {} \; %build make %{?_smp_mflags} OPTFLAGS="%{optflags} -DGOLLYDIR=\"%{_datadir}/%{name}\"" \ PERL_LIB_DIR='\"%{libperldir}\"' -f makefile-gtk convert appicon48.ico golly.png cat <golly.desktop [Desktop Entry] Name=Golly GenericName=Golly cellular automata simulator Exec=golly Icon=golly Terminal=false Type=Application Categories=GNOME;Game;LogicGame; EOF %install rm -rf %{buildroot} # install binaries install -d %{buildroot}%{_bindir}/ install -m 755 golly bgolly RuleTableToTree %{buildroot}%{_bindir}/ # install data files, but not scripts used only for build for d in bitmaps Help Patterns Rules Scripts do find $d -type d -exec install -d %{buildroot}%{_datadir}/%{name}/{} \; find $d -type f -exec install -m 644 {} %{buildroot}%{_datadir}/%{name}/{} \; done rm %{buildroot}%{_datadir}/%{name}/Help/Lexicon/*.pl # install application icon and desktop file install -D -p -m 644 %{name}.png %{buildroot}%{_datadir}/pixmaps/%{name}.png install -D -p -m 644 %{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %{_bindir}/golly %{_bindir}/bgolly %{_bindir}/RuleTableToTree %{_datadir}/%{name}/ %exclude %{_datadir}/%{name}/Rules/TableGenerators/ %exclude %{_datadir}/%{name}/Rules/TreeGenerators/ %{_datadir}/applications/%{name}.desktop %{_datadir}/pixmaps/%{name}.png %doc README LICENSE %files devel %defattr(-,root,root,-) %{_datadir}/%{name}/Rules/TableGenerators/ %{_datadir}/%{name}/Rules/TreeGenerators/ %changelog * Tue Jun 1 2010 Terje Rosten 2.1-6 - Add patch to let golly locate libperl.so * Mon May 31 2010 Eric Smith 2.1-5 - Added patch to use Perl 5.10.1 * Wed May 12 2010 Eric Smith 2.1-4 - Added patch to use libpython2.6 as default, from Terje Røsten - Included upstream patch for 64-bit issue * Tue May 11 2010 Eric Smith 2.1-3 - Changed optflags patch to remove -O5 - Fixed appdir patch - Consistent use of buildroot var - Fixed directory ownership by using exclude - Removed echo command left over from debugging * Sun May 9 2010 Eric Smith 2.1-2 - Changed appdir patch to use arg defined by makefile * Sat May 8 2010 Eric Smith 2.1-1 - Initial version