# comment out when not pre-release #define prel rc2 %define fversion %{version} %define rel 2 %define wxver 3.0.4 %define wxvershort 3.0 %define use_builtin_wxgtk 1 %{?_with_builtin_wxgtk: %global use_builtin_wxgtk 1} %{?_without_builtin_wxgtk: %global use_builtin_wxgtk 0} Summary: Free Audio Editor With Effects/Analysis Tools Name: audacity Version: 2.3.2 Release: %mkrel %{?prel:0.%prel.}%{rel} License: GPLv2+ Group: Sound/Editors and Converters URL: http://audacityteam.org/ Source0: https://www.fosshub.com/Audacity.html/%{name}-minsrc-%{fversion}%{?prel}.tar.xz %if %{use_builtin_wxgtk} # get WX_3_0_3_BRANCH from here: https://github.com/wxWidgets/wxWidgets.git Source1: https://github.com/wxWidgets/wxWidgets/releases/download/v%{wxver}/wxWidgets-%{wxver}.tar.bz2 %endif #gw use Alsa by default Patch6: audacity-2.0.4-alsa-by-default.patch # Patch from Ubuntu Patch1007: audacity-2.1.2-workaround-wxwidgets-fit-recovery.patch # [gghibo] Make enough room in the widgets for the text Patch1008: audacity-2.3.2-wxwidgets-fix-gui-pitch.patch Patch1009: audacity-2.3.2-wxwidgets-fix-gui-projectrate.patch BuildRequires: autoconf BuildRequires: fftw-devel >= 2.1.4 BuildRequires: gettext-devel BuildRequires: imagemagick BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(flac++) BuildRequires: pkgconfig(jack) BuildRequires: pkgconfig(id3tag) BuildRequires: pkgconfig(libjpeg) BuildRequires: pkgconfig(mad) BuildRequires: pkgconfig(ogg) BuildRequires: cmake BuildRequires: pkgconfig(samplerate) BuildRequires: pkgconfig(sndfile) BuildRequires: pkgconfig(vorbis) BuildRequires: pkgconfig(soundtouch) >= 1.3.0 BuildRequires: pkgconfig(speex) BuildRequires: pkgconfig(twolame) BuildRequires: wxgtku3.0-devel BuildRequires: pkgconfig(zlib) BuildRequires: vamp-plugin-sdk-devel BuildRequires: pkgconfig(expat) BuildRequires: ffmpeg-devel BuildRequires: portaudio-devel BuildRequires: pkgconfig(lv2) BuildRequires: pkgconfig(suil-0) BuildRequires: pkgconfig(lilv-0) #for compressing the help file: BuildRequires: zip %if %{use_builtin_wxgtk} BuildRequires: bakefile BuildRequires: pkgconfig(libjpeg) BuildRequires: pkgconfig(libtiff-4) BuildRequires: pkgconfig(expat) BuildRequires: pkgconfig(cppunit) BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(glu) BuildRequires: pkgconfig(gstreamer-1.0) BuildRequires: pkgconfig(gstreamer-plugins-base-1.0) BuildRequires: pkgconfig(gtk+-3.0) BuildRequires: pkgconfig(libmspack) BuildRequires: pkgconfig(libnotify) >= 0.7 BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(sm) BuildRequires: pkgconfig(xxf86vm) BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(gtk+-3.0) %else BuildRequires: wxgtk-devel %endif Recommends: %mklibname lame 0 Provides: bundled(portaudio) = 19 %if %{use_builtin_wxgtk} Provides: bundled(wxgtk) = 3.0.3.1 %endif %description Audacity is a program that lets you manipulate digital audio waveforms. In addition to letting you record sounds directly from within the program, it imports many sound file formats, including WAV, AIFF, MP3 and Ogg/Vorbis. It supports all common editing operations such as Cut, Copy, and Paste, plus it will mix tracks and let you apply plug-in effects to any part of a sound. It also has a built-in amplitude envelope editor, a customizable spectrogram mode and a frequency analysis window for audio analysis applications. %prep %if %{use_builtin_wxgtk} %setup -q -n %{name}-minsrc-%{fversion} -a 1 %else %setup -q -n %{name}-minsrc-%{fversion} %endif %patch6 -p1 -b .alsa-by-default %patch1007 -p1 -b .fit %patch1008 -p1 -b .pitch %patch1009 -p1 -b .rate chmod 644 *.txt #make autoreconf happy mkdir -p lib-src/{expat,libid3tag,libmad,soundtouch,libogg,libvorbis,libflac} # fix build on aarch64 for d in $(find . -name "config.sub");do cp -af %{_rpmconfigdir}/config.{guess,sub} $(dirname $d) done %build autoreconf -vfi pushd lib-src/lib-widget-extra autoreconf -vfi popd %if %{use_builtin_wxgtk} (cd wxWidgets-%{wxver} aclocal --force -I $PWD/build/aclocal autoconf -f libtoolize --copy --force CFLAGS="%{optflags} -fno-strict-aliasing" \ CXXFLAGS="%{optflags} -fno-strict-aliasing" \ ./configure \ --prefix=$PWD/../%{name}_binlibs \ --with-gtk=3 \ --disable-shared \ --enable-monolithic \ --with-libpng=sys \ --with-libjpeg=sys \ --with-libtiff=sys \ --with-zlib=sys \ --with-expat=sys \ --with-regex=builtin \ --with-libmspack make -j $(nproc) make install ) %endif %if %{use_builtin_wxgtk} export PATH=$PWD/%{name}_binlibs/bin:$PATH %endif %configure2_5x \ %if %{use_builtin_wxgtk} --enable-static-wx --with-wx-version=%{wxvershort} \ %endif --enable-unicode \ --with-ffmpeg=system \ --disable-dynamic-loading \ --with-vorbis=system \ --with-libmad=system \ --with-libsndfile=system \ --with-id3tag=system \ --with-soundtouch=system \ --with-portaudio=local \ --with-lv2=system \ %ifnarch %ix86 x86_64 --enable-sse=no \ %endif --with-libtwolame=system %make_build %install %make_install %find_lang %{name} #clean uneeded installed but not packaged rm -rf %{buildroot}%{_docdir}/* #gw work around bug #52526 mkdir -p %{buildroot}%{_datadir}/%{name}/help/manual %files -f %{name}.lang %{_bindir}/* %{_datadir}/%{name}/ %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/*/apps/%{name}.* %{_datadir}/pixmaps/* %{_datadir}/mime/packages/%{name}.xml %{_mandir}/man1/%{name}.1* %{_datadir}/appdata/audacity.appdata.xml