Blob Blame History Raw
Name:           audacity
Version:        1.3.2
Release:        13%{?dist}
Summary:        A multitrack audio editor

Group:          Applications/Multimedia
License:        GPL
URL:            http://audacity.sourceforge.net
Source:         http://dl.sf.net/sourceforge/audacity/audacity-src-%{version}.tar.gz
Source1:        audacity.png
# iconv on src/Languages.cpp (ISO Latin-1 to UTF-8)
Patch1:         audacity-1.3.2-languages.patch
# iconv on locale/fr.po (MAC to ISO Latin-1)
Patch2:         audacity-1.3.2-fr.patch
Patch3:         audacity-1.3.2-exportmp3.patch
Patch4:         audacity-1.3.2-destdir.patch
Patch5:         audacity-1.3.2-resample.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  alsa-lib-devel
BuildRequires:  desktop-file-utils
BuildRequires:  expat-devel
BuildRequires:  flac-devel
BuildRequires:  gettext
BuildRequires:  jack-audio-connection-kit-devel
BuildRequires:  ladspa-devel
BuildRequires:  libid3tag-devel
BuildRequires:  libogg-devel
BuildRequires:  libsamplerate-devel
BuildRequires:  libsndfile-devel
BuildRequires:  libvorbis-devel
BuildRequires:  compat-wxGTK26-devel
BuildRequires:  zip
BuildRequires:  zlib-devel
%{?_with_mp3:BuildRequires: libmad-devel}

Requires(post):   shared-mime-info, desktop-file-utils
Requires(postun): shared-mime-info, desktop-file-utils

# Compile options:
# --with mp3          : enable mp3 support


