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

%define _prefix	@ac_prefix@

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

Summary:	An old-school polyphonic sampler
Name:		%{name}
Version:	%{version}
Release:	%{release}
License:	GPL-2.0+
Group:		Productivity/Multimedia/Sound/Midi
Source0:	%{name}-%{version}.tar.gz
URL:		http://samplv1.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:	alsa-lib-devel
%else
BuildRequires:	pkg-config
BuildRequires:	libqt5-qtbase-devel >= 5.1, libqt5-linguist
BuildRequires:	alsa-devel
%endif
BuildRequires:	libjack-devel >= 0.100.0
BuildRequires:	libsndfile-devel >= 1.0.11
BuildRequires:	liblo-devel
BuildRequires:	lv2-devel

%description
  An old-school all-digital polyphonic sampler synthesizer with stereo fx.

%prep
%setup
[ -x ./autogen.sh ] && ./autogen.sh

%build
%configure
%__make %{?_smp_mflags}

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

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

%post
/sbin/ldconfig

%postun
/sbin/ldconfig

%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog README TODO
%{_libdir}/lib%{name}.so*
%{_libdir}/lib%{name}_ui.so*
%dir %{_libdir}/lv2
%dir %{_libdir}/lv2/%{name}.lv2
%{_libdir}/lv2/%{name}.lv2/manifest.ttl
%{_libdir}/lv2/%{name}.lv2/%{name}.ttl
%{_libdir}/lv2/%{name}.lv2/%{name}.so
%{_libdir}/lv2/%{name}.lv2/%{name}_ui.ttl
%{_libdir}/lv2/%{name}.lv2/%{name}_ui.so
%dir %{_datadir}/metainfo
#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}/man
#dir %{_datadir}/man/man1
%{_bindir}/%{name}_jack
%{_datadir}/metainfo/%{name}.appdata.xml
%{_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}/man/man1/%{name}*.1.gz

%changelog
* Wed Dec 20 2017 Rui Nuno Capela <rncbc@rncbc.org> 0.8.6
- The End of Autumn'17 release.
* Sun Oct 29 2017 Rui Nuno Capela <rncbc@rncbc.org> 0.8.5
- An Autumn'17 release.
* Tue Aug 22 2017 Rui Nuno Capela <rncbc@rncbc.org> 0.8.4
- A Late-Summer'17 release.
* Wed Jun 21 2017 Rui Nuno Capela <rncbc@rncbc.org> 0.8.3
- A Summer'17 release.
* Tue May  2 2017 Rui Nuno Capela <rncbc@rncbc.org> 0.8.2
- Pre-LAC2017 release frenzy.
* Tue Mar 21 2017 Rui Nuno Capela <rncbc@rncbc.org> 0.8.1
- A Spring'17 release.
* Thu Nov 17 2016 Rui Nuno Capela <rncbc@rncbc.org> 0.8.0
- A Fall'16 release.
* Mon Sep 19 2016 Rui Nuno Capela <rncbc@rncbc.org> 0.7.6
- The eleventh official beta.
* Thu Jun 16 2016 Rui Nuno Capela <rncbc@rncbc.org> 0.7.5
- The tenth official beta.
* Wed Mar  2 2016 Rui Nuno Capela <rncbc@rncbc.org> 0.7.4
- The ninth-bis official beta.
* Mon Feb 22 2016 Rui Nuno Capela <rncbc@rncbc.org> 0.7.3
- The ninth official beta.
* Fri Dec  4 2015 Rui Nuno Capela <rncbc@rncbc.org> 0.7.2
- The eighth official beta.
* Mon Aug 24 2015 Rui Nuno Capela <rncbc@rncbc.org> 0.7.1
- A seventh-bis official beta.
* Fri Jul 24 2015 Rui Nuno Capela <rncbc@rncbc.org> 0.7.0
- A seventh official beta.
* Sat May  9 2015 Rui Nuno Capela <rncbc@rncbc.org> 0.6.3
- A sixth official beta.
* Thu Apr 30 2015 Rui Nuno Capela <rncbc@rncbc.org> 0.6.2
- A fifth official beta.
* Mon Mar  9 2015 Rui Nuno Capela <rncbc@rncbc.org> 0.6.1
- A fourth official beta.
* Fri Jan 23 2015 Rui Nuno Capela <rncbc@rncbc.org> 0.6.0
- A third official beta.
* Fri Sep 12 2014 Rui Nuno Capela <rncbc@rncbc.org> 0.5.1
- One second official beta.
* Mon Jun 30 2014 Rui Nuno Capela <rncbc@rncbc.org> 0.5.0
- Officially beta now.
* Tue Apr 29 2014 Rui Nuno Capela <rncbc@rncbc.org> 0.4.2
- A pre-LAC frenzy beta.
* Mon Apr  7 2014 Rui Nuno Capela <rncbc@rncbc.org> 0.4.1
- A proto-beta bis.
* Thu Mar  6 2014 Rui Nuno Capela <rncbc@rncbc.org> 0.4.0
- A proto-beta party.
* Tue Dec 31 2013 Rui Nuno Capela <rncbc@rncbc.org> 0.3.6
- A fifth of a Jubilee release.
* Mon Sep 30 2013 Rui Nuno Capela <rncbc@rncbc.org> 0.3.5
- Fall greetings release.
* Tue Jul 16 2013 Rui Nuno Capela <rncbc@rncbc.org> 0.3.4
- Brand new icon ready.
* Fri May 31 2013 Rui Nuno Capela <rncbc@rncbc.org> 0.3.3
- Late spring blossoming.
* Fri Mar  1 2013 Rui Nuno Capela <rncbc@rncbc.org> 0.3.2
- One third bug-fix release.
* Fri Feb  8 2013 Rui Nuno Capela <rncbc@rncbc.org> 0.3.1
- One second bug-fix release.
* Fri Dec 21 2012 Rui Nuno Capela <rncbc@rncbc.org> 0.3.0
- Third coming release.
* Thu Nov 22 2012 Rui Nuno Capela <rncbc@rncbc.org> 0.2.0
- Second public release.
* Mon Sep 24 2012 Rui Nuno Capela <rncbc@rncbc.org> 0.1.1
- One first bug-fix release.
* Mon Sep 10 2012 Rui Nuno Capela <rncbc@rncbc.org> 0.1.0
- First true official release.
* Mon Aug 27 2012 Rui Nuno Capela <rncbc@rncbc.org> 0.0.9
- Post-vacation relax: improved polyphony, preset salvage.
* Sun Jul 15 2012 Rui Nuno Capela <rncbc@rncbc.org> 0.0.8
- Proto-Icon, Desktop file and Help About menus added.
* Sun Jul  8 2012 Rui Nuno Capela <rncbc@rncbc.org> 0.0.7
- Created initial samplv1.spec
