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