SHA256
1
0
forked from pool/golly
golly/golly.spec

146 lines
4.2 KiB
RPMSpec

#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%if 0%{?suse_version} == 1110
%define number 2.2
%else
%define number 2.6
%endif
Name: golly
Version: %{number}
Release: 1
License: GPL-2.0+
Summary: Tool for exploring Game of Life and other automata
Url: http://golly.sourceforge.net/
Group: Amusements/Toys/Graphics
Source: %{name}-%{version}-src.tar.gz
Source1: %{name}.png
Source2: %{name}.desktop
BuildRequires: gcc-c++ cmake
BuildRequires: fdupes
%if 0%{?fedora}
BuildRequires: perl-devel perl-ExtUtils-Embed
%else
BuildRequires: perl update-desktop-files
%endif
BuildRequires: python-devel
%if 0%{?suse_version} == 1110 || 0%{?fedora}
BuildRequires: wxGTK-devel
%else
BuildRequires: wxWidgets-devel
%endif
BuildRequires: zlib-devel
BuildRequires: desktop-file-utils
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Key features:
- Supports both bounded and unbounded universes.
- Supports various topologies (plane, torus, Klein bottle, etc.).
- Supports multi-state universes (cells can have up to 256 states).
- Includes QuickLife, a fast, memory-efficient algorithm.
- Use the HashLife algorithm to see large patterns evolve at huge time scales.
- Supports many different rules, including Wolfram's 1D rules, WireWorld, Generations, and John von Neumann's 29-state CA.
- Use the RuleLoader algorithm to load your own rules.
- Responsive even while generating or garbage collecting.
- Reads RLE, macrocell, Life 1.05/1.06, dblife, and MCell files.
- Can also read common graphic formats: BMP, PNG, GIF, TIFF.
- Can extract patterns, scripts and rules from zip files.
- Download files from online archives.
- Includes a state-of-the-art pattern collection.
- Fast loading of large patterns.
- Paste in patterns from the clipboard.
- Unlimited undo/redo.
- Unbounded zooming out for astronomical patterns.
- Auto fit option keeps a generating pattern within view.
- Full screen option (no menu/status/tool/scroll bars).
- Supports multiple layers, including cloned layers.
- HTML-based help with an integrated Life Lexicon.
- Scriptable via Perl or Python.
- User-configurable keyboard shortcuts.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries/C and C++
License: GPL-2.0+
Requires: %{name} = %{version}-%{release}
%description devel
This package contains, header files and libraries needed to
develop application that use %{name}
%prep
%setup -q -n %{name}-%{version}-src
%build
export CFLAGS="%{optflags}"
export CXXFLAGS="$CFLAGS"
%if 0%{?suse_version} == 1110
make %{?_smp_mflags} ZLIB_LDFLAGS=-lz -f makefile-gtk
%else
cd gui-wx
mkdir build
pushd build
cmake ../
make %{?_smp_mflags}
popd
%endif
%install
install -d %{buildroot}%{_bindir}
install -m 0755 bgolly golly %{buildroot}%{_bindir}
%if 0%{?suse_version} >= 1140 || 0%{?fedora}
install -D -m 0644 gui-wx/build/libgollybase.a %{buildroot}%{_libdir}/libgollybase.a
%endif
rm -f {Help/Lexicon/modify.pl,docs/Build.html}
# install data files
mkdir -p %{buildroot}%{_datadir}/%{name}
for i in Help Patterns Rules Scripts; do
find ./$i -type d -exec chmod 755 {} \;
find ./$i -type f -exec chmod 644 {} \;
cp -a $i %{buildroot}%{_datadir}/%{name}/$i
done
install -D -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/pixmaps/%{name}.png
install -D -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/applications/%{name}.desktop
%if 0%{?suse_version}
%suse_update_desktop_file %{name}
%endif
%fdupes %{buildroot}%{_datadir}
%check
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%if 0%{?suse_version} == 1110
%doc LICENSE README TODO
%else
%doc docs/License.* docs/ReadMe.* docs/ToDo.*
%endif
%{_bindir}/*%{name}
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%exclude %{_datadir}/%{name}/Rules/TableGenerators
%exclude %{_datadir}/%{name}/Rules/TreeGenerators
%files devel
%defattr(-,root,root,-)
%if 0%{?suse_version} >= 1140 || 0%{?fedora}
%{_libdir}/libgollybase.a
%endif
%{_datadir}/%{name}/Rules/TableGenerators
%{_datadir}/%{name}/Rules/TreeGenerators
%changelog