summaryrefslogtreecommitdiffstats
path: root/redhat/dependencies/akode/akode-3.5.13.2.spec
blob: 57c5ed631a803835ac7a5be0dc8de416fa96e820 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
#
# spec file for package akode (version 3.5.13-SRU)
#
# Copyright (c) 2014 Trinity Desktop Environment
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
#
# Please submit bugfixes or comments via http://www.trinitydesktop.org/
#

# BUILD WARNING:
#  Remove qt-devel and qt3-devel and any kde*-devel on your system !
#  Having KDE libraries may cause FTBFS here !

# TDE variables
%define tde_epoch 1
%if "%{?tde_version}" == ""
%define tde_version 3.5.13.2
%endif
%define tde_prefix /opt/trinity
%define tde_bindir %{tde_prefix}/bin
%define tde_datadir %{tde_prefix}/share
%define tde_docdir %{tde_datadir}/doc
%define tde_includedir %{tde_prefix}/include
%define tde_libdir %{tde_prefix}/%{_lib}
%define tde_mandir %{tde_datadir}/man
%define tde_tdeappdir %{tde_datadir}/applications/kde
%define tde_tdedocdir %{tde_docdir}/tde
%define tde_tdeincludedir %{tde_includedir}/tde
%define tde_tdelibdir %{tde_libdir}/trinity

# If TDE is built in a specific prefix (e.g. /opt/trinity), the release will be suffixed with ".opt".
%if "%{?tde_prefix}" != "/usr"
%define _variant .opt
%endif

Name:		trinity-akode 
Summary: 	Audio-decoding framework 
Group: 		System Environment/Libraries
Epoch:		%{tde_epoch}
Version:	2.0.2
Release:	1%{?dist}%{?_variant}
URL:		http://www.kde-apps.org/content/show.php?content=30375
#URL:		http://carewolf.com/akode/  

%if 0%{?suse_version}
License:	GPL-2.0+
%else
License:	GPLv2+
%endif

Source0:	akode-%{tde_version}.tar.gz

Prefix:		%{tde_prefix}
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:	autoconf
BuildRequires:	automake
BuildRequires:  gcc-c++
BuildRequires:	libtool

# TQT support
BuildRequires:	libtqt4-devel
BuildRequires:	trinity-filesystem >= %{tde_version}

# FLAC support
%define _with_flac --with-flac
%if 0%{?mgaversion} || 0%{?mdkversion}
BuildRequires: libflac-devel
%endif
%if 0%{?rhel} || 0%{?fedora} || 0%{?suse_version}
BuildRequires: flac-devel
%endif

# JACK support
%if 0%{?rhel} >= 5 || 0%{?fedora} || 0%{?mgaversion} || 0%{?mdkversion} || 0%{?suse_version}
%define _with_jack --with-jack
%if 0%{?mgaversion} || 0%{?mdkversion}
BuildRequires: libjack-devel
%endif
%if 0%{?rhel} || 0%{?fedora} || 0%{?suse_version}
BuildRequires: jack-audio-connection-kit-devel
%endif
%endif

# SAMPLERATE support
%if 0%{?rhel} >= 4 || 0%{?fedora} || 0%{?mgaversion} || 0%{?mdkversion} || 0%{?suse_version}
%define _with_libsamplerate --with-libsamplerate
BuildRequires: libsamplerate-devel
%endif

# PULSEAUDIO support
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 6 || 0%{?mgaversion} || 0%{?mdkversion} || 0%{?suse_version}
%define _with_pulseaudio --with-pulseaudio
%if 0%{?mgaversion} || 0%{?mdkversion}
BuildRequires: libpulseaudio-devel
%endif
%if 0%{?rhel} || 0%{?fedora}
BuildRequires: pulseaudio-libs-devel
%endif
%if 0%{?suse_version}
BuildRequires: pulseaudio-devel
%endif
%endif

# MAD support
%if 0%{?mdkversion} || 0%{?mgaversion} || 0%{?fedora} || 0%{?suse_version} || 0%{?rhel}
%define _with_libmad --with-libmad
BuildRequires:		libmad-devel
%endif

BuildRequires: alsa-lib-devel
BuildRequires: libvorbis-devel
BuildRequires: speex-devel


%description
aKode is a simple audio-decoding frame-work that provides a uniform
interface to decode the most common audio-formats. It also has a direct
playback option for a number of audio-outputs.

aKode currently has the following decoder plugins:
* mpc: Decodes musepack aka mpc audio.
* xiph: Decodes FLAC, Ogg/FLAC, Speex and Ogg Vorbis audio. 

aKode also has the following audio outputs:
* alsa: Outputs to ALSA (dmix is recommended).
* jack
* pulseaudio

