File RetroWave.spec of Package RetroWave
#
# spec file for package RetroWave
#
# Copyright (c) 2023, 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/
#
%define sover 0
%define libname libRetroWave%{sover}
Name: RetroWave
Version: 0.1.0
Release: 0
Summary: RetroWave OPL3 library
License: AGPL-3.0-or-later
URL: https://github.com/SudoMaker/RetroWave
#Git-Clone: https://github.com/SudoMaker/RetroWave.git
Source: https://github.com/SudoMaker/RetroWave/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM RetroWave-cmake.patch mardnh@gmx.de https://github.com/SudoMaker/RetroWave/pull/4 -- CMake improvements
Patch0: RetroWave-cmake.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: pkgconfig(zlib)
%description
A library to interface with RetroWave OPL3 (express) devices.
%package -n %{libname}
Summary: RetroWave OPL3 library
Group: System/Libraries
%description -n %{libname}
A library to interface with RetroWave OPL3 (express) devices.
%package devel
Summary: Development files for libRetroWave
Group: Development/Libraries/C and C++
Requires: %{libname} = %{version}
%description devel
A library to interface with RetroWave OPL3 (express) devices.
This subpackage contains libraries and header files for developing
applications that want to make use of libRetroWave.
%prep
%setup -q
%patch0 -p1
# HACK: no need to try use headers for STM32 / Win32
rm -v RetroWaveLib/Platform/STM32_*
rm -v RetroWaveLib/Platform/Win32_*
%build
%cmake \
-DRETROWAVE_BUILD_PLAYER=0
%cmake_build
%install
%cmake_install
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%files -n %{libname}
%license LICENSE
%doc README.md
%{_libdir}/libRetroWave.so.%{sover}*
%files devel
%{_includedir}/RetroWaveLib
%{_libdir}/libRetroWave.so
%{_libdir}/cmake/RetroWave
%{_libdir}/pkgconfig/RetroWave.pc
%changelog