File linuxsampler.spec of Package linuxsampler

# spec file for package linuxsampler
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2012 Pascal Bleser <>
# 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

%define sover	6
Name:           linuxsampler
Version:        2.2.0
Release:        0
Summary:        Modular, streaming capable sampler
License:        GPL-2.0-or-later
Group:          Productivity/Multimedia/Sound/Utilities
Source1:        linuxsampler.png
%if 0%{?suse_version} == 1500
BuildRequires:  gcc9-c++
BuildRequires:  gcc-c++
BuildRequires:  alsa-devel >= 1.0.9
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  bison
BuildRequires:  dos2unix
BuildRequires:  doxygen
BuildRequires:  dssi-devel
BuildRequires:  flex
BuildRequires:  libtool
BuildRequires:  perl-XML-Parser
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(gig) >= 4.2.0
BuildRequires:  pkgconfig(jack)
BuildRequires:  pkgconfig(sndfile) >= 1.0
BuildRequires:  pkgconfig(sqlite3) >= 3.3
Requires:       alsa >= 1.0.9
Requires:       jack >= 0.103
Conflicts:      nilfs-utils
ExclusiveArch:  %{ix86} x86_64
BuildRequires:  pkgconfig(lv2) >= 1.0.0

LinuxSampler is a work in progress. The goal is to produce a free,
open source pure software audio sampler with professional grade
features, comparable to both hardware and commercial Windows/Mac
software samplers and to introduce new features not yet available
by any other sampler in the world.

LinuxSampler was designed as a sampler backend, decoupled from any
user interface. It provides a network interface using an ASCII based
protocol called LSCP for full control of the sampler like for setup
and altering sampler sessions. But don't be afraid, with QSampler we
already have a convenient GUI frontend (based on the cross-platform
GUI library Qt) for LinuxSampler and due to the decoupled design you
can even control the sampler with the GUI frontend from another
computer, probably even running another OS like Windows or OSX.
Beside our own custom network control layer we planned to add
existing ones as well (e.g. OSC). With the planned SMP and cluster
support LinuxSampler might become a standard for high-end studios
and concerts.

It is planned to support all common sampler formats in LinuxSampler,
but at the moment we chose to concentrate on the Gigasampler format,
because we think it's currently the best sampler format in regards
of quality and power, especially for the synthesis of natural
instruments like pianos, brass and bowed instruments.
But we already made good advance in implementing this format, so we
are optimistic to start with adding other formats soon. Beside that
we also planned to design our own, sophisticated sampler format to
introduce a more powerful and more flexible sampler format compared
to any sampler format currently available in the world. Be encouraged
to share your ideas about such a new format with us!

%package -n liblinuxsampler%{sover}
Summary:        Shared libraries for linuxsampler
Group:          System/Libraries

%description -n liblinuxsampler%{sover}
This package contains the shared libraries for linuxsampler.

%package -n liblinuxsampler-devel
Summary:        Development files for linuxsampler
Group:          Development/Languages/C and C++
Requires:       dssi-devel
Requires:       ladspa-devel
Requires:       liblinuxsampler%{sover} = %{version}

%description -n liblinuxsampler-devel
This package contains header files, libraries and documentation for
writing and compiling programs using linuxsampler.

%package doc
Summary:        Documentation for linuxampler
Group:          Documentation/HTML

%description doc
This package contains the documentation for linuxampler.

%package -n dssi-linuxsampler
Summary:        DSSI plugin
Group:          System/Libraries
Requires:       dssi

%description -n dssi-linuxsampler
This package contains the dssi-plugin for package linuxsampler.

%package -n lv2-linuxsampler
Summary:        LV2 plugin
Group:          System/Libraries

%description -n lv2-linuxsampler
This package contains the lv2-plugin for package linuxsampler.

%autosetup -p1
dos2unix Documentation/lscp.xml

rm -fv src/network/lscpparser.cpp
test -x "$(type -p gcc)"    && CC="$_"
test -x "$(type -p g++)"    && CXX="$_"
test -x "$(type -p gcc-9)" && CC="$_"
test -x "$(type -p g++-9)" && CXX="$_"
export CC="$(readlink -f ${CC})"
export CXX="$(readlink -f ${CXX})"
%configure \
    --disable-static \
    --disable-arts-driver \
    --enable-plugin-dir="%{_libexecdir}/%{name}/plugins" \
    --enable-signed-triang-algo=intmath \
    --enable-unsigned-triang-algo=intmath \



# icon and menu-entry
install -dm 755 %{buildroot}%{_datadir}/pixmaps
install -m 644 %{SOURCE1} \

cat > %{name}.desktop << EOF
[Desktop Entry]
Comment=LinuxSampler - modular, streaming capable sampler
Comment[de]=LinuxSampler - modularer, streaming faehiger sampler
%if 0%{?suse_version}
%suse_update_desktop_file -n -i %{name} AudioVideo Sequencer
mkdir %{buildroot}%{_datadir}/applications
cp %{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop

touch src/engines/InstrumentEditor.h
touch src/engines/InstrumentEditorFactory.h
make docs

find %{buildroot} -type f -name "*.la" -delete -print
rm Documentation/Engines/gig/Makefile*

install -d "%{buildroot}%{_usr}/lib/%{name}/plugins"

mkdir -p %{buildroot}%{_sysconfdir}/
  echo "%{_libdir}/%{name}" > "%{buildroot}%{_sysconfdir}/{sover}.conf"

%post   -n liblinuxsampler%{sover} -p /sbin/ldconfig
%postun -n liblinuxsampler%{sover} -p /sbin/ldconfig

%license COPYING
%dir %{_usr}/lib/%{name}
%dir %{_usr}/lib/%{name}/plugins
%dir %{_var}/lib/%{name}

%files -n liblinuxsampler%{sover}
%dir %{_libdir}/%{name}
%config %{_sysconfdir}/{sover}.conf

%files -n liblinuxsampler-devel
%dir %{_libdir}/%{name}

%files doc
%doc Documentation/*

%files -n dssi-linuxsampler
%dir %{_libdir}/dssi

%files -n lv2-linuxsampler
%dir %{_libdir}/lv2
%dir %{_libdir}/lv2/%{name}.lv2