%files
%defattr(-,root,root,-)
%doc rpmdocs/* 
%{tde_bindir}/akodeplay
%{tde_libdir}/libakode.so.*
%{tde_libdir}/libakode_alsa_sink.la
%{tde_libdir}/libakode_alsa_sink.so
%{tde_libdir}/libakode_mpc_decoder.la
%{tde_libdir}/libakode_mpc_decoder.so
%{tde_libdir}/libakode_oss_sink.la
%{tde_libdir}/libakode_oss_sink.so
%{tde_libdir}/libakode_xiph_decoder.la
%{tde_libdir}/libakode_xiph_decoder.so

%post
/sbin/ldconfig

%postun 
/sbin/ldconfig

##########

%package devel
Summary: Headers for developing programs that will use %{name} 
Group:   Development/Libraries
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
%{?_with_jack:Requires: %{name}-jack = %{?epoch:%{epoch}:}%{version}-%{release}}
%{?_with_pulseaudio:Requires: %{name}-pulseaudio = %{?epoch:%{epoch}:}%{version}-%{release}}
%{?_with_libsamplerate:Requires: %{name}-libsamplerate = %{?epoch:%{epoch}:}%{version}-%{release}}
%{?_with_libmad:Requires: %{name}-libmad = %{?epoch:%{epoch}:}%{version}-%{release}}
Requires: pkgconfig

%description devel
This package contains the development files for Akode.
It is needed if you intend to build an application linked against Akode.

%files devel
%defattr(-,root,root,-)
%{tde_bindir}/akode-config
%{tde_includedir}/*
%{tde_libdir}/libakode.la
%{tde_libdir}/libakode.so
%{tde_libdir}/pkgconfig/*.pc

%post devel
/sbin/ldconfig

%postun devel
/sbin/ldconfig

##########

%if "%{?_with_jack}" != ""

%package jack 
Summary: Jack audio output backend for %{name}
Group:   Development/Libraries
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}

%description jack 
This package contains the Jack audio output backend for Akode.

%files jack 
%defattr(-,root,root,-)
%{tde_libdir}/libakode_jack_sink.la
%{tde_libdir}/libakode_jack_sink.so

%post jack
/sbin/ldconfig

%postun jack
/sbin/ldconfig

%endif

##########

%if "%{?_with_pulseaudio}" != ""

%package pulseaudio
Summary: Pulseaudio output backend for %{name}
Group:   Development/Libraries
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}

%description pulseaudio
This package contains the pulseaudio backend for Akode.
Recommended for network transparent audio.

%files pulseaudio
%defattr(-,root,root,-)
%{tde_libdir}/libakode_polyp_sink.la
%{tde_libdir}/libakode_polyp_sink.so

%post pulseaudio
/sbin/ldconfig

%postun pulseaudio
/sbin/ldconfig

%endif

##########

# Packaged separately to keep main/core %{akode} package LGPL-clean.
%if "%{?_with_libsamplerate:1}" == "1"

%package libsamplerate 
Summary: Resampler based on libsamplerate for %{name}
Group:   Development/Libraries
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}

%description libsamplerate 
This package contains the samplerate decoder for Akode.

%files libsamplerate
%defattr(-,root,root,-)
%{tde_libdir}/libakode_src_resampler.la
%{tde_libdir}/libakode_src_resampler.so

%post libsamplerate
/sbin/ldconfig

%postun libsamplerate 
/sbin/ldconfig

%endif

##########

%if "%{?_with_libmad}" != ""

%package libmad
Summary: Decoder based on libmad for %{name}
Group:   Development/Libraries
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}

%description libmad 
This package contains the mad decoder for Akode.

%files libmad
%defattr(-,root,root,-)
%{tde_libdir}/libakode_mpeg_decoder.la
%{tde_libdir}/libakode_mpeg_decoder.so

%post libmad
/sbin/ldconfig

%postun libmad 
/sbin/ldconfig

%endif

##########

%if 0%{?pclinuxos} || 0%{?suse_version} && 0%{?opensuse_bs} == 0
%debug_package
%endif

##########

%prep
%setup -q -n akode-2.0.2

%__cp -f "/usr/share/aclocal/libtool.m4" "admin/libtool.m4.in"
%__cp -f "/usr/share/libtool/config/ltmain.sh" "admin/ltmain.sh" || %__cp -f "/usr/share/libtool/ltmain.sh" "admin/ltmain.sh"
%__make -f admin/Makefile.common


%build
unset QTDIR QTINC QTLIB
export CXXFLAGS="${RPM_OPT_FLAGS} -DHAVE_STDINT_H"

%configure \
  --bindir=%{tde_bindir} \
  --libdir=%{tde_libdir} \
  --includedir=%{tde_includedir} \
  --datadir=%{tde_datadir} \
  \
  --disable-dependency-tracking \
  --disable-debug \
  --enable-new-ldflags \
  --enable-final \
  --enable-closure \
  --enable-rpath \
  \
  --without-libltdl \
  --with-alsa \
  --with-oss \
  %{?_with_flac} %{!?_with_flac:--without-flac} \
  %{?_with_jack} %{!?_with_jack:--without-jack} \
  %{?_with_libsamplerate} %{!?_with_libsamplerate:--without-libsamplerate} \
  %{?_with_pulseaudio} %{!?_with_pulseaudio:--without-pulseaudio} \
  --with-speex \
  --with-vorbis \
  --without-ffmpeg \
  %{?_with_libmad} %{!?_with_libmad:--without-libmad}

%__make %{?_smp_mflags} || %__make


%install
%__rm -rf %{buildroot} 
%__make install DESTDIR=%{?buildroot}

# unpackaged files
%__rm -f %{buildroot}%{tde_libdir}/*.a

# rpmdocs
for file in AUTHORS COPYING NEWS README TODO ; do
  test -s  "$file" && install -p -m644 -D "$file" "rpmdocs/$file"
done


%clean
%__rm -rf %{buildroot} 


%changelog
* Fri Aug 16 2013 Francois Andriot <francois.andriot@free.fr> - 1:2.0.2-1
- Build for Fedora 19

* Sat Jan 19 2013 Francois Andriot <francois.andriot@free.fr> - 2.0.2-4
- Initial release for TDE 3.5.13.2

* Wed Oct 03 2012 Francois Andriot <francois.andriot@free.fr> - 2.0.2-3
- Initial release for TDE 3.5.13.1

* Mon Jul 30 2012 Francois Andriot <francois.andriot@free.fr> 2.0.2-2
- Re-adds '.la' files

* Tue May 01 2012 Francois Andriot <francois.andriot@free.fr> 2.0.2-1
- Port to TDE 3.5.13
- Based on spec file from Fedora 9 'akode-2.0.2-5'