File fmit.spec of Package fmit

#
# spec file for package fmit
#
# Copyright (c) 2017 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 http://bugs.opensuse.org/
#


Name:           fmit
Version:        @SERVICE@
Release:        0
Summary:        Free Music Instrument Tuner
License:        GPL-2.0 and LGPL-2.1
Group:          Productivity/Multimedia/Sound/Visualization
Url:            https://github.com/gillesdegottex/fmit
Source:         %{name}-%{version}.tar.xz
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  itstool
BuildRequires:  cmake(Qt5LinguistTools)
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5OpenGL)
BuildRequires:  pkgconfig(Qt5Multimedia)
BuildRequires:  pkgconfig(Qt5Svg)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(portaudio-2.0)
BuildRequires:  pkgconfig(alsa)
BuildRequires:  pkgconfig(jack)
BuildRequires:  pkgconfig(fftw3)
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
FMIT is a graphical utility for tuning your musical instruments, with error
and volume history and advanced features like microtonal tuning, statistics,
and various views like waveform shape, harmonics ratios and real-time Discrete
Fourier Transform (DFT).

%lang_package

%prep
%setup -q

%build
lrelease-qt5 %{name}.pro
%qmake5 \
    PREFIX=%{_prefix} \
    "CONFIG+=acs_qt acs_alsa acs_jack acs_portaudio acs_oss"
%make_jobs

%install
%qmake5_install

%find_lang %{name} --with-qt

%post
%icon_theme_cache_post

%postun
%icon_theme_cache_postun

%files
%defattr(-,root,root)
%doc COPYING_GPL.txt COPYING_LGPL.txt README.txt
%{_bindir}/%{name}
%dir %{_datadir}/appdata
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/applications/%{name}.desktop
%{_datadir}/%{name}
%{_datadir}/icons/hicolor/*/apps/%{name}*.??g
%exclude %{_datadir}/%{name}/translations

%files lang -f %{name}.lang
%defattr(-,root,root)
%dir %{_datadir}/%{name}/translations

%changelog