File powertabeditor.spec of Package powertabeditor

#
# spec file for package powertabeditor
#
# 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:           powertabeditor
Version:        @SERVICE@
Release:        0
Summary:        View and edit guitar tablature
License:        GPL-3.0-or-later
Group:          Productivity/Multimedia/Other
URL:            https://powertab.github.io
Source0:        %{name}-%{version}.tar.xz
BuildRequires:  cmake
BuildRequires:  cmake(Qt5LinguistTools)
BuildRequires:  cmake(doctest)
BuildRequires:  cmake(nlohmann_json) >= 3.7.3
%if 0%{?suse_version} >= 1550
BuildRequires:  gcc-c++ >= 10.2.1
%else
BuildRequires:  gcc10-c++
%endif
BuildRequires:  libboost_date_time-devel
BuildRequires:  libboost_filesystem-devel
BuildRequires:  libboost_iostreams-devel
BuildRequires:  libboost_regex-devel
BuildRequires:  ninja
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5PrintSupport)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(alsa)
BuildRequires:  pkgconfig(minizip)
BuildRequires:  pkgconfig(pugixml)
BuildRequires:  pkgconfig(rtmidi)
BuildRequires:  pkgconfig(zlib)
BuildRequires:  update-desktop-files
Recommends:     timidity
Suggests:       jack

%description
Power Tab Editor is an easy to use cross-platform guitar tablature editor
and viewer. A variety of file formats are supported, including .pt2, .ptb,
.gp3, .gp4, .gp5, .gpx, and .gp.

%lang_package

%prep
%autosetup -p1

%build
%define __builder ninja
%cmake \
%if 0%{?suse_version} >= 1550
    -DCMAKE_CXX_COMPILER=%{_bindir}/g++
%else
    -DCMAKE_CXX_COMPILER=%{_bindir}/g++-10
%endif
%ninja_build

%install
%cmake_install

%find_lang %{name} --with-qt

%files
%doc CHANGELOG.md CODE_OF_CONDUCT.md CONTRIBUTING.md README.md
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.??g
%{_datadir}/metainfo/%{name}.metainfo.xml
%{_datadir}/mime/packages/%{name}.xml
%dir %{_datadir}/powertab
%dir %{_datadir}/powertab/%{name}
%{_datadir}/powertab/%{name}/tunings.json
%license COPYING

%files lang -f %{name}.lang
%dir %{_datadir}/powertab/%{name}/translations

%changelog
openSUSE Build Service is sponsored by