File golly.spec of Package failed_golly

Name:           golly
Version:        4.3
Release:        1.1
Summary:        Golly - a Game of Life explorer

License:        GPL-2.0-or-later
URL:            https://golly.sourceforge.net/
Source0:        %{name}-%{version}-src.tar.gz

# Minimal necessary BuildRequires to ensure python headers and distutils are available
BuildRequires:  gcc-c++
BuildRequires:  make
BuildRequires:  wxGTK3-devel
BuildRequires:  lua-devel
BuildRequires:  python3-devel
BuildRequires:  python3-distutils
BuildRequires:  zlib-devel

%description
Golly is a cross-platform application for exploring Conway's Game of Life
and other cellular automata. It includes many algorithms and supports Python
scripting and wxWidgets-based GUI.

%prep
%setup -q -n %{name}-%{version}-src

# remove shipped files that should not be part of the build
rm -f Help/Lexicon/modify.pl docs/Build.html || :

%build
export GOLLYDIR=%{_datadir}/golly
cd gui-wx
# use makefile-gtk as in upstream
make -f makefile-gtk CXXFLAGS="%{optflags} `wx-config --cxxflags`" LDFLAGS="%{_libdir}" -j%{?jobs}

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_datadir}/golly
# install step - upstream build produces 'golly' binary in this example
install -m 0755 golly %{buildroot}%{_bindir}/golly || true
# install other data files if present
cp -a icons %{buildroot}%{_datadir}/golly 2>/dev/null || :

%files
%license LICENSE
%doc README
%{_bindir}/golly
%{_datadir}/golly

%changelog
* Sun Aug 10 2025 Packager <packager@example.com> - 4.3-1.1
- Add python3-distutils to BuildRequires so distutils is available during build
openSUSE Build Service is sponsored by