File ecasound.spec of Package ecasound

# vim: set ts=4 sw=4 et:
# Copyright (c) 2005-2010 oc2pus, 2011 Pascal Bleser
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
# Please submit bugfixes or comments to
%define _lto_cflags %{nil}
%define ruby_sitedir %(ruby -rrbconfig -e 'puts RbConfig::CONFIG["sitelibdir"]')

%{!?python_sitelib:  %global python_sitelib  %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}

Name:           ecasound
Summary:        Multitrack audio processing tool
Version:        2.9.2
Release:        0
License:        GPL-2.0+
Group:          Productivity/Multimedia/Sound/Editors and Convertors
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source:         ecasound-%{version}.tar.xz
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  libtool
BuildRequires:  pkg-config
BuildRequires:  pkgconfig(alsa)
BuildRequires:  pkgconfig(audiofile)
BuildRequires:  pkgconfig(jack)
BuildRequires:  pkgconfig(liblo)
BuildRequires:  pkgconfig(liboil-0.3)
BuildRequires:  pkgconfig(lilv-0)
BuildRequires:  pkgconfig(lv2core)
BuildRequires:  pkgconfig(ncursesw)
BuildRequires:  pkgconfig(python2)
BuildRequires:  pkgconfig(samplerate)
BuildRequires:  pkgconfig(sndfile)
BuildRequires:  readline-devel
BuildRequires:  ruby

Ecasound is a software package designed for multitrack audio
processing. It can be used for simple tasks like audio playback,
recording and format conversions, as well as for multitrack effect
processing, mixing, recording and signal recycling. Ecasound
supports a wide range of audio inputs, outputs and effect
algorithms. Several open-source audio packages, like for instance
ALSA, OSS, mpg123, lame, libaudiofile and MikMod, are directly
supported. One of the advantages of ecasound's chain-based design
is that effects can easily be combined both in series and in
parallel. Oscillators and MIDI-CCs can be used for controlling
effect parameters. Included user-interfaces are ecasound - a
versatile console mode interface, qtecasound - a Qt-based
X-interface and various command-line utils suitable for batch

%package -n libecasound-devel
Summary:        Library header files for ecasound
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}
Requires:       alsa-devel
Requires:       jack-devel
Requires:       libsndfile-devel
Provides:       ecasound-devel = 2.4.5
Obsoletes:      ecasound-devel < 2.4.5

%description -n libecasound-devel
Headers files needed for compiling other programs against ecasound

%package -n python-ecasound
Summary:        Python Bindings to the Ecasound Control Interface
Group:          Development/Libraries/Python
Requires:       %{name} = %{version}
Requires:       python >= %{py_ver}
Provides:       pyecasound = 2.4.5
Obsoletes:      pyecasound < 2.4.5

%description -n python-ecasound
Python bindings to the Ecasound control interface.

%package -n ruby-ecasound
Summary:        Ruby Bindings to the Ecasound Control Interface
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}
Requires:       ruby

%description -n ruby-ecasound
Ruby bindings to the Ecasound control interface.

%package doc
Summary:        Documentation to the Ecasound Control Interface
Group:          Documentation/HTML
Requires:       %{name} = %{version}

%description doc
User documentation for the Ecasound control interface.

%autosetup -p1

autoreconf -fi
%configure \
    --enable-shared \
    --disable-static \
    --disable-arts \
    --disable-oss \
    --disable-osstrigger \
    --with-pic \
    --enable-sys-readline \
    --enable-liboil \
    --enable-liblo \
    --with-python-modules=%{_libdir}/python%{py_ver} \


%make_install ECA_S_RUBY_SITEDIR="%{ruby_sitedir}"

# clean ups
find Documentation -name 'Makefile*' -print -delete
find examples -name 'Makefile*' -o -name 'ecatrimsilence*' -print -delete
rm -fv Documentation/*.1
find %{buildroot} -name "*.la" -print -delete

chmod 644 %{buildroot}%{python_sitearch}/*.py
chmod 644 %{buildroot}%{ruby_sitedir}/%{name}.rb

%fdupes -s %{buildroot}%{_mandir}

%doc examples
%config %{_datadir}/%{name}

%files -n libecasound-devel

%files -n python-ecasound

%files -n ruby-ecasound

%files doc
%doc Documentation/*