1 |
# comment out when not pre-release |
2 |
#define prel rc2 |
3 |
|
4 |
# rel for bumping |
5 |
%define rel 1 |
6 |
|
7 |
%define wxver 3.1.3 |
8 |
%define wxvershort 3.1 |
9 |
|
10 |
%define use_builtin_wxgtk 0 |
11 |
%{?_with_builtin_wxgtk: %global use_builtin_wxgtk 1} |
12 |
%{?_without_builtin_wxgtk: %global use_builtin_wxgtk 0} |
13 |
|
14 |
# use system portaudio (without) or bundled's one (with) |
15 |
%bcond_without portaudio |
16 |
|
17 |
# use system lv2 (without) or bundled's one (with) |
18 |
%bcond_without lv2 |
19 |
|
20 |
Summary: Free Audio Editor With Effects/Analysis Tools |
21 |
Name: audacity |
22 |
Version: 3.2.2 |
23 |
Release: %mkrel %{?prel:0.%prel.}%{rel} |
24 |
License: GPLv2+ |
25 |
Group: Sound/Editors and Converters |
26 |
URL: https://www.audacityteam.org/ |
27 |
Source0: https://github.com/audacity/audacity/releases/download/Audacity-%{version}/audacity-sources-%{version}.tar.gz |
28 |
|
29 |
%if %{use_builtin_wxgtk} |
30 |
# get from here: https://github.com/wxWidgets/wxWidgets.git with: |
31 |
# git clone --recurse-submodules https://github.com/audacity/wxWidgets/ |
32 |
Source1: https://github.com/wxWidgets/wxWidgets/releases/download/v%{wxver}/wxWidgets-%{wxver}.tar.bz2 |
33 |
%endif |
34 |
|
35 |
# add missed revision ident (to be derived from git) |
36 |
# use: |
37 |
# cd src; git show -s --format="#define REV_LONG \"%H\"%n#define REV_TIME \"%cd\"%n" | tee ../src/RevisionIdent.h |
38 |
Patch8: audacity-3.0.0-provide-missed-RevisionIdent.patch |
39 |
# Fix libmp3lame detection from cmake |
40 |
Patch11: audacity-2.4.2-fix-libmp3lame-as-system.patch |
41 |
# Fix portmidi detection from cmake |
42 |
Patch12: audacity-3.0.0-fix-portmidi-as-system.patch |
43 |
# runtime path fix |
44 |
Patch14: audacity-install-rpath.patch |
45 |
# module locations fix |
46 |
Patch15: audacity-module-location.patch |
47 |
# add aup3 file format to MIME types |
48 |
Patch16: audacity-aup3-mime-type.patch |
49 |
# cosmetic: switch default theme to dark |
50 |
Patch20: audacity-2.4.2-default-theme-dark.patch |
51 |
|
52 |
Patch21: audacity-strip.patch |
53 |
|
54 |
BuildRequires: autoconf |
55 |
BuildRequires: cmake >= 1:3.15 |
56 |
BuildRequires: fftw-devel >= 2.1.4 |
57 |
BuildRequires: gettext-devel |
58 |
BuildRequires: imagemagick |
59 |
BuildRequires: ninja |
60 |
BuildRequires: pkgconfig(alsa) |
61 |
BuildRequires: pkgconfig(flac++) |
62 |
BuildRequires: pkgconfig(jack) |
63 |
BuildRequires: pkgconfig(id3tag) |
64 |
BuildRequires: pkgconfig(libjpeg) |
65 |
BuildRequires: pkgconfig(libmpg123) |
66 |
BuildRequires: pkgconfig(mad) |
67 |
BuildRequires: pkgconfig(ogg) |
68 |
BuildRequires: pkgconfig(samplerate) |
69 |
BuildRequires: pkgconfig(sndfile) |
70 |
BuildRequires: pkgconfig(soundtouch) >= 1.3.0 |
71 |
BuildRequires: pkgconfig(soxr) |
72 |
BuildRequires: pkgconfig(speex) |
73 |
BuildRequires: pkgconfig(sqlite3) |
74 |
BuildRequires: pkgconfig(twolame) |
75 |
BuildRequires: pkgconfig(vamp) |
76 |
BuildRequires: pkgconfig(vorbis) |
77 |
BuildRequires: pkgconfig(wavpack) |
78 |
BuildRequires: pkgconfig(zlib) |
79 |
BuildRequires: pkgconfig(expat) |
80 |
BuildRequires: ffmpeg-devel |
81 |
BuildRequires: portmidi-devel |
82 |
%if %{with portaudio} |
83 |
BuildRequires: pkgconfig(portaudio-2.0) |
84 |
%endif |
85 |
%if %{with lv2} |
86 |
BuildRequires: pkgconfig(lv2) > 1.16.0 |
87 |
%endif |
88 |
BuildRequires: pkgconfig(suil-0) |
89 |
BuildRequires: pkgconfig(lilv-0) |
90 |
#for compressing the help file: |
91 |
BuildRequires: zip |
92 |
|
93 |
%if %{use_builtin_wxgtk} |
94 |
BuildRequires: bakefile |
95 |
BuildRequires: pkgconfig(libjpeg) |
96 |
BuildRequires: pkgconfig(libtiff-4) |
97 |
BuildRequires: pkgconfig(expat) |
98 |
BuildRequires: pkgconfig(cppunit) |
99 |
BuildRequires: pkgconfig(gl) |
100 |
BuildRequires: pkgconfig(glu) |
101 |
BuildRequires: pkgconfig(gstreamer-1.0) |
102 |
BuildRequires: pkgconfig(gstreamer-plugins-base-1.0) |
103 |
BuildRequires: pkgconfig(gtk+-3.0) |
104 |
BuildRequires: pkgconfig(libmspack) |
105 |
BuildRequires: pkgconfig(libnotify) >= 0.7 |
106 |
BuildRequires: pkgconfig(libpng) |
107 |
BuildRequires: pkgconfig(sm) |
108 |
BuildRequires: pkgconfig(xxf86vm) |
109 |
BuildRequires: pkgconfig(zlib) |
110 |
BuildRequires: pkgconfig(gtk+-3.0) |
111 |
%else |
112 |
BuildRequires: wxgtk-devel >= 3.1.3 |
113 |
%endif |
114 |
BuildRequires: nasm |
115 |
BuildRequires: lame-devel |
116 |
# |
117 |
# Required by virtual:world of local lv2 |
118 |
%if %{without lv2} |
119 |
BuildRequires: pkgconfig(gtk+-x11-2.0) |
120 |
BuildRequires: pkgconfig(gtk+-x11-3.0) |
121 |
BuildRequires: pkgconfig(Qt5Core) |
122 |
BuildRequires: pkgconfig(QtGui) |
123 |
BuildRequires: pkgconfig(Qt5Widgets) |
124 |
%endif |
125 |
|
126 |
Recommends: %mklibname lame 0 |
127 |
|
128 |
%if %{without portaudio} |
129 |
Provides: bundled(portaudio) = 19 |
130 |
%endif |
131 |
%if %{use_builtin_wxgtk} |
132 |
Provides: bundled(wxgtk) = 3.1.3 |
133 |
%endif |
134 |
|
135 |
|
136 |
%description |
137 |
Audacity is a program that lets you manipulate digital audio waveforms. |
138 |
|
139 |
In addition to letting you record sounds directly from within the program, |
140 |
it imports many sound file formats, including WAV, AIFF, MP3 and Ogg/Vorbis. |
141 |
It supports all common editing operations such as Cut, Copy, and Paste, plus |
142 |
it will mix tracks and let you apply plug-in effects to any part of a sound. |
143 |
It also has a built-in amplitude envelope editor, a customizable spectrogram |
144 |
mode and a frequency analysis window for audio analysis applications. |
145 |
|
146 |
%prep |
147 |
%if %{use_builtin_wxgtk} |
148 |
%setup -q -n audacity-sources-%{version} -a 1 |
149 |
%else |
150 |
%setup -q -n audacity-sources-%{version} |
151 |
%endif |
152 |
|
153 |
%patch8 -p1 -b .revision-ident |
154 |
|
155 |
# fix detection of libmp3lame |
156 |
%patch11 -p1 -b .pkgconfig |
157 |
|
158 |
# fix detection of portmidi |
159 |
%patch12 -p1 -b .pkg_midi |
160 |
|
161 |
# fix RPATH |
162 |
%patch14 -p1 |
163 |
|
164 |
# fix module search path |
165 |
%patch15 -p1 |
166 |
|
167 |
# aup3 mime type |
168 |
%patch16 -p1 |
169 |
|
170 |
# use dark theme as default |
171 |
%patch20 -p1 -b .dark |
172 |
|
173 |
# don't strip debug info during the build |
174 |
%patch21 -p1 |
175 |
|
176 |
chmod 644 *.txt |
177 |
|
178 |
# remove -Wl,--disable-new-dtags from linker flags to |
179 |
# replace RPATH with RUNPATH |
180 |
sed -i -e '/disable-new-dtags/d' src/CMakeLists.txt |
181 |
|
182 |
%build |
183 |
%if %{use_builtin_wxgtk} |
184 |
(cd wxWidgets-%{wxver} |
185 |
aclocal --force -I $PWD/build/aclocal |
186 |
autoconf -f |
187 |
libtoolize --copy --force |
188 |
CFLAGS="%{optflags} -fno-strict-aliasing" \ |
189 |
CXXFLAGS="%{optflags} -fno-strict-aliasing" \ |
190 |
./configure \ |
191 |
--prefix=$PWD/../%{name}_binlibs \ |
192 |
--with-gtk=3 \ |
193 |
--disable-shared \ |
194 |
--enable-monolithic \ |
195 |
--with-libpng=sys \ |
196 |
--with-libjpeg=sys \ |
197 |
--with-libtiff=sys \ |
198 |
--with-zlib=sys \ |
199 |
--with-expat=sys \ |
200 |
--with-regex=builtin \ |
201 |
--with-libmspack |
202 |
make -j $(nproc) |
203 |
make install |
204 |
) |
205 |
%endif |
206 |
|
207 |
%if %{use_builtin_wxgtk} |
208 |
export PATH=$PWD/%{name}_binlibs/bin:$PATH |
209 |
%endif |
210 |
|
211 |
# list of cmake options: |
212 |
# https://wiki.audacityteam.org/wiki/CMake_Options#Lin |
213 |
# |
214 |
# other instructions: |
215 |
# https://wiki.audacityteam.org/wiki/Building_On_Linux |
216 |
|
217 |
# fix system lame detection |
218 |
export PKG_CONFIG_PATH=$(pwd):$PKG_CONFIG_PATH |
219 |
|
220 |
export CXXFLAGS="%{build_cxxflags} -Wno-deprecated-declarations" |
221 |
|
222 |
%cmake -GNinja \ |
223 |
-DCMAKE_INSTALL_LIBDIR=%{_lib} \ |
224 |
-Daudacity_use_pch=off \ |
225 |
-Daudacity_conan_enabled=off \ |
226 |
-Daudacity_conan_allow_prebuilt_binaries=no \ |
227 |
-Daudacity_obey_system_dependencies=yes \ |
228 |
-Daudacity_lib_preference=system \ |
229 |
%if %{use_builtin_wxgtk} |
230 |
-Daudacity_use_wxwidgets=local \ |
231 |
%endif |
232 |
-Daudacity_use_ffmpeg=loaded \ |
233 |
%if ! %{with portaudio} |
234 |
-Daudacity_use_portaudio=local \ |
235 |
%endif |
236 |
%if ! %{with lv2} |
237 |
-Daudacity_use_lv2=local \ |
238 |
%endif |
239 |
-Daudacity_use_portsmf=local \ |
240 |
-Daudacity_use_sbsms=local \ |
241 |
%ifarch %ix86 |
242 |
-DHAVE_SSE=OFF \ |
243 |
-DHAVE_SSE2=OFF \ |
244 |
%endif |
245 |
-Daudacity_has_vst3=no |
246 |
|
247 |
%cmake_build |
248 |
|
249 |
%install |
250 |
%cmake_install |
251 |
|
252 |
# fix rights |
253 |
chmod 755 %{buildroot}%{_libdir}/audacity/{,modules/}*.so |
254 |
|
255 |
%find_lang %{name} |
256 |
|
257 |
#install mime-type icon for .aup files (mga#27644) |
258 |
mkdir -p %{buildroot}%{_iconsdir}/hicolor/scalable/mimetypes/ |
259 |
ln -s ../apps/audacity.svg %{buildroot}%{_iconsdir}/hicolor/scalable/mimetypes/application-x-audacity-project.svg |
260 |
|
261 |
#clean uneeded installed but not packaged |
262 |
rm -rf %{buildroot}%{_docdir}/* |
263 |
rm -rf %{buildroot}%{_prefix}/audacity |
264 |
|
265 |
#gw work around bug #52526 |
266 |
mkdir -p %{buildroot}%{_datadir}/%{name}/help/manual |
267 |
|
268 |
%files -f %{name}.lang |
269 |
%{_bindir}/* |
270 |
%dir %{_libdir}/%{name}/ |
271 |
%{_libdir}/%{name}/*.so |
272 |
%dir %{_libdir}/%{name}/modules/ |
273 |
%{_libdir}/%{name}/modules/*.so |
274 |
%{_datadir}/%{name}/ |
275 |
%{_datadir}/applications/%{name}.desktop |
276 |
%{_datadir}/icons/hicolor/scalable/*/*.svg |
277 |
%{_datadir}/icons/hicolor/*/%{name}.png |
278 |
%{_datadir}/pixmaps/* |
279 |
%{_datadir}/mime/packages/%{name}.xml |
280 |
%{_mandir}/man1/%{name}.1* |
281 |
%{_metainfodir}/audacity.appdata.xml |