File Melissa.spec of Package Melissa

#
# spec file for package Melissa
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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:           Melissa
Version:        3.2.0
Release:        0
Summary:        A music player for musical instrument practice 
License:        LGPL-2.1-only
Group:          Productivity/Multimedia/Sound/Midi
URL:            https://github.com/mosynthkey/Melissa
Source0:        %{name}-%{version}.tar.xz
Source1:        Melissa.png
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig(alsa)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xinerama)
BuildRequires:  pkgconfig(xext)
BuildRequires:  pkgconfig(freetype2)
BuildRequires:  pkgconfig(libusb-1.0)
BuildRequires:  libjack-devel
BuildRequires:  libcurl-devel
BuildRequires:  Mesa-libGL-devel
BuildRequires:  libXrandr-devel
BuildRequires:  libXcursor-devel
BuildRequires:  JUCE7_05-devel
BuildRequires:  JUCE7_05-Projucer
BuildRequires:  update-desktop-files

%description
https://mosynthkey.github.io/Melissa/

Melissa helps musicians to practice in more efficient and fun 
way. It has a metronome, pitch/tempo control and looping support.

%prep
%setup -q

%build

cd Melissa_Lite

sed -i -e /'<\/EXPORTFORMATS>/i <LINUX_MAKE targetFolder="Builds/LinuxMakefile" extraCompilerFlags="-fvisibility=hidden" \
 extraLinkerFlags="-fdata-sections -ffunction-sections -Wl,--gc-sections -Wl,-O1 -Wl,--as-needed -Wl,--strip-all">\ <CONFIGURATIONS>\ \
 <CONFIGURATION isDebug="1" name="Debug"/>\ <CONFIGURATION isDebug="0" name="Release"/>\      </CONFIGURATIONS>\      <MODULEPATHS>\  \
 </MODULEPATHS>\     </LINUX_MAKE>'  %{name}_Lite.jucer

sed -i -e 's/JUCEOPTIONS/JUCEOPTIONS JUCE_JACK="1" JUCE_WEB_BROWSER="0" JUCE_USE_CURL="0"/' %{name}_Lite.jucer

Projucer --set-global-search-path linux defaultJuceModulePath %{_includedir}/JUCE-*/modules
Projucer --resave %{name}_Lite.jucer

cd Builds/LinuxMakefile
CONFIG=Release make %{?_smp_mflags}

%install
cd Melissa_Lite
mkdir -p %{buildroot}%{_bindir}
install Builds/LinuxMakefile/build/%{name}_Lite %{buildroot}%{_bindir}/
mkdir -p %{buildroot}%{_datadir}/applications
mkdir -p %{buildroot}%{_datadir}/pixmaps
cp %{SOURCE1} %{buildroot}%{_datadir}/pixmaps
%suse_update_desktop_file -c Melissa Melissa Melissa Melissa_Lite Melissa AudioVideo Music

%files
%{_bindir}/%{name}_Lite
%dir %{_datadir}/applications/
%{_datadir}/applications/%{name}.desktop
%dir %{_datadir}/pixmaps
%{_datadir}/pixmaps/%{name}.png 
%license LICENSE
%doc README.md

%changelog
openSUSE Build Service is sponsored by