File performous.spec of Package performous
#
# spec file for package performous
#
# Copyright (c) 2022 SUSE LLC
#
# 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: performous
Version: 1.2.0
Release: 0
Summary: An open-source karaoke, band and dancing game
License: GPL-2.0-or-later
Group: Amusements/Games/Action/Arcade
URL: http://performous.org
Source: performous-%{version}.tar.gz
Source1: http://downloads.sourceforge.net/project/performous/ultrastar-songs-libre/3/ultrastar-songs-libre-3.zip
Source2: README_SONG
Source3: performous-compact_enc_det.tar.gz
Source4: performous-aubio.tar.gz
BuildRequires: cmake >= 3.14
BuildRequires: gcc-c++
BuildRequires: git
BuildRequires: help2man
BuildRequires: libboost_date_time-devel
BuildRequires: libboost_filesystem-devel
BuildRequires: libboost_iostreams-devel
BuildRequires: libboost_locale-devel
BuildRequires: libboost_program_options-devel
BuildRequires: libboost_regex-devel
BuildRequires: libboost_system-devel
BuildRequires: libboost_thread-devel
BuildRequires: libjpeg62-devel
BuildRequires: pkgconfig
BuildRequires: portmidi-devel
BuildRequires: unzip
BuildRequires: update-desktop-files
### TODO needs aubio with fftw3 enabled
#BuildRequires: pkgconfig(aubio) >= 0.4.9
BuildRequires: pkgconfig(epoxy)
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(glm)
BuildRequires: pkgconfig(jsoncpp)
BuildRequires: pkgconfig(libavformat)
BuildRequires: pkgconfig(libavresample)
BuildRequires: pkgconfig(libavutil)
BuildRequires: pkgconfig(libcrypto)
BuildRequires: pkgconfig(librsvg-2.0)
BuildRequires: pkgconfig(libssl)
BuildRequires: pkgconfig(libswscale)
BuildRequires: pkgconfig(libxml++-2.6)
BuildRequires: pkgconfig(opencv) >= 3.3
BuildRequires: pkgconfig(pangocairo)
BuildRequires: pkgconfig(portaudio-2.0)
BuildRequires: pkgconfig(sdl2)
# for aubio
BuildRequires: openblas-devel
BuildRequires: fftw3-devel
%description
An open-source karaoke, band and dancing game where one or more players perform a song and the game scores their performances.
Supports songs in UltraStar, Frets on Fire and StepMania formats. Microphones and instruments from SingStar,
Guitar Hero and Rock Band as well as some dance pads are autodetected.
%prep
%setup -q
mkdir ced-src
tar -zxf %{SOURCE3} --strip-components=1 -C ced-src
mkdir aubio-src
tar -zxf %{SOURCE4} --strip-components=1 -C aubio-src
cp %{SOURCE2} .
%build
%cmake \
-DFETCHCONTENT_FULLY_DISCONNECTED=ON \
-DFETCHCONTENT_SOURCE_DIR_CED-SOURCES=../ced-src \
-DFETCHCONTENT_SOURCE_DIR_AUBIO-SOURCES=../aubio-src \
-DUSE_BOOST_FS=ON
%make_jobs
%install
%cmake_install
%suse_update_desktop_file -r %{name} Game ArcadeGame
%find_lang Performous
### TODO Put songs-libre in subpackage?
# add songs-libre
unzip %{SOURCE1} -d %{buildroot}%{_datadir}/games/performous/
find %{buildroot} -ls
%files -f Performous.lang
%doc docs/Authors.txt README_SONG
# binary
%{_bindir}/performous
# menu entry
%{_datadir}/applications/performous.desktop
%{_datadir}/pixmaps
# man page
%{_mandir}/man?/*
# game data
%{_datadir}/games/performous
%changelog