File frotz.spec of Package frotz

#
# spec file for package frotz
#
# Copyright (c) 2025 SUSE 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/
#


Name:           frotz
Version:        2.55
Release:        0
Summary:        An interpreter for all Infocom and other Z-machine games
License:        GPL-2.0-only
Group:          Amusements/Games/RPG
URL:            https://davidgriffith.gitlab.io/frotz/
Source:         https://gitlab.com/DavidGriffith/frotz/-/archive/%{version}/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE frotz-2.55-no_font_install.patch - disable X11 font installation
Patch0:         frotz-2.55-no_font_install.patch
BuildRequires:  bdftopcf
BuildRequires:  gcc
BuildRequires:  make
BuildRequires:  mkfontdir
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(SDL2_mixer)
BuildRequires:  pkgconfig(ao)
BuildRequires:  pkgconfig(bzip2)
BuildRequires:  pkgconfig(fontutil)
BuildRequires:  pkgconfig(freetype2)
BuildRequires:  pkgconfig(libjpeg)
BuildRequires:  pkgconfig(libmodplug)
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(ncursesw)
BuildRequires:  pkgconfig(samplerate)
BuildRequires:  pkgconfig(sdl2)
BuildRequires:  pkgconfig(sndfile)
BuildRequires:  pkgconfig(vorbisfile)
BuildRequires:  pkgconfig(xt)
BuildRequires:  pkgconfig(zlib)

%description

Frotz is an interpreter for Infocom games and other Z-machine games.
It complies with the Z-Machine Standard version 1.1. It was written
by Stefan Jokisch in 1995-1997. It was ported to Unix by Galen
Hazelwood. Currently the Unix port is being developed and
maintained by David Griffith. The Unix port is also the canonical
core version upon which all other ports are based.

- Compiles and runs without changes on most common flavors of Unix,
  both open source and not. This includes macOS.
- Portable to many other operating systems and hardware.
- Curses, Dumb, and SDL user interfaces.
- Plays all Z-code games including V6.
- Sound support through libao.
- Graphics support through SDL and X11 (Xaw).
- Config files.
- User-configurable error-checking.
- Distributed under the GNU General Public License, version 2 or
  any later version.

%package dumb
Summary:        The dumb frotz client for bots etc
Requires:       %{name} = %{version}

%description dumb
This subpackage contains "dumb" frotz which can be used to integrate interactive fiction games into other applications

%package x11
Summary:        The X11 version of frotz
Requires:       %{name} = %{version}

%description x11
This package contains frotz with X11 support

%package sdl
Summary:        Frotz with SDL Support
Requires:       %{name} = %{version}

%description sdl
This package contains frotz with SDL support

%prep
%autosetup -p1

%build
%make_build all

%install
%make_install PREFIX=%{_prefix} install_all

# Make a version of the config file with all settings commented out,
# to install in /etc
sed -Ee '/(^#|^$)/! s/^/#/' < doc/%{name}.conf-big > %{name}.conf
install -m0644 -D %{name}.conf -t %{buildroot}%{_sysconfdir}

%files
%doc AUTHORS CONTRIBUTORS ChangeLog DUMB HOW_TO_PLAY README README.1st README.md
%doc doc/%{name}.conf*
%license COPYING
%{_bindir}/%{name}
%config(noreplace) %{_sysconfdir}/frotz.conf
%{_mandir}/man6/%{name}.6%{?ext_man}

%files dumb
%{_bindir}/dfrotz
%{_mandir}/man6/dfrotz.6%{?ext_man}

%files x11
%{_bindir}/xfrotz
%{_mandir}/man6/xfrotz.6%{?ext_man}

%files sdl
%{_bindir}/sfrotz
%{_mandir}/man6/sfrotz.6%{?ext_man}

%changelog
openSUSE Build Service is sponsored by