File audacity.spec of Package audacity

#
# spec file for package audacity (Version 1.3.9)
#
# Copyright (c) 2009 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/
#


%bcond_with ffmpeg
%bcond_with mad
%bcond_with twolame

Name:           audacity
# we use internal PortAudio(so not included in BuildRequires), because audacity team grab sources 
# from Portaudio's svn more frequently than we (e.g. see support for non-mmap devices like pulseaudio)
BuildRequires:  flac-devel gcc-c++ glib-devel jack-devel libexpat-devel
BuildRequires:  libid3tag-devel libsamplerate-devel libsndfile-devel
BuildRequires:  libvorbis-devel soundtouch-devel update-desktop-files
BuildRequires:  alsa-devel taglib-devel wxGTK-devel
#vamp-plugin-sdk-devel is available since openSUSE 11.2
%if %suse_version > 1110
BuildRequires:  vamp-plugin-sdk-devel
%endif
%if %{with ffmpeg}
BuildRequires:  libffmpeg-devel
%endif
%if %{with mad}
BuildRequires:  libmad-devel
%endif
%if %{with twolame}
BuildRequires:  libtwolame-devel
%endif
Summary:        A Free, Cross-Platform Digital Audio Editor
Version:        1.3.9
Release:        1
License:        GPL v2 or later
Group:          Productivity/Multimedia/Sound/Editors and Convertors
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Url:            http://audacity.sourceforge.net/
Source:         %{name}-minsrc-%{version}.tar.bz2
Source2:        %{name}.png
#PATCH-FIX-UPSTREAM GSocket from wxGTK conflict with GSocket from glib2 - fix taken from Fedora
Patch1:         %{name}-%{version}-gsocket-conflict.patch
Patch5:         %{name}-%{version}-retval.patch
Patch12:        %{name}-%{version}-audiodevdefaults.patch

%description
Audacity is a program that manipulates digital audio wave forms. In
addition to recording sounds directly from within the program, it
imports many sound file formats, including WAV, AIFF, AU, IRCAM, MP,
and Ogg Vorbis.  With Audacity, you can edit wave data larger than the
physical memory size of your computer.



Authors:
--------
    Dominic Mazzoni <dominic@minorninth.com>
    Roger Dannenberg <rbd+@cs.cmu.edu>
    Jason Cohen <cohen3+@andrew.cmu.edu>
    Robert Leidle <rfl+@andrew.cmu.edu>
    Mark Tomlinson <marktoml@hotmail.com>
    Joshua Haberman <joshua@haberman.com>
    Nasca Octavian Paul <paulnasca@email.ro>
    Logan Lewis <proxima@proxc.com>
    Matt Brubeck <mbrubeck@hmc.edu>
    Mark Phillips <mitb@totaldeath.com>
    Tony Oetzmann <airon@epost.de>
    Harvey Lubin <agrapha@agrapha.com>
    Tom Woodhams <tom@imaginemedia.co.uk>

%prep
%setup -q -n %{name}-src-%{version}
%patch1 -p1
%patch5
%patch12 -p1

%build
%{?suse_update_config:%{suse_update_config -f . lib-src/*/.}}
export AUTOMAKE="automake --foreign"
%configure \
    --enable-unicode \
    --with-libvorbis=system \
%if %{with ffmpeg}
    --with-ffmpeg=system \
%else
    --without-ffmpeg \
%endif
%if %{with mad}
    --with-libmad=system \
%else
    --without-libmad \
%endif
%if %{with twolame}
    --with-libtwolame=system \
%else
    --without-libtwolame \
%endif
    --with-libsndfile=system \
    --with-libflac=system \
    --with-ladspa \
    --with-libid3tag=system \
    --with-libsamplerate=system
make %{?jobs:-j %jobs}

%install
make DESTDIR=$RPM_BUILD_ROOT install
%suse_update_desktop_file audacity
install -d -m755 $RPM_BUILD_ROOT%{_datadir}/pixmaps
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/pixmaps
# fix permission error on startup (help dir couldn't be created, should be fixed in next release)
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/help/manual
# we will add docs later in %files section
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/audacity
%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%files -f %{name}.lang
%defattr(-,root,root)
%doc LICENSE.txt README.txt
%doc %{_mandir}/man?/*
%{_bindir}/audacity
%{_datadir}/audacity
%{_datadir}/applications/*.desktop
%{_datadir}/pixmaps/*.png
%{_datadir}/mime/packages/audacity.xml

%changelog
openSUSE Build Service is sponsored by