]> git.pld-linux.org Git - packages/kodi.git/blame - kodi.spec
debugedit disable hack
[packages/kodi.git] / kodi.spec
CommitLineData
18b90c81 1# TODO:
3a71016a 2# - fix build flags - some files are compiled with -O3 and without rpm*flags
92b96980 3# - add and/or fix users/groups permissions
63ff963e 4# - split to subpackages?
928406b7 5# - bundled ffmpeg build (tools/depends/target/ffmpeg/autobuild.sh) enables nonfree & gpl!
18b90c81 6#
92b96980 7# Conditional build:
ceb94d36 8# Features:
c0d69361
ER
9%bcond_with afpclient # AFP support via libafpclient
10%bcond_without airplay # AirPlay support
11%bcond_with airtunes # AirTunes support
e148a10d
ER
12%bcond_without alsa # ALSA support
13%bcond_without avahi # Avahi support
ceb94d36
ER
14%bcond_without dbus # DBUS support
15%bcond_without dvdcss # DVDCSS support
98f23c16 16%bcond_without gl # OpenGL rendering
ceb94d36 17%bcond_with gtest # configure Google Test Framework
98f23c16 18%bcond_without joystick # SDL joystick support
c0d69361
ER
19%bcond_without libcap # libcap support
20%bcond_with libcec # libcec support
296d79de 21%bcond_without libgif # gif support via libgif
8ea15fa3 22%bcond_without libusb # libusb support
c0d69361 23%bcond_with mdnsembedded # mDNSEmbedded support
ceb94d36 24%bcond_without mysql # MySQL
8ea15fa3 25%bcond_without nfs # NFS support via libnfs
ceb94d36 26%bcond_without non_free # componentents with non-compliant licenses
c0d69361 27%bcond_with openmax # OpenMax decoding, requires OpenGLES
ceb94d36 28%bcond_without optical_drive # optical drive
98f23c16 29%bcond_without projectm # ProjectM visualisation
c0d69361 30%bcond_without pulse # PulseAudio support
c0d69361 31%bcond_without rtmp # RTMP support via librtmp
e148a10d 32%bcond_without samba # SAMBA support
c0d69361 33%bcond_without sdl # SDL
e148a10d 34%bcond_without ssh # SSH SFTP support
98f23c16 35%bcond_without texturepacker # texturepacker support
c0d69361 36%bcond_without udev # udev support
e148a10d 37%bcond_without upnp # UPnP support
c0d69361
ER
38%bcond_without vaapi # VAAPI decoding
39%bcond_without vdpau # VDPAU decoding
40%bcond_with vtbdecoder # VTBDecoder decoding (VTB Decoder not supported on this platform)
ceb94d36 41%bcond_without webserver # webserver
98f23c16
ER
42%bcond_without x11 # x11 'Linux Only'
43%bcond_without xrandr # XRandR support
e148a10d
ER
44%bcond_with asap_codec # ASAP ADPCM support
45%bcond_with gles # OpenGLES rendering
46%bcond_without libbluray # libbluray support
47%bcond_without mid # MID support
48%bcond_with profiling # gprof profiling
49%bcond_with tegra # Tegra2 arm
50%bcond_with wayland # wayland
ceb94d36 51# System libs:
6e5f6f0e 52%bcond_without system_ffmpeg # build with system ffmpeg
900271e7 53%bcond_with system_dvdread # build with system dvdread
92b96980 54
2d334bbb 55%define codename Leia
feda2953 56%define subver a2
d61811e9 57Summary: Kodi is a free and open source media-player and entertainment hub
92b53b2c 58Name: kodi
2d334bbb
ER
59Version: 18.0
60Release: 0.1
68612b1e 61License: GPL v2+ and GPL v3+
18b90c81 62Group: Applications/Multimedia
b7bd3c34 63#Source0: http://mirrors.kodi.tv/releases/source/%{version}-%{codename}.tar.gz
2d334bbb 64Source0: https://github.com/xbmc/xbmc/archive/%{version}%{subver}-%{codename}.tar.gz
feda2953 65# Source0-md5: 6e2262d8b38d4ed28f0b102e51eb9a8e
d2f0f4c7 66Patch0: jpeglib-boolean.patch
af2a7b89 67Patch1: disable-static.patch
e25cf996 68Patch2: dvdread.patch
3b89f97e
JR
69Patch3: ffmpeg3.patch
70Patch4: gcc5.patch
900271e7 71Patch5: libdvd.patch
92b53b2c 72URL: http://kodi.tv/
a7c53f4c 73BuildRequires: Mesa-libEGL-devel
8fa5c2e4 74BuildRequires: OpenGL-GLU-devel
b85db44b 75BuildRequires: OpenGL-devel
658b3aff 76BuildRequires: SDL2-devel
18b90c81 77BuildRequires: alsa-lib-devel
18b90c81 78BuildRequires: avahi-devel
b85db44b 79BuildRequires: bluez-libs-devel >= 4.99
18b90c81 80BuildRequires: bzip2-devel
be17bf9f 81BuildRequires: cmake >= 3.4
c3c3c480 82BuildRequires: crossguid-devel
18b90c81
SP
83BuildRequires: curl-devel
84BuildRequires: dbus-devel
c30f67e9 85BuildRequires: libfmt-devel >= 3.0.1
24867dbb 86BuildRequires: rapidjson-devel >= 1.1.0
8fa5c2e4 87# libavcodec >= 56.26.100 libavfilter >= 5.11.102 libavformat >= 56.25.101 libavutil >= 54.20.100 libpostproc >= 53.3.100 libswscale >= 3.1.101 libswresample >= 1.1.100
64d462c0 88%{?with_system_ffmpeg:BuildRequires: ffmpeg-devel >= 2.4.4}
5a2f2b01 89BuildRequires: flac-devel
18b90c81
SP
90BuildRequires: fontconfig-devel
91BuildRequires: freetype-devel
92BuildRequires: fribidi-devel
93BuildRequires: gawk
63ff963e 94BuildRequires: gettext-autopoint
0747666f 95BuildRequires: gettext-tools
a1f637af 96BuildRequires: giflib-devel
3a358a3c 97%{?with_libgif:BuildRequires: giflib-devel}
18b90c81 98BuildRequires: gperf
37fbe511 99BuildRequires: jre
20c6d413 100BuildRequires: lcms2-devel
b85db44b 101BuildRequires: libass-devel
a7c53f4c 102BuildRequires: libatomic-devel
296d79de 103BuildRequires: libbluray-devel >= 0.7.0
37fbe511 104BuildRequires: libcap-devel
18b90c81 105BuildRequires: libcdio-devel
8fa5c2e4
JB
106%{?with_libcec:BuildRequires: libcec-devel >= 3.0.0}
107BuildRequires: libdrm-devel
e25cf996 108%{?with_system_dvdread:BuildRequires: libdvdread-devel}
b85db44b 109BuildRequires: libgcrypt-devel
18b90c81 110BuildRequires: libjpeg-devel
45a200ab 111BuildRequires: libltdl-devel
63ff963e 112BuildRequires: libmicrohttpd-devel
18b90c81 113BuildRequires: libogg-devel
b85db44b 114BuildRequires: libplist-devel
5a2f2b01 115BuildRequires: libpng-devel
b85db44b 116BuildRequires: librtmp-devel
18b90c81 117BuildRequires: libsmbclient-devel
b85db44b 118BuildRequires: libssh-devel
8fa5c2e4 119BuildRequires: libstdc++-devel
5a2f2b01 120BuildRequires: libtool
f99f2533 121BuildRequires: libuuid-devel
b85db44b 122BuildRequires: libva-devel
f99f2533 123BuildRequires: libva-x11-devel
5a2f2b01 124BuildRequires: libvdpau-devel
18b90c81 125BuildRequires: libvorbis-devel
8fa5c2e4 126BuildRequires: libxml2-devel >= 2.0
501e1d3e 127BuildRequires: libxslt-devel
5a2f2b01 128BuildRequires: lzo-devel
129BuildRequires: mysql-devel
c1b45330 130%ifarch %{ix86}
26cae375 131BuildRequires: nasm
c1b45330 132%endif
18b90c81 133BuildRequires: openssl-devel
63ff963e 134BuildRequires: pcre-cxx-devel
5a2f2b01 135BuildRequires: pkgconfig
8fa5c2e4
JB
136BuildRequires: pulseaudio-devel >= 1.0
137BuildRequires: python-devel >= 1:2.6
3a71016a 138BuildRequires: rpm-pythonprov
6f41c837 139BuildRequires: rpmbuild(macros) >= 1.566
c462fd57 140BuildRequires: sed >= 4.0
18b90c81 141BuildRequires: sqlite3-devel
37fbe511
KK
142BuildRequires: swig
143BuildRequires: taglib-devel >= 1.8
8fa5c2e4 144BuildRequires: tinyxml-devel >= 2.6.2
b85db44b 145BuildRequires: udev-devel
5a2f2b01 146BuildRequires: unzip
b85db44b
AF
147BuildRequires: xorg-lib-libX11-devel
148BuildRequires: xorg-lib-libXext-devel
18b90c81 149BuildRequires: xorg-lib-libXrandr-devel
8fa5c2e4 150BuildRequires: yajl-devel >= 2
18b90c81
SP
151BuildRequires: zip
152BuildRequires: zlib-devel
af2a7b89
JR
153# kodi uses it's own, modified squish
154BuildConflicts: squish-devel
b85db44b 155#https://github.com/sahlberg/libnfs
57d594cf 156BuildRequires: libnfs-devel
b85db44b
AF
157#http://sites.google.com/site/alexthepuffin/home
158#BuildRequires: afpfs-ng-devel
8fa5c2e4 159#BuildRequires: shairplay-devel
63ff963e 160Requires: /usr/bin/glxinfo
f4f8f308 161Requires: SDL >= 1.2.14-5
a58652d4
SP
162Requires: lsb-release
163Requires: xorg-app-xdpyinfo
06c1bb12 164# dlopened libraries:
d61811e9 165# grep 'DLL_PATH_.*lib.*\.so' xbmc/DllPaths_generated.h | grep -v special://
06c1bb12
ER
166Requires: curl-libs
167Requires: libass
168Requires: libbluray
169Requires: libmodplug
170Requires: libmpeg2-libs
171Requires: libogg
172Requires: libplist
173Requires: libvorbis
92b53b2c 174Obsoletes: xbmc < 14.0
18b90c81
SP
175BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
176
4d53158d
ER
177# extracting debug info from /home/users/glen/tmp/kodi-18.0-root-glen/usr/lib64/kodi/kodi-x11
178# /usr/lib/rpm/bin/debugedit: canonicalization unexpectedly shrank by one character
179%define _noautostrip kodi-x11
180%define _enable_debug_packages 0
181
18b90c81 182%description
d61811e9
ER
183Kodi Entertainment Center (formerly XBMC) is a free and open-source
184media player software developed by the XBMC Foundation, a non-profit
185technology consortium. Kodi is available for multiple operating
186systems and hardware platforms, with a software 10-foot user interface
187for use with televisions and remote controls. It allows users to play
188and view most videos, music, such as podcasts from the internet, and
189all common digital media files from local and network storage media.
18b90c81
SP
190
191%prep
2d334bbb 192%setup -q -n xbmc-%{version}%{?subver}-%{codename}
6b5f5f8f 193#%patch0 -p1
af2a7b89 194%patch1 -p1
900271e7 195%{?with_system_dvdread:%patch2 -p1}
6b5f5f8f
ER
196#%patch3 -p1
197#%patch4 -p1
feda2953 198#%{!?with_system_dvdread:%patch5 -p1}
18b90c81 199
6b5f5f8f 200#%{__rm} -r lib/cximage-6.0/zlib
8fa5c2e4 201#%{__rm} -r lib/libhdhomerun
6b5f5f8f
ER
202#%{__rm} -r lib/libmpeg2
203#%{__rm} -r xbmc/cores/dvdplayer/DVDCodecs/Video/libmpeg2
204#%{__rm} -r lib/libbluray
b2628f52 205#%{__rm} -r lib/librtmp
8fa5c2e4 206%{__rm} -r lib/win32
b2628f52 207#%{?with_system_dvdread:%{__rm} -r lib/libdvd/libdvdread}
5d47de93 208
72cf5436 209%if %{without system_ffmpeg}
c3c3c480 210#ln -s %{SOURCE1} tools/depends/target/ffmpeg/ffmpeg-2.4.4-%{codename}.tar.gz
928406b7
ER
211%endif
212
18b90c81 213%build
be17bf9f
ER
214install -d build
215cd build
3257b104
ER
216# cmake not picking up include path from pkgconfig
217# https://trac.kodi.tv/ticket/16861
218%define specflags -I/usr/include/freetype2
219%cmake \
220 ..
be17bf9f 221%if 0
65712ad3 222%configure \
57d594cf 223 ac_cv_type__Bool=yes \
ace9791d 224 --disable-silent-rules \
51b524ca 225 --disable-debug \
ace9791d 226 --disable-ccache \
928406b7 227 --with-ffmpeg=%{!?with_system_ffmpeg:force}%{?with_system_ffmpeg:shared} \
c0d69361
ER
228 %{__enable_disable afpclient} \
229 %{__enable_disable airplay} \
230 %{__enable_disable airtunes} \
ceb94d36 231 %{__enable_disable alsa} \
e148a10d 232 %{__enable_disable asap_codec asap-codec} \
ceb94d36
ER
233 %{__enable_disable avahi} \
234 %{__enable_disable dbus} \
98f23c16 235 %{__enable_disable dvdcss} \
e148a10d 236 %{__enable_disable gles} \
98f23c16 237 %{__enable_disable gl} \
98f23c16 238 %{__enable_disable gtest} \
98f23c16 239 %{__enable_disable joystick} \
e148a10d 240 %{__enable_disable libbluray} \
c0d69361 241 %{__enable_disable libcap} \
98f23c16 242 %{__enable_disable libcec} \
296d79de 243 %{__enable_disable libgif} \
c0d69361
ER
244 %{__enable_disable libusb} \
245 %{__enable_disable mdnsembedded} \
e148a10d 246 %{__enable_disable mid} \
ceb94d36 247 %{__enable_disable mysql} \
c0d69361 248 %{__enable_disable nfs} \
ceb94d36 249 %{__enable_disable non_free non-free} \
c0d69361 250 %{__enable_disable openmax} \
ceb94d36 251 %{__enable_disable optical_drive optical-drive} \
e148a10d 252 %{__enable_disable profiling} \
c0d69361 253 %{__enable_disable pulse} \
c0d69361 254 %{__enable_disable rtmp} \
ceb94d36 255 %{__enable_disable samba} \
c0d69361 256 %{__enable_disable sdl} \
ceb94d36 257 %{__enable_disable ssh} \
e148a10d
ER
258 %{__enable_disable tegra} \
259 %{__enable_disable texturepacker} \
c0d69361 260 %{__enable_disable udev} \
ceb94d36 261 %{__enable_disable upnp} \
c0d69361
ER
262 %{__enable_disable vaapi} \
263 %{__enable_disable vdpau} \
264 %{__enable_disable vtbdecoder} \
e148a10d 265 %{__enable_disable wayland} \
ceb94d36 266 %{__enable_disable webserver} \
98f23c16
ER
267 %{__enable_disable x11} \
268 %{__enable_disable xrandr} \
269 %{nil}
be17bf9f 270%endif
68612b1e 271
be17bf9f 272%{__make}
18b90c81
SP
273
274%install
275rm -rf $RPM_BUILD_ROOT
be17bf9f 276%{__make} -C build install \
92b96980 277 DESTDIR=$RPM_BUILD_ROOT
18b90c81 278
e36884e8
ER
279%{__rm} $RPM_BUILD_ROOT%{_docdir}/{version.txt,copying.txt,README.linux,LICENSE.GPL}
280
281# not packaged
282%{__rm} $RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/kodi-*.xml
25890c53
ER
283
284# no -devel package yet
285%{__rm} -r $RPM_BUILD_ROOT%{_includedir}/kodi
a5bfc3a3 286
18b90c81
SP
287%clean
288rm -rf $RPM_BUILD_ROOT
289
290%files
291%defattr(644,root,root,755)
25890c53 292%doc README.md docs/README.linux
e36884e8 293%attr(755,root,root) %{_bindir}/TexturePacker
25890c53
ER
294%attr(755,root,root) %{_bindir}/kodi
295%attr(755,root,root) %{_bindir}/kodi-standalone
18b90c81 296%{_datadir}/%{name}
92b96980 297%attr(755,root,root) %{_libdir}/%{name}
25890c53
ER
298%{_desktopdir}/kodi.desktop
299%{_iconsdir}/hicolor/*/apps/%{name}.png
300%{_datadir}/xsessions/kodi.desktop
This page took 0.090206 seconds and 4 git commands to generate.