File ffado.spec of Package ffado

#
# spec file for package ffado (Version 2.0.1)
#
# Copyright (c) 2010 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/
#

# norootforbuild

# The python_sitelib macro doesn't seem to be available in 11.1 and 11.0
%if 0%{?suse_version} < 1120
%define python_sitelib %{_libexecdir}/python%{py_ver}/site-packages
%endif

Name:           ffado
%define tname libffado
Version:        2.0.1
Release:        1
License:        GPLv2+
Group:          Productivity/Multimedia/Other
Summary:        FireWire 1394 support for audio devices, svn snapshot
Url:            http://www.ffado.org/
Source0:        %{tname}-%{version}.tar.bz2
Source1:        baselibs.conf
Source2:        ChangeLog
#Source3:        %{_svn}.log
BuildRequires:  libavc1394-devel libraw1394-devel >= 1.3.0 libxml++-devel scons
BuildRequires:  doxygen libexpat-devel pkg-config update-desktop-files xdg-utils
BuildRequires:  alsa-devel dbus-1-devel >= 1.0 fdupes gcc-c++ libiec61883-devel >= 1.1.0
BuildRequires:  dbus-1-python-devel graphviz-gnome xorg-x11-fonts
Requires:       libffado2 = %{version}-%{release}
BuildRoot:      %{_tmppath}/%{tname}-%{version}-build
%{py_requires}

%description
FFADO aims to provide a generic, open-source solution
to support FireWire(IEEE1394, iLink) based (semi-)
professional audio interfaces.
It's the successor of the FreeBoB project. FFADO is a
volunteer-based community effort, trying to provide Linux
with at least the same level of functionality that is
present on the other operating systems.
The range of FireWire Audio Devices that we would like
to support is broad: from pure audio interfaces over
mixed audio-control devices to DSP algorithm devices.
This is a snapshot of svn revision 1855

%package -n libffado-devel
License:        GPLv2+
Summary:        Development files for ffado
Group:          Development/Libraries/C and C++
Requires:       libffado2 = %{version} glibc-devel

%description -n libffado-devel
This package supplys the files necessary to develop
applications that use the FFADO libraries and api.

%package -n libffado2
License:        GPLv2+
Summary:        FireWire 1394 support for audio devices
Group:          System/Libraries

%description -n libffado2
This package provides the libffado shared library that
provides a unified programming interface to configure and
use all supported devices. Currently this library is used
by the 'firewire' backends of the jack audio connection kit
sound server. This backend provides audio and midi support,
and is available in jackd. Access to the device internal
configuration (e,g, internal mixer) is exposed using the
ffado-dbus-server daemon. This daemon exposes the
configurable parameters of all detected devices through
DBUS. The ffadomixer application in support/mixer presents
a GUI to control these parameters (only for officially
supported devices).

%package doc
License:        GPLv2+
Summary:        API documentation for ffado
Group:          Documentation/HTML
%if 0%{?suse_version} >= 1120
BuildArch:      noarch
%endif

%description doc
This package contains the libffado API documentation.

%prep
%setup -n %{tname}-%{version} -q

%build
scons %{?jobs:--jobs=%jobs} \
  PREFIX=%{_prefix} \
  LIBDIR=%{_libdir} \
  ENABLE_GENERICAVC=yes \
  SERIALIZE_USE_EXPAT=no \
  DEBUG=no \
  ENABLE_ALL=yes \
  PYPKGDIR=%{python_sitelib} \
  ENABLE_OPTIMIZATIONS=yes \
  BUILD_TESTS=yes \
  COMPILE_FLAGS="%{optflags} -fno-strict-aliasing -ggdb"

%install
rm -rf %{buildroot}
scons   DESTDIR=%{buildroot} \
  install
#mv %{buildroot}%{_datadir}/%{tname}/icons %{buildroot}%{_datadir}/

# Build API documentation
export top_srcdir=$PWD
pushd doc
doxygen -u reference.doxygen.in
doxygen reference.doxygen.in
mkdir -p %{buildroot}%{_docdir}/%{name}
cp -r reference %{buildroot}%{_docdir}/%{name}
popd

chmod 755 %{buildroot}%{_datadir}/%{tname}/python/ffado_diag_helpers.py
chmod 755 %{buildroot}%{_datadir}/%{tname}/python/helpstrings.py

cp %{S:2} ./
#cp %{S:3} ./
# NEWS and TODO are zero length
find ./ -empty -delete
%fdupes -s %{buildroot}%{_datadir}

%clean
rm -rf %buildroot

%post -n libffado2 -p /sbin/ldconfig

%postun -n libffado2 -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc README AUTHORS ChangeLog LICENSE.GPLv2 LICENSE.GPLv3
%{_bindir}/ffado*
%{_datadir}/%{tname}

%files -n libffado-devel
%defattr(-,root,root)
%dir %{_includedir}/%{tname}
%{_includedir}/%{tname}/*.h
%{_libdir}/%{tname}*.so
%{_libdir}/pkgconfig/%{tname}.pc
#%{_datadir}/applnk/ffado.org-ffadomixer.desktop

%files -n libffado2
%defattr(-,root,root)
%{_libdir}/%{tname}.so.2*

%files doc
%defattr(-,root,root)
%{_docdir}/%{name}

%changelog
openSUSE Build Service is sponsored by