%define name    @PACKAGE_TARNAME@
%define version @PACKAGE_VERSION@
%define release 28

%define _prefix	@ac_prefix@

%if %{defined fedora}
%define debug_package %{nil}
%endif

Summary:	An Audio/MIDI multi-track sequencer
Name:		%{name}
Version:	%{version}
Release:	%{release}
License:	GPL-2.0+
Group:		Productivity/Multimedia/Sound/Midi
Source0:	%{name}-%{version}.tar.gz
URL:		http://qtractor.sourceforge.net/
#Packager:	rncbc.org

BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot

#BuildRequires:	libqt4-devel >= 4.4
%if %{defined fedora}
BuildRequires:	pkgconfig
BuildRequires:	qt5-qtbase-devel >= 5.1, qt5-linguist
BuildRequires:	qt5-qtx11extras-devel >= 5.1
BuildRequires:	alsa-lib-devel
%else
BuildRequires:	pkg-config
BuildRequires:	libqt5-qtbase-devel >= 5.1, libqt5-linguist
BuildRequires:	libqt5-qtx11extras-devel >= 5.1
BuildRequires:	alsa-devel
%endif
BuildRequires:	libjack-devel >= 0.100.0
BuildRequires:	libsndfile-devel >= 1.0.11
BuildRequires:	libvorbis-devel
#BuildRequires:	libmad-devel
BuildRequires:	libsamplerate-devel
BuildRequires:	librubberband-devel >= 1.0.1
BuildRequires:	liblo-devel
BuildRequires:	ladspa-devel
BuildRequires:	dssi-devel
BuildRequires:	lv2-devel
BuildRequires:	libserd-devel
BuildRequires:	libsord-devel
BuildRequires:	libsratom-devel
BuildRequires:	liblilv-devel
BuildRequires:	libsuil-devel
BuildRequires:	zlib-devel
BuildRequires:  gtk2-devel

Requires(post):		desktop-file-utils, shared-mime-info
Requires(postun):	desktop-file-utils, shared-mime-info

%description
Qtractor is an Audio/MIDI multi-track sequencer application
written in C++ with the Qt framework. 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
[ -x ./autogen.sh ] && ./autogen.sh

%build
%configure
%__make %{?_smp_mflags}

%install
%__make DESTDIR="%{buildroot}" install

%post
%mime_database_post
%desktop_database_post

%postun
%mime_database_postun
%desktop_database_postun

%clean
[ -d "%{buildroot}" -a "%{buildroot}" != "" ] && %__rm -rf "%{buildroot}"

%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog README TODO
#dir %{_datadir}/mime
#dir %{_datadir}/mime/packages
#dir %{_datadir}/applications
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/32x32
%dir %{_datadir}/icons/hicolor/32x32/apps
%dir %{_datadir}/icons/hicolor/32x32/mimetypes
%dir %{_datadir}/icons/hicolor/scalable
%dir %{_datadir}/icons/hicolor/scalable/apps
%dir %{_datadir}/icons/hicolor/scalable/mimetypes
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/translations
%dir %{_datadir}/appdata
#dir %{_datadir}/man
#dir %{_datadir}/man/man1
%{_bindir}/%{name}
%{_bindir}/%{name}_vst_scan
%{_datadir}/mime/packages/%{name}.xml
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%{_datadir}/icons/hicolor/32x32/mimetypes/application-x-%{name}*.png
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_datadir}/icons/hicolor/scalable/mimetypes/application-x-%{name}*.svg
%{_datadir}/%{name}/translations/%{name}_*.qm
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/man/man1/%{name}.1.gz