%description
Audacity is a cross-platform multitrack audio editor. It allows you to
record sounds directly or to import Ogg, WAV, AIFF, AU, IRCAM, or MP3
files. It features a few simple effects, all of the editing features
you should need, and unlimited undo. The GUI was built with wxWindows
and the audio I/O currently uses OSS under Linux. Audacity runs on
Linux/*BSD, MacOS, and Windows.

%prep
%setup -q -n %{name}-src-%{version}-beta
%patch1 -p1 -b .languages
%patch2 -p1 -b .fr
%patch3 -p1 -b .exportmp3
%patch4 -p1 -b .destdir
%patch5 -p1 -b .resample

# Substitute occurences of "libmp3lame.so" with "libmp3lame.so.0".
for i in help/wxhelp/audacity.hhk help/wxhelp/exportmp3.htm locale/*.po src/export/ExportMP3.cpp
do
    sed -i -e 's!libmp3lame.so\([^.]\)!libmp3lame.so.0\1!g' $i
done

# Substitute hardcoded /usr/lib paths.
for i in src/AudacityApp.cpp src/export/ExportMP3.cpp
do
    sed -i -e 's!/usr/lib!%{_libdir}!g' $i
done

%ifnarch %{ix86} x86_64
sed -i -e 's!-msse!!' lib-src/soundtouch/source/SoundTouch/Makefile.*
%endif

# for wxGTK26-compat
sed -i -e 's!wx-config!wx-2.6-config!g' configure


%build
%configure --with-help --with-libsndfile=system --without-libresample --with-libsamplerate=system --with-libflac=system --with-ladspa --with-vorbis=system --with-id3tag=system --with-expat=system %{?_with_mp3:--with-libmad=system} 
make


%install
rm -rf ${RPM_BUILD_ROOT}
make DESTDIR=${RPM_BUILD_ROOT} install
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
cp %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/pixmaps

cat > audacity.desktop <<EOF
[Desktop Entry]
Name=Audacity
GenericName=Sound editor
Type=Application
Exec=audacity
Icon=audacity.png
Terminal=false
Comment=A multitrack audio editor
Encoding=UTF-8
MimeType=audio/x-wav;application/ogg;audio/x-aiff;audio/x-aiffc;audio/x-aifc;audio/basic;application/x-audacity-project;
StartupWMClass=Audacity
EOF
rm -f $RPM_BUILD_ROOT%{_datadir}/applications/*
desktop-file-install \
    --vendor fedora \
    --add-category GNOME \
    --add-category AudioVideo \
    --dir $RPM_BUILD_ROOT%{_datadir}/applications \
    audacity.desktop

%{find_lang} %{name}


%clean
rm -rf ${RPM_BUILD_ROOT}


%post
%{_bindir}/update-mime-database %{_datadir}/mime > /dev/null 2>&1 || :
%{_bindir}/update-desktop-database /usr/share/applications > /dev/null 2>&1 || :


%postun
%{_bindir}/update-mime-database %{_datadir}/mime > /dev/null 2>&1 || :
%{_bindir}/update-desktop-database /usr/share/applications > /dev/null 2>&1 || :


%files -f %{name}.lang
%defattr(-,root,root,-)
%{_bindir}/*
%{_datadir}/audacity
%{_mandir}/man*/*
%{_datadir}/applications/*
%{_datadir}/pixmaps/*
%{_datadir}/mime/packages/*
%doc %{_datadir}/doc/*


%changelog
* Sat Feb 24 2007 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.3.2-13
- patch ExportMP3.cpp (MPEG-2 Layer III bitrates resulted in
  broken/empty files)
- convert locale related perl substitutions into patches (safer)
- configure with portaudio/portmixer defaults
- drop category Application from desktop file
- fix the libmp3lame.so.0 subst
- subst _libdir in libmp3lame search 
- use sed instead of perl

* Fri Feb 23 2007 Gerard Milmeister <gemi@bluewin.ch> - 1.3.2-12
- build with wxGTK 2.6 compatibility package

* Sun Feb 18 2007 Gerard Milmeister <gemi@bluewin.ch> - 1.3.2-11.20070106cvs
- added patch for compiling with libsamplerate

* Thu Feb 15 2007 Gerard Milmeister <gemi@bluewin.ch> - 1.3.2-9.20070106cvs
- disable flac for now

* Thu Feb 15 2007 Gerard Milmeister <gemi@bluewin.ch> - 1.3.2-8.20070106cvs
- compile with jack

* Mon Feb  5 2007 Gerard Milmeister <gemi@bluewin.ch> - 1.3.2-7.20070106cvs
- compile with libsamplerate

* Mon Jan 22 2007 Gerard Milmeister <gemi@bluewin.ch> - 1.3.2-6.20070106cvs
- convert french locale to iso-8859-1

* Sat Jan  6 2007 Gerard Milmeister <gemi@bluewin.ch> - 1.3.2-5.20070106cvs
- corrected cvs date

* Sat Jan  6 2007 Gerard Milmeister <gemi@bluewin.ch> - 1.3.2-3.cvs20060106
- update to cvs

* Fri Jan  5 2007 Gerard Milmeister <gemi@bluewin.ch> - 1.3.2-2
- remove -msse flag for ppc

* Fri Jan  5 2007 Gerard Milmeister <gemi@bluewin.ch> - 1.3.2-1
- new version 1.3.2

* Tue Jan  2 2007 Gerard Milmeister <gemi@bluewin.ch> - 1.2.6-1
- new version 1.2.6

* Sat Nov 11 2006 Gerard Milmeister <gemi@bluewin.ch> - 1.2.5-3
- correct mime types in .desktop file
- msse flag only on intel

* Fri Nov  3 2006 Gerard Milmeister <gemi@bluewin.ch> - 1.2.5-2
- remove -msse flag for ppc

* Fri Nov  3 2006 Gerard Milmeister <gemi@bluewin.ch> - 1.2.5-1
- new version 1.2.5

* Mon Aug 28 2006 Gerard Milmeister <gemi@bluewin.ch> - 1.2.4-0.2.b
- Rebuild for FE6

* Fri Mar 17 2006 Michael Schwendt <mschwendt[AT]users.sf.net> - 1.2.4-0.1.b
- Update to 1.2.4b (stable release).
- Follow upstream recommendation and use the GTK+ 1.x wxGTK.
  This is because of various issues with fonts/layout/behaviour.
- Build with compat-wxGTK-devel.
- Modify build section to find wx-2.4-config instead of wx-config.

* Fri May 20 2005 David Woodhouse <dwmw2@infradead.org> - 1.2.3-5
- Bump release number again due to spurious build system failure and
  the fact that the build system seems to be ignoring repeated build
  requests for the previous version.

* Fri May 20 2005 David Woodhouse <dwmw2@infradead.org> - 1.2.3-4
- Add more possible MIME types for ogg which may be seen even though
  they're not standard.

* Thu Apr  7 2005 Gerard Milmeister <gemi@bluewin.ch> - 1.2.3-3
- Build gtk2 version by default

* Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
- rebuilt

* Tue Apr  5 2005 Gerard Milmeister <gemi@bluewin.ch> - 1.2.3-2
- Rebuild to pick a new FLAC dependencies

* Sat Nov 20 2004 Gerard Milmeister <gemi@bluewin.ch> - 0:1.2.3-1
- New Version 1.2.3

* Sat Oct 30 2004 Michael Schwendt <mschwendt[AT]users.sf.net> - 0:1.2.2-0.fdr.1
- Update to 1.2.2, patch aboutdialog to be readable with wxGTK.

* Mon May 10 2004 Gerard Milmeister <gemi@bluewin.ch> - 0:1.2.1-0.fdr.1
- New Version 1.2.1

* Sun Apr 11 2004 Gerard Milmeister <gemi@bluewin.ch> - 0:1.2.0-0.fdr.2
- Fix for Language.cpp restored

* Tue Mar  2 2004 Gerard Milmeister <gemi@bluewin.ch> - 0:1.2.0-0.fdr.1
- New Version 1.2.0

* Mon Nov 24 2003 Gerard Milmeister <gemi@bluewin.ch> - 0:1.2.0-0.fdr.4.pre3
- Added icon
- Separated mp3 plugin

* Sun Nov 23 2003 Gerard Milmeister <gemi@bluewin.ch> - 0:1.2.0-0.fdr.2.pre3
- Changes to specfile

* Sun Nov  2 2003 Gerard Milmeister <gemi@bluewin.ch> - 0:1.2.0-0.fdr.1.pre3
- New upstream version 1.2.0-pre3

* Sat Oct 25 2003 Gerard Milmeister <gemi@bluewin.ch> - 0:1.2.0-pre2.fdr.1
- First Fedora release