File polyphone.spec of Package polyphone

#
# spec file for package polyphone
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2022 by Edgar Aichinger
#
# 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:           polyphone
Version:        2.5.1+git.0.9a562b8
Release:        0
Summary:        A free Soundfont (SF2) Editor
License:        GPL-3.0-or-later
Group:          Productivity/Multimedia/Sound/Editors and Convertors
URL:            https://www.polyphone-soundfonts.com/en/
Source0:        %{name}-%{version}.tar.xz
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(Qt6Concurrent)
BuildRequires:  pkgconfig(Qt6Core)
BuildRequires:  pkgconfig(Qt6Network)
BuildRequires:  pkgconfig(Qt6PrintSupport)
BuildRequires:  pkgconfig(Qt6Svg)
BuildRequires:  pkgconfig(alsa)
BuildRequires:  pkgconfig(flac)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(jack)
BuildRequires:  pkgconfig(ogg)
BuildRequires:  pkgconfig(portaudio-2.0)
BuildRequires:  pkgconfig(qcustomplot)
BuildRequires:  pkgconfig(rtmidi)
BuildRequires:  pkgconfig(sndfile)
BuildRequires:  pkgconfig(vorbis)
BuildRequires:  pkgconfig(zlib)
BuildRequires:  stk-devel
%if %{defined fedora}
BuildRequires:  desktop-file-utils
BuildRequires:  openssl-devel
BuildRequires:  qt6-linguist
%else
BuildRequires:  qt6-tools-linguist
BuildRequires:  pkgconfig(openssl)
%endif

%description
Polyphone is a free software for editing soundfonts in format sf2. These files contain a multitude of audio samples put together and configured so as to form musical instruments that can be used by synthesizers such as fluidsynth and played using a MIDI keyboard.

The goal of Polyphone is to provide:

    a simple and efficient interface for creating and editing .sf2 files, available on Windows, Mac OS X and Linux,
    tools to facilitate and automate the editing of different parameters, making it possible to handle a large amount of data.

Polyphone is licensed under GNU General Public License. Anyone may thus access the source code, and is welcome to help in the development of the program.

%prep
%autosetup -n %{name}-%{version}/sources

%build
%if %{defined fedora}
export QTDIR=%{_qt6_prefix}
%{_qt6_qmake} QMAKE_CFLAGS+="%{optflags}" QMAKE_CXXFLAGS+="%{optflags}" polyphone.pro
%make_build
%else
%qmake6 PREFIX=%{_prefix} QMAKE_STRIP="/bin/true" polyphone.pro
%make_build
%endif

%install
%qmake6_install

%files
%defattr(-,root,root,0755)
%doc ../README.md changelog
%license LICENSE.txt
%{_bindir}/polyphone
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/512x512
%dir %{_datadir}/icons/hicolor/512x512/apps
%{_datadir}/applications/io.polyphone.polyphone.desktop
%{_datadir}/metainfo/io.polyphone.polyphone.metainfo.xml
%{_datadir}/icons/hicolor/512x512/apps/polyphone.png
%exclude %{_datadir}/doc/polyphone/README.md
%exclude %{_datadir}/doc/polyphone/changelog
%{_datadir}/man/fr/man1/polyphone.1.gz
%{_datadir}/man/man1/polyphone.1.gz
%{_datadir}/mime/packages/polyphone.xml


%changelog
openSUSE Build Service is sponsored by