%changelog
* Mon Nov 21 2016 Rui Nuno Capela <rncbc@rncbc.org> 0.8.0
- The Snobbiest Graviton beta release.
* Wed Sep 21 2016 Rui Nuno Capela <rncbc@rncbc.org> 0.7.9
- A Snobbier Graviton beta release.
* Thu Jun 23 2016 Rui Nuno Capela <rncbc@rncbc.org> 0.7.8
- The Snobby Graviton beta release.
* Wed Apr 27 2016 Rui Nuno Capela <rncbc@rncbc.org> 0.7.7
- The Haziest Photon beta release.
* Tue Apr  5 2016 Rui Nuno Capela <rncbc@rncbc.org> 0.7.6
- A Hazier Photon beta release.
* Mon Mar 21 2016 Rui Nuno Capela <rncbc@rncbc.org> 0.7.5
- Hazy Photon beta release.
* Thu Jan 28 2016 Rui Nuno Capela <rncbc@rncbc.org> 0.7.4
- Tackiest Gluon beta release.
* Tue Dec 29 2015 Rui Nuno Capela <rncbc@rncbc.org> 0.7.3
- A Tackier Gluon beta release.
* Thu Dec 10 2015 Rui Nuno Capela <rncbc@rncbc.org> 0.7.2
- Tacky Gluon beta release.
* Fri Oct  9 2015 Rui Nuno Capela <rncbc@rncbc.org> 0.7.1
- Meson Dope beta release.
* Fri Jul 24 2015 Rui Nuno Capela <rncbc@rncbc.org> 0.7.0
- Muon Base beta release.
* Wed May 27 2015 Rui Nuno Capela <rncbc@rncbc.org> 0.6.7
- Lepton Acid beta release.
* Sun Mar 29 2015 Rui Nuno Capela <rncbc@rncbc.org> 0.6.6
- Lazy Tachyon beta release.
* Fri Jan 30 2015 Rui Nuno Capela <rncbc@rncbc.org> 0.6.5
- Fermion Ray beta release.
* Mon Nov 24 2014 Rui Nuno Capela <rncbc@rncbc.org> 0.6.4
- Baryon Throne beta release.
* Mon Sep 22 2014 Rui Nuno Capela <rncbc@rncbc.org> 0.6.3
- Armed Hadron beta release.
* Mon Jul  7 2014 Rui Nuno Capela <rncbc@rncbc.org> 0.6.2
- Boson Walk beta release.
* Tue Apr 29 2014 Rui Nuno Capela <rncbc@rncbc.org> 0.6.1
- Bitsy Sweet beta release.
* Fri Mar 21 2014 Rui Nuno Capela <rncbc@rncbc.org> 0.6.0
- Byte Bald beta release.
* Tue Dec 31 2013 Rui Nuno Capela <rncbc@rncbc.org> 0.5.12
- Mike November release.
* Mon Oct  7 2013 Rui Nuno Capela <rncbc@rncbc.org> 0.5.11
- Lima Oscar release.
* Thu Jul 18 2013 Rui Nuno Capela <rncbc@rncbc.org> 0.5.10
- Kilo Papa release.
* Thu Jun  6 2013 Rui Nuno Capela <rncbc@rncbc.org> 0.5.9
- Juliet Quebec release.
* Tue Mar 19 2013 Rui Nuno Capela <rncbc@rncbc.org> 0.5.8
- India Romeo release.
* Thu Dec 27 2012 Rui Nuno Capela <rncbc@rncbc.org> 0.5.7
- Hotel Sierra release.
* Tue Oct 02 2012 Rui Nuno Capela <rncbc@rncbc.org> 0.5.6
- Golf Tango release.
* Fri Jun 15 2012 Rui Nuno Capela <rncbc@rncbc.org> 0.5.5
- Foxtrot Uniform release.
* Thu Mar 01 2012 Rui Nuno Capela <rncbc@rncbc.org> 0.5.4
- Echo Victor release.
* Wed Dec 28 2011 Rui Nuno Capela <rncbc@rncbc.org> 0.5.3
- Delta Whisky release.
* Fri Dec 16 2011 Rui Nuno Capela <rncbc@rncbc.org> 0.5.2
- Charlie X-ray release.
* Wed Oct 05 2011 Rui Nuno Capela <rncbc@rncbc.org> 0.5.1
- Bravo Yankee release.
* Fri Jul 22 2011 Rui Nuno Capela <rncbc@rncbc.org> 0.5.0
- Alpha Zulu (TYOQA) release.
* Thu May 26 2011 Rui Nuno Capela <rncbc@rncbc.org> 0.4.9
- Final Dudette release.
* Wed Jan 19 2011 Rui Nuno Capela <rncbc@rncbc.org> 0.4.8
- Fiery Demigoddess release.
* Thu Sep 30 2010 Rui Nuno Capela <rncbc@rncbc.org> 0.4.7
- Furious Desertrix release.
* Fri May 21 2010 Rui Nuno Capela <rncbc@rncbc.org> 0.4.6
- Funky Deviless release.
* Sat Jan 23 2010 Rui Nuno Capela <rncbc@rncbc.org> 0.4.5
- A Friskier Demivierge release.
* Sat Jan 16 2010 Rui Nuno Capela <rncbc@rncbc.org> 0.4.4
- Frisky Demivierge release.
* Mon Oct 05 2009 Rui Nuno Capela <rncbc@rncbc.org> 0.4.3
- Fussy Doula release.
* Thu Jun 04 2009 Rui Nuno Capela <rncbc@rncbc.org> 0.4.2
- Flaunty Demoness release.
* Sat Apr 04 2009 Rui Nuno Capela <rncbc@rncbc.org> 0.4.1
- Funky Dominatrix release.
* Fri Mar 13 2009 Rui Nuno Capela <rncbc@rncbc.org> 0.4.0
- Foxy Dryad release.
* Thu Dec 25 2008 Rui Nuno Capela <rncbc@rncbc.org> 0.3.0
- Fluffy Doll release.
* Sun Oct 05 2008 Rui Nuno Capela <rncbc@rncbc.org> 0.2.2
- Flirty Ditz release.
* Sat Aug 30 2008 Rui Nuno Capela <rncbc@rncbc.org> 0.2.1
- Fainty Diva release.
* Fri Jul 18 2008 Rui Nuno Capela <rncbc@rncbc.org> 0.2.0
- Frolic Demoiselle release.
* Fri May 02 2008 Rui Nuno Capela <rncbc@rncbc.org> 0.1.3
- Frugal Damsel release.
* Sun Mar 23 2008 Rui Nuno Capela <rncbc@rncbc.org> 0.1.2
- Frantic Dame release.
* Sat Feb 16 2008 Rui Nuno Capela <rncbc@rncbc.org> 0.1.1
- Futile Duchess release.
* Sat Jan  5 2008 Rui Nuno Capela <rncbc@rncbc.org> 0.1.0
- Frivolous Debutante release.
