File zynaddsubfx.spec of Package zynaddsubfx

#
# spec file for package zynaddsubfx
#
# Copyright (c) 2015 SUSE LINUX Products 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:           zynaddsubfx
BuildRequires:  alsa-devel
BuildRequires:  cmake
BuildRequires:  dssi-devel
BuildRequires:  fftw3-devel
BuildRequires:  fltk-devel
BuildRequires:  gcc-c++
BuildRequires:  jack-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libpng-devel
BuildRequires:  mxml-devel
BuildRequires:  portaudio-devel
BuildRequires:  update-desktop-files
BuildRequires:  lash-devel
BuildRequires:  xorg-x11-devel
Provides:       ZynAddSubFX = %{version}
Obsoletes:      ZynAddSubFX < %{version}
Version:        2.4.4
Release:        0
Summary:        A Real-Time Software Synthesizer for Linux
License:        GPL-2.0
Group:          Productivity/Multimedia/Sound/Midi
Url:            http://zynaddsubfx.sourceforge.net/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source:         http://downloads.sourceforge.net/project/zynaddsubfx/zynaddsubfx/2.4.4/%{name}-%{version}.tar.xz
Patch0:         zynaddsubfx-buildflags.patch
Patch1:         zynaddsubfx-array-overflow-fix.diff
Patch2:         zynaddsubfx-fix-GPL-license.patch

%description
zynaddsubfx is a many-featured real-time software synthesizer for
Linux.	Features include polyphony and multitimbrel and microtonal
capabilities. It includes randomness of some parameters, which can make
warm sounds, like analog synthesizers.	This program has system and
insertion effects, too.

%package common
Summary:        Common files for ZynAddSubFX synthesizers
Group:          Productivity/Multimedia/Sound/Midi
Provides:       ZynAddSubFX-common = %{version}
Obsoletes:      ZynAddSubFX-common < %{version}
Conflicts:      ZynAddSubFX-common < %{version}
BuildArch:      noarch

%description common
zynaddsubfx is a many-featured real-time software synthesizer for
Linux.	Features include polyphony and multitimbrel and microtonal
capabilities. It includes randomness of some parameters, which can make
warm sounds, like analog synthesizers.	This program has system and
insertion effects, too.

This package includes the common files needed by the implementations of the
synthesizer.

%package dssi
Summary:        Real-time software synthesizer for DSSI
Group:          Productivity/Multimedia/Sound/Midi
Requires:       %{name}-common = %{version}-%{release}
Requires:       dssi

%description dssi
zynaddsubfx is a many-featured real-time software synthesizer for
Linux.	Features include polyphony and multitimbrel and microtonal
capabilities. It includes randomness of some parameters, which can make
warm sounds, like analog synthesizers.	This program has system and
insertion effects, too.

This package includes the DSSI implementation of the synthesizer.

%prep
%setup -q -n %{name}-%{version}
%patch1 -p1
%patch0 -p1
%patch2 -p1

%build
make %{?_smp_mflags} -C ExternalPrograms/Controller
make %{?_smp_mflags} -C ExternalPrograms/Spliter
   %cmake \
      -DDefaultOutput=jack \
%ifarch %{ix86} x86_64
      -DX86Build=ON \
%endif

make %{?_smp_mflags}

%install
make -C build DESTDIR=%{buildroot} install 
%suse_update_desktop_file -r %{name}-alsa AudioVideo Music
%suse_update_desktop_file -r %{name}-jack AudioVideo Music
mkdir -p $RPM_BUILD_ROOT%{_datadir}/zynaddsubfx
cp -a instruments/examples instruments/banks $RPM_BUILD_ROOT%{_datadir}/zynaddsubfx
install -m 0755 ExternalPrograms/Controller/controller $RPM_BUILD_ROOT%{_bindir}/controller
install -m 0755 ExternalPrograms/Spliter/spliter $RPM_BUILD_ROOT%{_bindir}/spliter

# We are including these in the common package below
rm -fr %{buildroot}%{_datadir}/doc/%{name}/

%files
%defattr(-, root, root)
%doc AUTHORS.txt ChangeLog COPYING FAQ.txt HISTORY.txt README.txt
%{_bindir}/*
%{_datadir}/applications/%{name}*.desktop
%{_datadir}/pixmaps/zynaddsubfx.svg

%files common
%defattr(-, root, root)
%doc AUTHORS.txt ChangeLog COPYING FAQ.txt HISTORY.txt README.txt
%{_datadir}/%{name}/

%files dssi
%defattr(-, root, root)
%dir %{_libdir}/dssi
%{_libdir}/dssi/*.so

%changelog
openSUSE Build Service is sponsored by