File kodi.binary-addons-noX-raspberry-pi2.spec of Package kodi.binary-addons (Revision faf54b1b1806c374179770b828a3b9e0)
Currently displaying revision faf54b1b1806c374179770b828a3b9e0 , Show latest
198
1
#
2
# spec file for package kodi
3
#
4
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
5
#
6
# All modifications and additions to the file contributed by third parties
7
# remain the property of their copyright owners, unless otherwise agreed
8
# upon. The license for this file, and modifications and additions to the
9
# file, is the same license as for the pristine package itself (unless the
10
# license for the pristine package is not an Open Source License, in which
11
# case the license is the MIT License). An "Open Source License" is a
12
# license that conforms to the Open Source Definition (Version 1.9)
13
# published by the Open Source Initiative.
14
15
# Please submit bugfixes or comments via http://bugs.opensuse.org/
16
#
17
18
19
# Please edit kodi.spec and kodi.changes only. *-noX.* files are generated from
20
# kodi.* files with the pre_checkin.sh script
21
%define kodi_version Jarvis
22
%define _kodi_addons_dir %{_datadir}/kodi/addons
23
# kodi can be built without X support when openGL ES is used (mainly used on ARM boards used as media center)
24
%define noX_build 1
25
%if %{noX_build}
26
# no X build needs openGL ES
27
%bcond_with enable_opengl
28
%bcond_without enable_opengles
29
%else
30
%ifarch %arm armv6l armv6hl
31
%bcond_with enable_opengl
32
%bcond_without enable_opengles
33
%else
34
%bcond_without enable_opengl
35
%bcond_with enable_opengles
36
%endif
37
%endif
38
39
%define kodi_platform raspberry-pi2
40
%define kodi_player omxplayer
41
42
Name: kodi.binary-addons-noX-raspberry-pi2
43
Version: 16.1
44
Release: 0
45
Summary: Binary Addons for Kodi
46
License: GPL-2.0+ and GPL-3.0+
47
Group: Productivity/Multimedia/Video/Players
48
Url: http://kodi.tv/
49
Source0: https://github.com/xbmc/xbmc/archive/%{version}-%{kodi_version}.tar.gz
50
Source1: kodi.binary-addons.spec.packages.inc
51
Source2: kodi.binary-addons.spec.files.inc
52
Source3: kodi.binary-addons.tar
53
Source4: repo-binary-addons.%{kodi_version}.tar.bz2
54
Source5: kodi-platform-15edaf7.tar.gz
55
Patch1: cmake-binary-addons.patch
56
Patch2: addon-helpers_lib64.patch
57
# PATCH-PACKMAN kodi.binary-addons-audiodecoder.ncsf-gcc5.3.patch - fixes compiling of audiodecoder.ncsf with gcc > 4.8, suse_version >= 1320
58
Patch3: kodi.binary-addons-audiodecoder.ncsf-gcc5.3.patch
59
# PATCH-PACKMAN kodi.binary-addons-screensavers.rsxs-upstream-stdbool_h.patch - fixes compiling of screensavers.rsxs with gcc > 4.8, suse_version >= 1320
60
Patch4: kodi.binary-addons-screensavers.rsxs-upstream-stdbool_h.patch
61
62
BuildRequires: autoconf
63
BuildRequires: automake
64
BuildRequires: ccache
65
BuildRequires: cmake
66
BuildRequires: fdupes
67
BuildRequires: gcc-c++
68
BuildRequires: jsoncpp-devel
69
%if %{noX_build}
70
BuildRequires: kodi-noX-devel
71
%else
72
BuildRequires: kodi-devel
73
%endif
74
BuildRequires: tinyxml-devel
75
BuildRequires: libmp3lame-devel
76
BuildRequires: libSOIL-devel
77
BuildRequires: libtool
78
BuildRequires: pkg-config
79
BuildRequires: pkgconfig(fluidsynth)
80
BuildRequires: pkgconfig(flac)
81
BuildRequires: pkgconfig(libhdhomerun)
82
BuildRequires: pkgconfig(libmodplug)
83
BuildRequires: pkgconfig(libpng)
84
BuildRequires: pkgconfig(libprojectM)
85
BuildRequires: pkgconfig(platform)
86
BuildRequires: pkgconfig(tinyxml2)
87
BuildRequires: pkgconfig(vorbis)
88
89
# kodi needs the same libtag version which was used to build against
90
%requires_eq libtag1
91
%if !%{noX_build}
92
BuildRequires: xorg-x11-devel
93
%endif
94
%if %{with enable_opengl}
95
BuildRequires: pkgconfig(gl)
96
BuildRequires: pkgconfig(glew)
97
BuildRequires: pkgconfig(glu)
98
BuildRequires: pkgconfig(vdpau)
99
%endif
100
101
%if %{with enable_opengles}
102
%if %{kodi_platform} == "none"
103
BuildRequires: Mesa-libEGL-devel
104
BuildRequires: Mesa-libGLESv2-devel
105
%else
106
%if %{kodi_platform} == "raspberry-pi" || %{kodi_platform} == "raspberry-pi2"
107
BuildRequires: raspberrypi-userland-devel
108
%endif
109
%endif
110
%endif
111
112
# glxinfo is needed to check hw accel
113
%if 0%{?suse_version} >= 1220
114
%if !%{noX_build}
115
Requires: Mesa-demo-x
116
Requires: xdpyinfo
117
%endif
118
%endif
119
120
BuildRoot: %{_tmppath}/%{name}-%{version}-build
121
ExcludeArch: ppc64
122
Requires: kodi = %{version}
123
#Requires: libjsoncpp1
124
125
%description
126
Binary Addons for Kodi Media Center
127
128
%include %{SOURCE1}
129
130
%prep
131
%setup -q -n xbmc-%{version}-%{kodi_version}
132
%patch1
133
%ifarch x86_64
134
%patch2
135
%endif
136
137
pushd project/cmake/addons
138
tar xvf %{SOURCE3}
139
mkdir -pv build/bootstrap/binary-addons/src
140
cp -v %{SOURCE4} build/bootstrap/binary-addons/src
141
142
#remove deps that are already installed using BuildRequires
143
rm -rf depends/common/{platform,tinyxml}
144
rm -f depends/common/kodi-platform/deps.txt
145
tar xf %{SOURCE5} --strip-components=1 -C depends/common/kodi-platform
146
echo "kodi-platform file://../depends/common/kodi-platform" > depends/common/kodi-platform/kodi-platform.txt
147
popd
148
149
%build
150
pushd project/cmake/addons
151
%cmake \
152
%ifarch i586
153
-DCMAKE_C_FLAGS='-msse' \
154
%endif
155
-DBUILD_DIR=build \
156
-DBUILD_SHARED_LIBS=1 \
157
-DNEED_SUDO=FALSE \
158
-DAPP_LIB_DIR=%{buildroot}%{_libdir}/kodi/ \
159
-DCMAKE_INSTALL_LIBDIR=%{buildroot}%{_libdir}/kodi/ \
160
-DCMAKE_INSTALL_PREFIX=%{buildroot}%{_prefix}
161
162
# Tumbleweed and Factory have GCC 5.x ATM (20160309), source needs patching for this
163
%if 0%{?suse_version} > 1320
164
# patch audiodecoders.ncsf
165
patch -p0 < %{PATCH3}
166
# patch screensavers.rsxs
167
patch screensavers.rsxs/lib/rsxs-1.0/lib/stdbool.in.h %{PATCH4}
168
%endif
169
170
# fake buildtime in audiodecoder.qsf
171
FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
172
FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%H:%%M:%%S')
173
for file in audiodecoder.qsf/lib/Highly_Quixotic/Core/qsound.c \
174
audiodecoder.ssf/lib/Highly_Theoretical/Core/Starscream/star.c \
175
audiodecoder.ssf/lib/Highly_Theoretical/Core/sega.c \
176
audiodecoder.timidity/lib/timidity/timidity/speex_a.c; do
177
sed -i -e "s/__DATE__/\"$FAKE_BUILDDATE\"/" -e "s/__TIME__/\"$FAKE_BUILDTIME\"/" $file
178
done
179
180
make VERBOSE=1 %{?_smp_mflags}
181
popd
182
183
%install
184
#make DESTDIR=%{buildroot} install %{?_smp_mflags}
185
186
%fdupes %{buildroot}
187
188
%files
189
%defattr(-,root,root)
190
%dir %{_libdir}/kodi
191
%dir %{_datadir}/kodi
192
%{_libdir}/kodi/prepare-env.cmake
193
194
195
%include %{SOURCE2}
196
197
%changelog
198