File kodi.binary-addons.spec of Package kodi.binary-addons (Revision 43edbb86d89eb63715838a00dd3bd2ba)
Currently displaying revision 43edbb86d89eb63715838a00dd3bd2ba , Show latest
204
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 Krypton
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 0
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 none
40
%define kodi_player none
41
42
Name: kodi.binary-addons
43
Version: 17.3
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-c8188d8.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
Patch5: lib555-missing-xlocale.patch
62
Patch6: pvr.stalker-gcc7.patch
63
64
BuildRequires: autoconf
65
BuildRequires: automake
66
BuildRequires: ccache
67
BuildRequires: cmake
68
BuildRequires: fdupes
69
BuildRequires: gcc-c++
70
BuildRequires: jsoncpp-devel
71
%if %{noX_build}
72
BuildRequires: kodi-noX-devel = %{version}
73
%else
74
BuildRequires: kodi-devel = %{version}
75
%endif
76
BuildRequires: tinyxml-devel
77
BuildRequires: libmp3lame-devel
78
BuildRequires: libSOIL-devel
79
BuildRequires: libstdc++-devel
80
BuildRequires: libtool
81
BuildRequires: libxml2-devel
82
BuildRequires: pkg-config
83
BuildRequires: pkgconfig(fluidsynth)
84
BuildRequires: pkgconfig(flac)
85
BuildRequires: libhdhomerun-devel
86
BuildRequires: pkgconfig(libmodplug)
87
BuildRequires: pkgconfig(libpng)
88
BuildRequires: pkgconfig(libprojectM)
89
BuildRequires: pkgconfig(librtmp)
90
BuildRequires: pkgconfig(p8-platform)
91
BuildRequires: pkgconfig(tinyxml2)
92
BuildRequires: pkgconfig(vorbis)
93
94
# kodi needs the same libtag version which was used to build against
95
%requires_eq libtag1
96
%if !%{noX_build}
97
BuildRequires: xorg-x11-devel
98
%endif
99
%if %{with enable_opengl}
100
BuildRequires: pkgconfig(gl)
101
BuildRequires: pkgconfig(glew)
102
BuildRequires: pkgconfig(glu)
103
BuildRequires: pkgconfig(vdpau)
104
%endif
105
106
%if %{with enable_opengles}
107
%if %{kodi_platform} == "none"
108
BuildRequires: Mesa-libEGL-devel
109
BuildRequires: Mesa-libGLESv2-devel
110
%else
111
%if %{kodi_platform} == "raspberry-pi" || %{kodi_platform} == "raspberry-pi2"
112
BuildRequires: raspberrypi-userland-devel
113
%endif
114
%endif
115
%endif
116
117
# glxinfo is needed to check hw accel
118
%if 0%{?suse_version} >= 1220
119
%if !%{noX_build}
120
Requires: Mesa-demo-x
121
Requires: xdpyinfo
122
%endif
123
%endif
124
125
BuildRoot: %{_tmppath}/%{name}-%{version}-build
126
ExcludeArch: ppc64
127
Requires: kodi = %{version}
128
#Requires: libjsoncpp1
129
130
%description
131
Binary Addons for Kodi Media Center
132
133
%include %{SOURCE1}
134
135
%prep
136
%setup -q -n xbmc-%{version}-%{kodi_version}
137
%patch1
138
%ifarch x86_64
139
%patch2
140
%endif
141
142
pushd project/cmake/addons
143
tar xvf %{SOURCE3}
144
mkdir -pv build/bootstrap/binary-addons/src
145
cp -v %{SOURCE4} build/bootstrap/binary-addons/src
146
147
#remove deps that are already installed using BuildRequires
148
rm -rf depends/common/{p8-platform,tinyxml}
149
rm -f depends/common/kodi-platform/deps.txt
150
tar xf %{SOURCE5} --strip-components=1 -C depends/common/kodi-platform
151
echo "kodi-platform file://../depends/common/kodi-platform" > depends/common/kodi-platform/kodi-platform.txt
152
popd
153
154
%build
155
pushd project/cmake/addons
156
%cmake \
157
%ifarch i586
158
-DCMAKE_C_FLAGS='-msse' \
159
%endif
160
-DBUILD_DIR=build \
161
-DBUILD_SHARED_LIBS=1 \
162
-DNEED_SUDO=FALSE \
163
-DAPP_LIB_DIR=%{buildroot}%{_libdir}/kodi/ \
164
-DCMAKE_INSTALL_LIBDIR=%{buildroot}%{_libdir}/kodi/ \
165
-DCMAKE_INSTALL_PREFIX=%{buildroot}%{_prefix}
166
167
# Tumbleweed and Factory have GCC 5.x ATM (20160309), source needs patching for this
168
%if 0%{?suse_version} > 1320
169
# patch audiodecoders.ncsf
170
#patch -p0 < %%{PATCH3}
171
# patch screensavers.rsxs
172
patch screensavers.rsxs/lib/rsxs-1.0/lib/stdbool.in.h %{PATCH4}
173
patch -up0 --verbose < %{PATCH5}
174
patch -up4 --verbose < %{PATCH6}
175
%endif
176
177
# fake buildtime in audiodecoder.qsf
178
FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
179
FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%H:%%M:%%S')
180
for file in audiodecoder.qsf/lib/Highly_Quixotic/Core/qsound.c \
181
audiodecoder.ssf/lib/Highly_Theoretical/Core/Starscream/star.c \
182
audiodecoder.ssf/lib/Highly_Theoretical/Core/sega.c \
183
audiodecoder.timidity/lib/timidity/timidity/speex_a.c; do
184
sed -i -e "s/__DATE__/\"$FAKE_BUILDDATE\"/" -e "s/__TIME__/\"$FAKE_BUILDTIME\"/" $file
185
done
186
187
make VERBOSE=1 %{?_smp_mflags}
188
popd
189
190
%install
191
#make DESTDIR=%{buildroot} install %{?_smp_mflags}
192
193
%fdupes %{buildroot}
194
195
%files
196
%defattr(-,root,root)
197
%dir %{_libdir}/kodi
198
%dir %{_datadir}/kodi
199
%{_libdir}/kodi/PrepareEnv.cmake
200
201
%include %{SOURCE2}
202
203
%changelog
204