Sophie

Sophie

distrib > Mageia > 5 > x86_64 > by-pkgid > 6b425960b4a4572bd7476218816fe18d > files > 3

golly-2.4-10.mga5.src.rpm

Name:		golly
Version:	2.4
Release:	%mkrel 10
Summary:	Cellular automata simulator (includes Conway's Game of Life)
Group:		Sciences/Mathematics
# The license for the code is GPLv2+
# The license for the Life Lexicon is CC-BY-SA (see Source1)
License:	GPLv2+ and CC-BY-SA
URL:		http://golly.sourceforge.net/

Source0:	http://downloads.sourceforge.net/%{name}/%{name}-%{version}-src.tar.gz
# The following is the official web page for the Life Lexicon included
# in the Golly distribution. We included it here because currently
# none of the actual files comprising the Life Lexicon have been
# updated to include the license notice. When a future upstream
# release includes the appropriate license notice, we can remove
# Source1 from this spec.
Source1:	http://www.argentum.freeserve.co.uk/lex_home.htm

# patch to use %{_datadir}/%{name} for supplied files, rather than current dir
Patch0:		golly-appdir.patch

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

%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 .appdir

cp %{SOURCE1} .

# 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
# Add lpthread since this is necessary for wxperl
%make \
	CXXFLAGS="%{optflags} -DGOLLYDIR=\"%{_datadir}/%{name}\"" \
	ZLIB_LDFLAGS="-lz -lpthread" \
	LDFLAGS="%{ldflags}" \
	-f makefile-gtk
convert appicon48.ico golly.png
cat <<EOF >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

# 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

%files
%{_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
%doc lex_home.htm

%files devel
%{_datadir}/%{name}/Rules/TableGenerators/
%{_datadir}/%{name}/Rules/TreeGenerators/




%changelog
* Wed Oct 15 2014 umeabot <umeabot> 2.4-10.mga5
+ Revision: 747827
- Second Mageia 5 Mass Rebuild

* Sat Sep 27 2014 tv <tv> 2.4-9.mga5
+ Revision: 730851
- rebuild for new perl

* Tue Sep 16 2014 umeabot <umeabot> 2.4-8.mga5
+ Revision: 679882
- Mageia 5 Mass Rebuild

* Wed Jun 04 2014 fwang <fwang> 2.4-7.mga5
+ Revision: 632745
- rebuild for new gtop

* Wed Feb 05 2014 fwang <fwang> 2.4-6.mga5
+ Revision: 583523
- try build with wxgtk 3.0

* Wed Feb 05 2014 fwang <fwang> 2.4-5.mga5
+ Revision: 583136
- use ldflags

* Sat Oct 19 2013 umeabot <umeabot> 2.4-4.mga5
+ Revision: 532865
- Mageia 4 Mass Rebuild

* Fri Aug 23 2013 fwang <fwang> 2.4-3.mga4
+ Revision: 469978
- rebuild for new perl

* Sun Jun 09 2013 joequant <joequant> 2.4-2.mga4
+ Revision: 441282
- add lpthread
- spec file cleanup
- imported package golly


* Tue Apr  5 2011 Eric Smith <eric@brouhaha.com> 2.2-2
- Include HTML file from official Life Lexicon web page giving CC-BY-SA
  license notice.

* Mon Dec 13 2010 Eric Smith <eric@brouhaha.com> 2.2-1
- Updated to latest upstream release, several patches no longer necessary

* Wed Jun  2 2010 Eric Smith <eric@brouhaha.com> 2.1-7
- Fixed space/tab rpmlint complaint about spec

* Tue Jun  1 2010 Terje Rosten <terje.rosten@> 2.1-6
- Add patch to let golly locate libperl.so 

* Mon May 31 2010 Eric Smith <eric@brouhaha.com> 2.1-5
- Added patch to use Perl 5.10.1

* Wed May 12 2010 Eric Smith <eric@brouhaha.com> 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 <eric@brouhaha.com> 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 <eric@brouhaha.com> 2.1-2
- Changed appdir patch to use arg defined by makefile

* Sat May  8 2010 Eric Smith <eric@brouhaha.com> 2.1-1
- Initial version