+#
+# Conditional build:
+%bcond_without gui # don't build gui examples (require qt4)
+#
Summary: Disposable Soft Synth Interface specification
-Summary(pl.UTF-8): Specyfikacja Disposable Soft Synth Interface
+Summary(pl.UTF-8): Specyfikacja Disposable Soft Synth Interface
Name: dssi
-Version: 0.9.1
+Version: 1.1.1
Release: 2
License: LGPL v2.1
Group: Development/Libraries
-Source0: http://dl.sourceforge.net/dssi/%{name}-%{version}.tar.gz
-# Source0-md5: 1a353c3ae80328cded838853ddf52164
+Source0: http://downloads.sourceforge.net/dssi/%{name}-%{version}.tar.gz
+# Source0-md5: 619ab73c883b02dc37ddb37001591f8b
+Patch0: %{name}-lib64.patch
+Patch1: %{name}-libx32.patch
URL: http://dssi.sourceforge.net/
+%if %{with gui}
+BuildRequires: QtCore-devel >= 4.0.1
+BuildRequires: QtGui-devel >= 4.0.1
+BuildRequires: qt4-build >= 4.0.1
+%endif
BuildRequires: alsa-lib-devel >= 0.9
-BuildRequires: jack-audio-connection-kit-devel
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: jack-audio-connection-kit-devel >= 0.99.14
BuildRequires: ladspa-devel >= 1.0
BuildRequires: liblo-devel >= 0.12
-# lib{sndfile,samplerate} are req. to build examples
-#BuildRequires: libsndfile-devel
-#BuildRequires: libsamplerate-devel
-Requires: alsa-lib-devel >= 0.9
-Requires: ladspa-devel >= 1.0
+BuildRequires: libsamplerate-devel
+BuildRequires: libsndfile-devel
+BuildRequires: libtool
+BuildRequires: pkgconfig
+BuildRequires: xorg-lib-libX11-devel
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
specyfikacji oraz udokumentowanego pliku nagłówkowego definiującego
API C.
+%package devel
+Summary: DSSI development files
+Summary(pl.UTF-8): Pliki nagłówkowe DSSI
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: alsa-lib-devel >= 0.9
+Requires: ladspa-devel >= 1.0
+Obsoletes: dssi < 1.0.0
+
+%description devel
+DSSI development files.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe DSSI.
+
%package host-jack
Summary: A simple JACK/ALSA-sequencer plugin host
-Summary(pl.UTF-8): Prosty host wtyczek sekwencera JACK/ALSA
+Summary(pl.UTF-8): Prosty host wtyczek sekwencera JACK/ALSA
Group: Applications/Sound
+Requires: %{name} = %{version}-%{release}
Requires: liblo >= 0.12
%description host-jack
%description host-jack -l pl.UTF-8
Prosty host wtyczek sekwencera JACK/ALSA.
+%package examples
+Summary: Example DSSI plugins
+Summary(pl.UTF-8): Przykładowe wtyczki DSSI
+Group: Applications/Sound
+Requires: %{name} = %{version}-%{release}
+
+%description examples
+Example DSSI plugins.
+
+%description examples -l pl.UTF-8
+Przykładowe wtyczki DSSI
+
%prep
%setup -q
+%if "%{_lib}" == "lib64"
+%patch0 -p1
+%endif
+%if "%{_lib}" == "libx32"
+%patch1 -p1
+%endif
%build
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+
%configure
%{__make}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/dssi/*.la
+
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc ChangeLog README doc/TODO doc/*.txt
+%attr(755,root,root) %{_bindir}/dssi_analyse_plugin
+%attr(755,root,root) %{_bindir}/dssi_list_plugins
+%attr(755,root,root) %{_bindir}/dssi_osc_send
+%attr(755,root,root) %{_bindir}/dssi_osc_update
+%dir %{_libdir}/dssi
+%{_mandir}/man1/dssi*.1*
+
+%files devel
+%defattr(644,root,root,755)
%{_includedir}/dssi.h
%{_pkgconfigdir}/dssi.pc
%files host-jack
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/jack-dssi-host
+%{_mandir}/man1/jack-dssi-host.1*
+
+%files examples
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/karplong
+%attr(755,root,root) %{_bindir}/less_trivial_synth
+%attr(755,root,root) %{_bindir}/trivial_sampler
+%attr(755,root,root) %{_bindir}/trivial_synth
+%attr(755,root,root) %{_libdir}/dssi/*.so
+%if %{with gui}
+%dir %{_libdir}/dssi/less_trivial_synth
+%attr(755,root,root) %{_libdir}/dssi/less_trivial_synth/*_qt
+%dir %{_libdir}/dssi/trivial_sampler
+%attr(755,root,root) %{_libdir}/dssi/trivial_sampler/*_qt
+%endif