File OpenCrystalCaves.spec of Package OpenCrystalCaves
#
# spec file for package OpenCrystalCaves
#
# Copyright (c) 2024-2025, Martin Hauke <mardnh@gmx.de>
#
# 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: OpenCrystalCaves
Version: 0.4.0+git20250709
Release: 0
Summary: An open-source Crystal Caves game engine reimplementation
License: MIT
Group: Amusements/Games/Action/Arcade
URL: https://github.com/gurka/OpenCrystalCaves
Source: %{name}-%{version}.tar.xz
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: chrpath
BuildRequires: pkgconfig
BuildRequires: pkgconfig(sdl2)
BuildRequires: pkgconfig(SDL2_image)
BuildRequires: pkgconfig(SDL2_mixer)
%description
OCC is an unofficial open source engine reimplementation of the game
trilogy Crystal Caves (by Apogee).
NOTE: To play Crystal Caves with OpenCrystalCaves you need
the original game files.
%prep
%autosetup
%build
cd occ
%cmake \
-DBUILD_STATIC_LIBS:BOOL=ON \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DCMAKE_SHARED_LINKER_FLAGS="" \
-DCMAKE_BUILD_TYPE=Release
%cmake_build
%install
cd occ
#%%cmake_install
install -Dm0755 build/build/occ %{buildroot}%{_bindir}/occ
# HACK: fix RPATH
chrpath --delete %{buildroot}%{_bindir}/occ
# TODO
# * package media files
%files
%license LICENSE
%doc README.md
%{_bindir}/occ
%changelog