summaryrefslogtreecommitdiffstats
path: root/redhat/applications/amarok/trinity-amarok.spec
blob: c70828000f8701728ca680ce6cf3d3d09526b621 (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
# Basic package informations
%define kdecomp amarok
%define version 1.4.10
%define release 6

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

# TDE 3.5.13 specific building variables
BuildRequires:	cmake >= 2.8
%define tde_docdir %{_docdir}/kde
%define tde_includedir %{_includedir}/kde
%define tde_libdir %{_libdir}/trinity

# Ruby 1.9 includes are located in strance directories ... (taken from ruby 1.9 spec file)
%global	_normalized_cpu	%(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/;s/armv.*/arm/')


Name:    trinity-%{kdecomp}
Summary: Media player
Version: %{version}
Release: %{release}%{?dist}%{?_variant}

Group: 	    Applications/Multimedia
License:    GPLv2+
Url:        http://amarok.kde.org

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

Source0:    amarok-3.5.13.tar.gz

# RedHat / Fedora legacy patches
Patch1:     amarok-1.4.8-gcc43.patch

# TDE 3.5.13 RHEL/Fedora patches
Patch2:		amarok-3.5.13-cmake_konqsidebar.patch
Patch3:		amarok-3.5.13-taglib_include.patch
Patch4:		amarok-3.5.13-enable_riokarma.patch
Patch5:		amarok-3.5.13-enable_akode.patch

Patch6:		amarok-3.5.13-adds_ruby_1.9_support.patch
Patch7:		amarok-3.5.13-fix_gcc47_compilation.patch

# [amarok] Fix inotify detection [Commit #899586da]
Patch11:	amarok-3.5.13-fix_inotify_support.patch

BuildRequires:  alsa-lib-devel
BuildRequires:  desktop-file-utils
BuildRequires:  esound-devel
BuildRequires:  gettext
BuildRequires:	tqtinterface-devel
BuildRequires:  trinity-kdelibs-devel
BuildRequires:  trinity-kdebase-devel
BuildRequires:	pcre-devel
BuildRequires:  taglib-devel 
BuildRequires:  libifp-devel
# Ipod
%if 0%{?rhel} == 5
BuildRequires:  trinity-libgpod-devel >= 0.4.2
%else
BuildRequires:  libgpod-devel >= 0.4.2
%endif
BuildRequires:	libmp4v2-devel
# MTP players
BuildRequires:  libmtp-devel
BuildRequires:  libmusicbrainz-devel
# Creative Nomad Jukebox
BuildRequires:  libnjb-devel
BuildRequires:  libtool
%if 0%{?fedora} > 4 || 0%{?rhel} > 4
BuildRequires:  libtool-ltdl-devel
%endif
BuildRequires:  libtunepimp-devel
BuildRequires:  libusb-devel
BuildRequires:  libvisual-devel
BuildRequires:  mysql-devel
BuildRequires:  postgresql-devel
BuildRequires:  SDL-devel
BuildRequires:  taglib-devel
BuildRequires:	sqlite-devel
BuildRequires:	trinity-libkarma-devel karma-sharp
# not used anymore, in favor of libvisual ? -- Rex
#%{?fedora:BuildRequires:  xmms-devel}
BuildRequires:	dbus-devel
BuildRequires:	dbus-tqt-devel
BuildRequires:	trinity-akode-devel

# To open the selected browser, works with Patch2
Requires:  xdg-utils
Requires(post): xdg-utils
Requires(postun): xdg-utils

%if "%{?_prefix}" == "%{_usr}"
Obsoletes: amarok-arts < 1.3, amarok-akode < 1.3

Obsoletes: amarok-devel < %{version}-%{release}
%if 0%{?fedora} > 6 && 0%{?fedora} < 9
# need to keep this around for previous releases, so not to break multilib compat.
Provides:  amarok-devel = %{version}-%{release}
%endif

# engines, etc...
# old, obsolete ones: arts, akode
Obsoletes: amarok-arts < 1.3, amarok-akode < 1.3
%endif

# xine-lib
BuildRequires:  xine-lib-devel

Provides: %{name}-engine-xine = %{version}-%{release}

%description
Amarok is a multimedia player with:
 - fresh playlist concept, very fast to use, with drag and drop
 - plays all formats supported by the various engines
 - audio effects, like reverb and compressor
 - compatible with the .m3u and .pls formats for playlists
 - nice GUI, integrates into the KDE look, but with a unique touch


%package ruby
Summary:	%{name} Ruby support
Group: 	    Applications/Multimedia
BuildRequires:  ruby-devel ruby
Requires: %{name} = %{version}-%{release}
# For dir ownership and some default plugins (lyrics)
Requires:  ruby
%description ruby
%{summary}.


%package konqueror
Summary: Amarok konqueror (service menus, sidebar) support
Group:   Applications/Multimedia
Requires: %{name} = %{version}-%{release}
%description konqueror
%{summary}.

%package visualisation
Summary:    Visualisation plugins for Amarok
Group:      Applications/Multimedia
Requires:   %{name} = %{version}-%{release}
# No plugins by default, we need libvisual-plugins
#Requires:   libvisual-plugins
%description visualisation
Amarok can use visualisation plugins from different origins.
Right now, only xmms is supported, which means that you can
use any of xmms' visualisation plugins with Amarok.


%prep
%setup -q -n applications/amarok
%patch1 -p1 -b .gcc43
%patch2 -p0
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1 -b .ruby
%patch7 -p1

%patch11 -p1 -b .inotify


%build
unset QTDIR && . %{_sysconfdir}/profile.d/qt.sh
export PATH="%{_bindir}:${PATH}"
export LDFLAGS="-L%{_libdir} -I%{_includedir}"
export CMAKE_INCLUDE_PATH="%{_includedir}:%{_includedir}/tqt"

%__mkdir_p build
cd build
%cmake \
	-DWITH_LIBVISUAL=ON \
	-DWITH_KONQSIDEBAR=ON \
	-DWITH_XINE=ON \
	-DWITH_YAUAP=ON \
	-DWITH_AKODE=ON \
	-DWITH_IPOD=ON \
	-DWITH_IFP=ON \
	-DWITH_NJB=ON \
	-DWITH_MTP=ON \
	-DWITH_RIOKARMA=ON \
	-DWITH_DAAP=ON \
	-DBUILD_ALL=ON \
	-DQT_LIBRARY_DIRS="${QTLIB}" \
	-DRUBY_ARCH_INCLUDE_DIR="%{_usr}/include/%{_normalized_cpu}-%{_target_os}" \
	..

%__make %{?_smp_mflags}

%install
%__rm -fr $RPM_BUILD_ROOT
%__make install DESTDIR=$RPM_BUILD_ROOT -C build

# desktop files
desktop-file-install  --vendor "" \
        --dir $RPM_BUILD_ROOT%{_datadir}/applications/kde \
        --delete-original \
        $RPM_BUILD_ROOT%{_datadir}/applications/kde/amarok.desktop

# unpackaged files
%__rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.la


# HTML
for lang_dir in $RPM_BUILD_ROOT%{tde_docdir}/HTML/* ; do
  if [ -d $lang_dir ]; then
    lang=$(basename $lang_dir)
    [ "$lang" == "en" ] && d=en/amarok || d=$lang
    echo "%lang($lang) %doc %{tde_docdir}/HTML/$d" >> %{name}.lang
  fi
done

# Locales
for locale in $RPM_BUILD_ROOT%{_datadir}/locale/* ; do
  if [ -r $locale/LC_MESSAGES/amarok.mo ]; then
    lang=$(basename $locale)
    echo "%lang($lang) %{_datadir}/locale/$lang/LC_MESSAGES/amarok.mo" >> %{name}.lang
  fi
done


%post
/sbin/ldconfig
xdg-icon-resource forceupdate --theme hicolor 2> /dev/null || :
xdg-desktop-menu forceupdate 2> /dev/null || :

%postun
/sbin/ldconfig
xdg-icon-resource forceupdate --theme hicolor 2> /dev/null || :
xdg-desktop-menu forceupdate 2> /dev/null || :


%clean
%__rm -fr $RPM_BUILD_ROOT


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc COPYING AUTHORS ChangeLog README
%{_bindir}/amarok
%{_bindir}/amarokapp
%{_bindir}/amarokcollectionscanner
%{_bindir}/amarok_proxy.rb
%{_datadir}/apps/amarok/
%{_datadir}/icons/hicolor/*/*/*
%{_datadir}/applications/kde/*.desktop
%{_datadir}/servicetypes/*.desktop
%{_datadir}/apps/profiles/amarok.profile.xml
%{_datadir}/config/amarokrc
%{_datadir}/config.kcfg/*.kcfg
%{_datadir}/services/amarokitpc.protocol
%{_datadir}/services/amaroklastfm.protocol
%{_datadir}/services/amarokpcast.protocol
# -libs ?  -- Rex
%{_libdir}/libamarok.*
# DAAP
%{_bindir}/amarok_daapserver.rb
%{tde_libdir}/libamarok_daap-mediadevice.*
%{_datadir}/services/amarok_daap-mediadevice.desktop
# Mass-storage
%{_datadir}/services/amarok_massstorage-device.desktop
%{tde_libdir}/libamarok_massstorage-device.*
# NFS
%{_datadir}/services/amarok_nfs-device.desktop
%{tde_libdir}/libamarok_nfs-device.*
# SMB
%{_datadir}/services/amarok_smb-device.desktop
%{tde_libdir}/libamarok_smb-device.*
# IPod
%{_datadir}/services/amarok_ipod-mediadevice.desktop
%{tde_libdir}/libamarok_ipod-mediadevice.*
# VFAT
%{_datadir}/services/amarok_generic-mediadevice.desktop
%{tde_libdir}/libamarok_generic-mediadevice.*
# iRiver
%{_datadir}/services/amarok_ifp-mediadevice.desktop
%{tde_libdir}/libamarok_ifp-mediadevice.*
# Creative Zen
%{_datadir}/services/amarok_njb-mediadevice.desktop
%{tde_libdir}/libamarok_njb-mediadevice.*
# MTP players
%{_datadir}/services/amarok_mtp-mediadevice.desktop
%{tde_libdir}/libamarok_mtp-mediadevice.*
# Rio Karma
%{_datadir}/services/amarok_riokarma-mediadevice.desktop
%{tde_libdir}/libamarok_riokarma-mediadevice.*
# Void engine (noop)
%{_datadir}/services/amarok_void-engine_plugin.desktop
%{tde_libdir}/libamarok_void-engine_plugin.*
# Xine engine
%{_datadir}/services/amarok_xine-engine.desktop
%{tde_libdir}/libamarok_xine-engine.*
## Gstreamer engine
#%{_datadir}/services/amarok_gst10engine_plugin.desktop
#%{tde_libdir}/libamarok_gst10engine_plugin.*
# YAUAP
%{_datadir}/services/amarok_yauap-engine_plugin.desktop
%{tde_libdir}/libamarok_yauap-engine_plugin.*
# AKODE
%{_datadir}/services/amarok_aKode-engine.desktop
%{tde_libdir}/libamarok_aKode-engine.*

%files ruby
%defattr(-,root,root,-)
%{_libdir}/ruby_lib/*


%files konqueror
%defattr(-,root,root,-)
%{_datadir}/apps/konqueror/servicemenus/*.desktop
%{tde_libdir}/konqsidebar_universalamarok.*
%{_datadir}/apps/konqsidebartng/*/amarok.desktop

%files visualisation
%defattr(-,root,root,-)
%{_bindir}/amarok_libvisual


%changelog
* Mon Apr 29 2012 Francois Andriot <francois.andriot@free.fr> - 1.4.10-6
- Rebuilt for Fedora 17
- Fix compilation with GCC 4.7
- Fix inotify detection [Commit #899586da]

* Mon Mar 19 2012 Francois Andriot <francois.andriot@free.fr> - 1.4.10-5
- Replaces BR "libgpod" with "trinity-libgpod" for EL5

* Mon Jan 16 2012 Francois Andriot <francois.andriot@free.fr> - 1.4.10-4
- Enable 'akode' support
- Removes 'libvisual-plugins' dependency (obsolete ?)

* Mon Nov 28 2011 Francois Andriot <francois.andriot@free.fr> - 1.4.10-3
- Enable riokarma support
- Enhance localized files packaging

* Sat Nov 26 2011 Francois Andriot <francois.andriot@free.fr> - 1.4.10-2
- Enable RHEL 5 compilation
- Add konqueror sidebar

* Wed Nov 09 2011 Francois Andriot <francois.andriot@free.fr> - 1.4.10-1
- Initial build for TDE 3.5.13 on RHEL 5, RHEL 6, Fedora 15, Fedora 16
- Spec file based on Fedora 8 'amarok-1.4.10-1'