File qtractor.spec of Package qtractor

#
# spec file for package qtractor
#
# Copyright (c) 2016 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/
#


%bcond_with    mad

Name:           qtractor
Version:        0.7.8
Release:        0
Summary:        An Audio/MIDI multi-track sequencer
License:        GPL-2.0+
Group:          Productivity/Multimedia/Sound/Editors and Convertors
Url:            http://qtractor.sourceforge.net/
Source0:        qtractor-%{version}.tar.gz
Patch0:         %{name}-nodatetime.patch
Patch1:         qtractor-remove_path_from_exec_in_desktop_file.patch
Patch2:         qtractor-powerpc.patch
BuildRequires:  alsa-devel
BuildRequires:  desktop-file-utils
BuildRequires:  dssi-devel
BuildRequires:  hicolor-icon-theme
BuildRequires:  ladspa-devel
BuildRequires:  libjack-devel
BuildRequires:  liblo-devel
BuildRequires:  librubberband-devel
BuildRequires:  libsamplerate-devel
BuildRequires:  libsndfile-devel >= 1.0.11
BuildRequires:  libvorbis-devel
%if 0%{?suse_version} > 1310
BuildRequires:  libqt5-linguist
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(Qt5X11Extras)
BuildRequires:  pkgconfig(Qt5Xml)
%else
BuildRequires:  libqt4-devel
BuildRequires:  libqt4-linguist
%endif
BuildRequires:  zlib-devel
BuildRequires:  pkgconfig(lilv-0)
BuildRequires:  pkgconfig(shared-mime-info)
%if %{with mad}
BuildRequires:  pkgconfig(mad)
%endif
Requires:       jack
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Qtractor is an Audio/MIDI multi-track sequencer application
written in C++ around the Qt4 toolkit using Qt Designer.

The initial target platform will be Linux, where the Jack Audio
Connection Kit (JACK) for audio, and the Advanced Linux Sound
Architecture (ALSA) for MIDI, are the main infrastructures to
evolve as a fairly-featured Linux Desktop Audio Workstation GUI,
specially dedicated to the personal home-studio.

%prep
%setup -q
%patch0
%patch1
%patch2

%build
%if 0%{?suse_version} > 1310
%configure
%else
%configure --enable-qt4
%endif
make %{?_smp_mflags}

%install
%makeinstall

%clean
%{?buildroot:%__rm -rf '%{buildroot}'}

%post
%icon_theme_cache_post
%mime_database_post
%desktop_database_post

%postun
%desktop_database_postun
%mime_database_postun
%icon_theme_cache_postun

%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog README TODO
%dir %{_datadir}/appdata/
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/translations
%{_bindir}/%{name}
%{_bindir}/qtractor_vst_scan
%{_datadir}/applications/%{name}.desktop
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/icons/*/*/apps/%{name}.*
%{_datadir}/icons/*/*/mimetypes/application-x-%{name}-*.*
%{_datadir}/mime/packages/%{name}.xml
%{_datadir}/man/man1/%{name}.1.gz
%{_datadir}/%{name}/translations/*

%changelog