File brandy.spec of Package brandy

#
# spec file for package brandy
#
# Copyright (c) 2025 SUSE LINUX LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#

%define _lto_cflags %{nil}
%define subver  1.20
Name:           brandy
Version:        1.23.5
Release:        0
Summary:        BBC Basic interpreter
License:        GPL-2.0-or-later
Group:          System/Emulators/Other
# This is a fork, original package at http://brandy.sourceforge.net
URL:            http://brandy.matrixnetwork.co.uk
Source0:        https://github.com/stardot/MatrixBrandy/archive/V%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1:        %{name}.desktop
Source2:        %{name}.png
BuildRequires:  pkgconfig(sdl12_compat)

%description
Brandy is an interpreter for BBC Basic (or Basic V) that runs under
a variety of operating systems. Basic V is the version of Basic
supplied with desktop computers running RISC OS.
These were originally made by Acorn Computers.

%package        doc
Summary:        Contains documentation for Brandy
Group:          Documentation/Other
Requires:       %{name} = %{version}

%description    doc
Contains documentation for the Brandy BBC Basic interpreter.

%prep
%autosetup -p1 -n MatrixBrandy-%{version}

%build
export BRANDY_BUILD_FLAGS="%{optflags}"
%make_build

%install
install -d -m0755 \
         %{buildroot}%{_bindir} \
         %{buildroot}%{_datadir}/applications \
         %{buildroot}%{_datadir}/pixmaps
install -m0755 brandy -t %{buildroot}%{_bindir}
install -m0644 %{SOURCE1} -t %{buildroot}%{_datadir}/applications
install -m0644 %{SOURCE2} -t %{buildroot}%{_datadir}/pixmaps

%files
%doc READ.ME
%license docs/COPYING
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png

%files doc
%doc docs examples

%changelog
openSUSE Build Service is sponsored by