]> git.pld-linux.org Git - packages/audacity.git/blob - audacity.spec
BRs for tar.xz source
[packages/audacity.git] / audacity.spec
1 # TODO:
2 # - internal portaudio crashes when only OSS is available on startup
3 # - use system portaudio (>= 19, but relies on local changes)
4 # - use system portSMF?
5 # - use system ffmpeg (libavcodec >= 51.53, libavformat >= 52.12, libavutil)
6 # - use system sbsms (>= 1.6.0, but relies on local changes)
7 # - use system libnyquist (if ever; currently it's a part of audacity project)
8 #
9 # Conditional build:
10 %bcond_without  ffmpeg          # build without ffmpeg support
11 %bcond_with     gtk3            # GTK+ 3.x instead of 2.x (not fully supported)
12 %bcond_without  mmx             # MMX instructions
13 %bcond_without  sse             # SSE instructions
14 %bcond_without  sse2            # SSE2 instructions
15 #
16 %ifnarch %{x8664} pentium2 pentium3 pentium4 athlon
17 %undefine       with_mmx
18 %endif
19 %ifnarch %{x8664} pentium3 pentium4
20 %undefine       with_sse
21 %endif
22 %ifnarch %{x8664} pentium4
23 %undefine       with_sse2
24 %endif
25
26 Summary:        Audacity - manipulate digital audio waveforms
27 Summary(pl.UTF-8):      Audacity - narzędzie do obróbki plików dźwiękowych
28 Summary(ru.UTF-8):      Кроссплатформенный звуковой редактор
29 Name:           audacity
30 Version:        2.4.2
31 Release:        1
32 License:        GPL v2+
33 Group:          X11/Applications/Sound
34 #Source0Download: http://www.fosshub.com/Audacity.html
35 Source0:        %{name}-minsrc-%{version}.tar.xz
36 # Source0-md5:  4a34c1c66f69f1fedc400c71d5155ea8
37 Source1:        %{name}-manual-%{version}.zip
38 # Source1-md5:  084830de81c157d229089338a594baab
39 Patch0:         %{name}-opt.patch
40 Patch1:         %{name}-no-macos.patch
41 Patch2:         %{name}-desktop.patch
42 URL:            http://audacityteam.org/
43 BuildRequires:  alsa-lib-devel
44 BuildRequires:  autoconf >= 2.59
45 BuildRequires:  automake >= 1:1.9
46 BuildRequires:  expat-devel >= 1.95
47 # libavcodec >= 51.53 libavformat >= 52.12 libavutil
48 %{?with_ffmpeg:BuildRequires:   ffmpeg-devel >= 0.8.0}
49 BuildRequires:  flac-c++-devel >= 1.3.0
50 BuildRequires:  gettext-tools >= 0.18
51 %{!?with_gtk3:BuildRequires:    gtk+2-devel >= 2.0}
52 %{?with_gtk3:BuildRequires:     gtk+3-devel >= 3.0}
53 BuildRequires:  hpklinux-devel >= 4.06
54 BuildRequires:  jack-audio-connection-kit-devel
55 BuildRequires:  lame-libs-devel
56 BuildRequires:  libid3tag-devel >= 0.15.0b-2
57 BuildRequires:  libjpeg-devel
58 BuildRequires:  libmad-devel >= 0.14.2b-4
59 #BuildRequires: libsbsms-devel >= 1.6.0
60 #BuildRequires: libsbsms2-devel >= 2.0.2
61 BuildRequires:  libsndfile-devel >= 1.0.0
62 BuildRequires:  libstdc++-devel
63 BuildRequires:  libtool >= 2:2
64 BuildRequires:  libvorbis-devel >= 1:1.0
65 BuildRequires:  lilv-devel >= 0.16
66 BuildRequires:  lv2-devel
67 BuildRequires:  nasm
68 BuildRequires:  pkgconfig
69 #BuildRequires: portaudio-devel >= 19
70 BuildRequires:  rpmbuild(macros) >= 1.742
71 BuildRequires:  soundtouch-devel >= 1.3.0
72 BuildRequires:  soxr-devel >= 0.0.5
73 BuildRequires:  speex-devel
74 BuildRequires:  suil-devel >= 0.8.2
75 BuildRequires:  tar >= 1:1.22
76 BuildRequires:  twolame-devel >= 0.3.9
77 BuildRequires:  udev-devel
78 BuildRequires:  unzip
79 BuildRequires:  vamp-devel >= 2.0
80 BuildRequires:  which
81 %{!?with_gtk3:BuildRequires:    wxGTK2-unicode-devel >= 3.0.0}
82 %{?with_gtk3:BuildRequires:     wxGTK3-unicode-devel >= 3.0.0}
83 BuildRequires:  xz
84 Requires(post,postun):  shared-mime-info
85 Requires:       flac-c++ >= 1.3.0
86 # dlopened
87 Requires:       lame-libs
88 Requires:       libid3tag >= 0.15.0b-2
89 Requires:       libmad >= 0.14.2b-4
90 Requires:       libsndfile >= 1.0.0
91 Requires:       lilv >= 0.16
92 Requires:       soundtouch >= 1.3.0
93 Requires:       soxr >= 0.0.5
94 Requires:       suil >= 0.8.2
95 Requires:       twolame-libs >= 0.3.9
96 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
97
98 %description
99 Audacity is a program that lets you manipulate digital audio
100 waveforms. It imports many sound file formats, including WAV, AIFF,
101 AU, IRCAM, MP3, and Ogg Vorbis. It supports all common editing
102 operations such as Cut, Copy, and Paste, plus it will mix tracks and
103 let you apply plug-in effects to any part of a sound.
104
105 %description -l pl.UTF-8
106 Audacity to program obsługujący różne formaty plików audio. Obsługuje
107 WAV, AIFF, AU, IRCAM, MP3, oraz Ogg Vorbis. Program ten umożliwia
108 wykonywanie podstawowych czynności edycyjnych takich jak kasowanie,
109 wstawianie i miksowanie ścieżki dźwiękowej. Umożliwia także
110 wykonywanie dowolnych innych operacji poprzez system wtyczek.
111
112 %description -l ru.UTF-8
113 Audacity - это звуковой редактор, позволяющий работать с файлами в
114 форматах WAV, AIFF, AU, IRCAM, MP3 и Ogg Vorbis. В нем реализованы все
115 основные операции, такие как удаление, копирование, вставка,
116 микширование треков и применение эффектов, оформленных в виде
117 плагинов, к любой части звукового файла.
118
119 %prep
120 %setup -q -n %{name}-minsrc-%{version}
121 %patch0 -p1
122 %patch1 -p1
123 %patch2 -p1
124
125 %{__sed} -i 's/libmp3lame.so/libmp3lame.so.0/g' locale/*.po
126
127 # Audacity's cmake can't find libmp3lame without a .pc file
128 # This is a temporary workaround.
129 if ! test -e %{_pkgconfigdir}/lame.pc
130 then
131 echo "creating lame.pc"
132 cat << EOF > lame.pc
133 prefix=%{_prefix}
134 libdir=%{_libdir}
135 includedir=%{_includedir}/lame
136
137 Name: mp3lame
138 Description: encoder that converts audio to the MP3 file format.
139 Version: 3.100
140 Libs: -L${libdir} -lmp3lame
141 Cflags: -I${includedir}
142 EOF
143 fi
144
145 %build
146 if ! test -e %{_pkgconfigdir}/lame.pc
147 then
148 export PKG_CONFIG_PATH="`echo $PWD`:%{_pkgconfigdir}"
149 fi
150
151 mkdir -p build
152 cd build
153 %cmake .. \
154         %{cmake_on_off mmx HAVE_MMX} \
155         %{cmake_on_off sse HAVE_SSE} \
156         %{cmake_on_off sse2 HAVE_SSE2} \
157         -DwxWidgets_CONFIG_EXECUTABLE:FILEPATH=$(which wx-gtk%{?with_gtk3:3}%{!?with_gtk3:2}-unicode-config) \
158         %{!?with_ffmpeg:-Daudacity_use_ffmpeg:STRING=off} \
159         -DCMAKE_BUILD_TYPE=Release
160
161 %{__make}
162
163 %install
164 rm -rf $RPM_BUILD_ROOT
165
166 cd build
167 %{__make} install \
168         DESTDIR=$RPM_BUILD_ROOT \
169         INSTALL_PATH=$RPM_BUILD_ROOT
170 cd ..
171
172 %{__unzip} -qq -a %{SOURCE1} -d $RPM_BUILD_ROOT%{_datadir}/%{name}/help
173
174 # unify locale names
175 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{ca_ES@valencia,ca@valencia}
176 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{pt_PT,pt}
177 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{sr_RS,sr}
178 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{sr_RS@latin,sr@latin}
179
180 # remove unsupported locale
181 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/eu_ES
182
183 %{__rm} $RPM_BUILD_ROOT%{_pixmapsdir}/audacity.xpm
184 %{__rm} $RPM_BUILD_ROOT%{_pixmapsdir}/audacity16.xpm
185 %{__rm} $RPM_BUILD_ROOT%{_pixmapsdir}/audacity32.xpm
186 %{__rm} $RPM_BUILD_ROOT%{_pixmapsdir}/gnome-mime-application-x-audacity-project.xpm
187
188 %{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}/README.txt
189 %{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}/LICENSE.txt
190 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
191
192 install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/{16x16,22x22,24x24,32x32,48x48}/apps
193 %{__mv} $RPM_BUILD_ROOT%{_iconsdir}/hicolor/{16x16,16x16/apps}/%{name}.png
194 %{__mv} $RPM_BUILD_ROOT%{_iconsdir}/hicolor/{22x22,22x22/apps}/%{name}.png
195 %{__mv} $RPM_BUILD_ROOT%{_iconsdir}/hicolor/{24x24,24x24/apps}/%{name}.png
196 %{__mv} $RPM_BUILD_ROOT%{_iconsdir}/hicolor/{32x32,32x32/apps}/%{name}.png
197 %{__mv} $RPM_BUILD_ROOT%{_iconsdir}/hicolor/{48x48,48x48/apps}/%{name}.png
198
199
200 %find_lang %{name}
201
202 %clean
203 rm -rf $RPM_BUILD_ROOT
204
205 %post
206 %update_mime_database
207
208 %postun
209 %update_mime_database
210
211 %files -f %{name}.lang
212 %defattr(644,root,root,755)
213 %doc README.txt LICENSE.txt
214 %attr(755,root,root) %{_bindir}/audacity
215 %dir %{_datadir}/%{name}
216 %dir %{_datadir}/%{name}/modules
217 %attr(755,root,root) %{_datadir}/%{name}/modules/mod-script-pipe.so
218 %{_datadir}/%{name}/nyquist
219 %{_datadir}/%{name}/plug-ins
220 %{_datadir}/%{name}/EQDefaultCurves.xml
221 %doc %{_datadir}/%{name}/help
222 %{_mandir}/man1/audacity.1*
223 %{_desktopdir}/audacity.desktop
224 %{_datadir}/appdata/audacity.appdata.xml
225 %{_datadir}/mime/packages/audacity.xml
226 %{_iconsdir}/hicolor/*/apps/*.*
This page took 0.049619 seconds and 4 git commands to generate.