]> git.pld-linux.org Git - packages/kodi.git/blame - kodi.spec
fix libgif package name
[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
e25cf996 53%bcond_without system_dvdread # build with system dvdread
92b96980 54
c3c3c480 55%define codename Jarvis
d61811e9 56Summary: Kodi is a free and open source media-player and entertainment hub
92b53b2c 57Name: kodi
b7bd3c34 58Version: 16.1
aad0ff31 59Release: 1
68612b1e 60License: GPL v2+ and GPL v3+
18b90c81 61Group: Applications/Multimedia
b7bd3c34
ER
62#Source0: http://mirrors.kodi.tv/releases/source/%{version}-%{codename}.tar.gz
63Source0: https://github.com/xbmc/xbmc/archive/%{version}-%{codename}.tar.gz
64# Source0-md5: 79358ad5f77f42c5498a9412d5a78dd5
d2f0f4c7 65Patch0: jpeglib-boolean.patch
af2a7b89 66Patch1: disable-static.patch
e25cf996 67Patch2: dvdread.patch
3b89f97e
JR
68Patch3: ffmpeg3.patch
69Patch4: gcc5.patch
92b53b2c 70URL: http://kodi.tv/
b85db44b
AF
71BuildRequires: Mesa-libGLU-devel
72BuildRequires: OpenGL-devel
658b3aff 73BuildRequires: SDL2-devel
18b90c81
SP
74BuildRequires: SDL_image-devel
75BuildRequires: SDL_mixer-devel
76BuildRequires: alsa-lib-devel
77BuildRequires: autoconf
78BuildRequires: automake
79BuildRequires: avahi-devel
b85db44b 80BuildRequires: bluez-libs-devel >= 4.99
5a2f2b01 81BuildRequires: boost-devel
18b90c81
SP
82BuildRequires: bzip2-devel
83BuildRequires: cmake
c3c3c480 84BuildRequires: crossguid-devel
18b90c81
SP
85BuildRequires: curl-devel
86BuildRequires: dbus-devel
6069f65f 87BuildRequires: dcadec-devel
501e1d3e 88BuildRequires: doxygen
64d462c0 89%{?with_system_ffmpeg:BuildRequires: ffmpeg-devel >= 2.4.4}
5a2f2b01 90BuildRequires: flac-devel
18b90c81
SP
91BuildRequires: fontconfig-devel
92BuildRequires: freetype-devel
93BuildRequires: fribidi-devel
94BuildRequires: gawk
63ff963e 95BuildRequires: gettext-autopoint
0747666f 96BuildRequires: gettext-tools
a1f637af 97BuildRequires: giflib-devel
3a358a3c 98%{?with_libgif:BuildRequires: giflib-devel}
18b90c81
SP
99BuildRequires: glew-devel
100BuildRequires: gperf
5a2f2b01 101BuildRequires: jasper-devel
37fbe511 102BuildRequires: jre
b85db44b 103BuildRequires: libass-devel
296d79de 104BuildRequires: libbluray-devel >= 0.7.0
37fbe511 105BuildRequires: libcap-devel
18b90c81 106BuildRequires: libcdio-devel
296d79de 107%{?with_libcec:BuildRequires: libcec-devel >= 2.1.0}
e25cf996 108%{?with_system_dvdread:BuildRequires: libdvdread-devel}
1aef2bca 109%ifarch i686 pentium4 athlon %{x8664}
5f83fc0f 110BuildRequires: libcrystalhd-devel
1aef2bca 111%endif
b85db44b 112BuildRequires: libgcrypt-devel
18b90c81 113BuildRequires: libjpeg-devel
45a200ab 114BuildRequires: libltdl-devel
18b90c81 115BuildRequires: libmad-devel
63ff963e 116BuildRequires: libmicrohttpd-devel
63ff963e 117BuildRequires: libmodplug-devel
c462fd57 118BuildRequires: libmpeg2-devel
18b90c81 119BuildRequires: libogg-devel
b85db44b 120BuildRequires: libplist-devel
5a2f2b01 121BuildRequires: libpng-devel
b85db44b 122BuildRequires: librtmp-devel
18b90c81
SP
123BuildRequires: libsamplerate-devel
124BuildRequires: libsmbclient-devel
b85db44b 125BuildRequires: libssh-devel
5a2f2b01 126BuildRequires: libtiff-devel
127BuildRequires: libtool
b85db44b 128BuildRequires: libva-devel
5f83fc0f 129BuildRequires: libva-glx-devel
5a2f2b01 130BuildRequires: libvdpau-devel
18b90c81 131BuildRequires: libvorbis-devel
501e1d3e 132BuildRequires: libxslt-devel
5a2f2b01 133BuildRequires: lzo-devel
134BuildRequires: mysql-devel
c1b45330 135%ifarch %{ix86}
26cae375 136BuildRequires: nasm
c1b45330 137%endif
18b90c81 138BuildRequires: openssl-devel
63ff963e 139BuildRequires: pcre-cxx-devel
5a2f2b01 140BuildRequires: pkgconfig
18b90c81 141BuildRequires: pulseaudio-devel
b85db44b 142BuildRequires: python-devel >= 2.4
3a71016a 143BuildRequires: rpm-pythonprov
6f41c837 144BuildRequires: rpmbuild(macros) >= 1.566
c462fd57 145BuildRequires: sed >= 4.0
18b90c81 146BuildRequires: sqlite3-devel
37fbe511
KK
147BuildRequires: swig
148BuildRequires: taglib-devel >= 1.8
7613a43d 149BuildRequires: tinyxml-devel
b85db44b 150BuildRequires: udev-devel
5a2f2b01 151BuildRequires: unzip
b85db44b
AF
152BuildRequires: xorg-lib-libX11-devel
153BuildRequires: xorg-lib-libXext-devel
5a2f2b01 154BuildRequires: xorg-lib-libXinerama-devel
b85db44b 155BuildRequires: xorg-lib-libXmu-devel
18b90c81 156BuildRequires: xorg-lib-libXrandr-devel
b85db44b 157BuildRequires: xorg-lib-libXt-devel
5a2f2b01 158BuildRequires: xorg-lib-libXtst-devel
b85db44b 159BuildRequires: yajl-devel
501e1d3e 160BuildRequires: yasm
18b90c81
SP
161BuildRequires: zip
162BuildRequires: zlib-devel
af2a7b89
JR
163# kodi uses it's own, modified squish
164BuildConflicts: squish-devel
b85db44b 165#https://github.com/sahlberg/libnfs
57d594cf 166BuildRequires: libnfs-devel
b85db44b
AF
167#http://sites.google.com/site/alexthepuffin/home
168#BuildRequires: afpfs-ng-devel
169#http://mirrors.xbmc.org/build-deps/darwin-libs/libshairport-1.2.0.20310_lib.tar.gz
170#https://github.com/albertz/shairport
171#BuildRequires: libshairport
63ff963e 172Requires: /usr/bin/glxinfo
f4f8f308 173Requires: SDL >= 1.2.14-5
a58652d4
SP
174Requires: lsb-release
175Requires: xorg-app-xdpyinfo
06c1bb12 176# dlopened libraries:
d61811e9 177# grep 'DLL_PATH_.*lib.*\.so' xbmc/DllPaths_generated.h | grep -v special://
06c1bb12
ER
178Requires: curl-libs
179Requires: libass
180Requires: libbluray
181Requires: libmodplug
182Requires: libmpeg2-libs
183Requires: libogg
184Requires: libplist
185Requires: libvorbis
92b53b2c 186Obsoletes: xbmc < 14.0
18b90c81
SP
187BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
188
189%description
d61811e9
ER
190Kodi Entertainment Center (formerly XBMC) is a free and open-source
191media player software developed by the XBMC Foundation, a non-profit
192technology consortium. Kodi is available for multiple operating
193systems and hardware platforms, with a software 10-foot user interface
194for use with televisions and remote controls. It allows users to play
195and view most videos, music, such as podcasts from the internet, and
196all common digital media files from local and network storage media.
18b90c81
SP
197
198%prep
92b53b2c 199%setup -q -n xbmc-%{version}-%{codename}
bfa116d7 200%patch0 -p1
af2a7b89 201%patch1 -p1
05c4c454 202%{?with_system_dvdread:%patch2 -p1}
3b89f97e 203%patch3 -p1
c3c3c480 204#%patch4 -p1
18b90c81 205
5d47de93
ER
206rm -r lib/cximage-6.0/zlib
207#rm -r lib/libhdhomerun
208rm -r lib/libmpeg2
209rm -r xbmc/cores/dvdplayer/DVDCodecs/Video/libmpeg2
5d47de93 210rm -r lib/libbluray
5d47de93
ER
211rm -r lib/librtmp
212rm -r lib/win32
05c4c454 213%{?with_system_dvdread:rm -r lib/libdvd/libdvdread}
5d47de93 214
72cf5436 215%if %{without system_ffmpeg}
c3c3c480 216#ln -s %{SOURCE1} tools/depends/target/ffmpeg/ffmpeg-2.4.4-%{codename}.tar.gz
928406b7
ER
217%endif
218
18b90c81 219%build
c3c3c480
ER
220%{__make} -C tools/depends/native/libsquish-native \
221 CXX="%{__cxx}"
222
18b90c81 223./bootstrap
65712ad3 224%configure \
57d594cf 225 ac_cv_type__Bool=yes \
ace9791d 226 --disable-silent-rules \
51b524ca 227 --disable-debug \
ace9791d 228 --disable-ccache \
928406b7 229 --with-ffmpeg=%{!?with_system_ffmpeg:force}%{?with_system_ffmpeg:shared} \
c0d69361
ER
230 %{__enable_disable afpclient} \
231 %{__enable_disable airplay} \
232 %{__enable_disable airtunes} \
ceb94d36 233 %{__enable_disable alsa} \
e148a10d 234 %{__enable_disable asap_codec asap-codec} \
ceb94d36
ER
235 %{__enable_disable avahi} \
236 %{__enable_disable dbus} \
98f23c16 237 %{__enable_disable dvdcss} \
e148a10d 238 %{__enable_disable gles} \
98f23c16 239 %{__enable_disable gl} \
98f23c16 240 %{__enable_disable gtest} \
98f23c16 241 %{__enable_disable joystick} \
e148a10d 242 %{__enable_disable libbluray} \
c0d69361 243 %{__enable_disable libcap} \
98f23c16 244 %{__enable_disable libcec} \
296d79de 245 %{__enable_disable libgif} \
c0d69361
ER
246 %{__enable_disable libusb} \
247 %{__enable_disable mdnsembedded} \
e148a10d 248 %{__enable_disable mid} \
ceb94d36 249 %{__enable_disable mysql} \
c0d69361 250 %{__enable_disable nfs} \
ceb94d36 251 %{__enable_disable non_free non-free} \
c0d69361 252 %{__enable_disable openmax} \
ceb94d36 253 %{__enable_disable optical_drive optical-drive} \
e148a10d 254 %{__enable_disable profiling} \
c0d69361 255 %{__enable_disable pulse} \
c0d69361 256 %{__enable_disable rtmp} \
ceb94d36 257 %{__enable_disable samba} \
c0d69361 258 %{__enable_disable sdl} \
ceb94d36 259 %{__enable_disable ssh} \
e148a10d
ER
260 %{__enable_disable tegra} \
261 %{__enable_disable texturepacker} \
c0d69361 262 %{__enable_disable udev} \
ceb94d36 263 %{__enable_disable upnp} \
c0d69361
ER
264 %{__enable_disable vaapi} \
265 %{__enable_disable vdpau} \
266 %{__enable_disable vtbdecoder} \
e148a10d 267 %{__enable_disable wayland} \
ceb94d36 268 %{__enable_disable webserver} \
98f23c16
ER
269 %{__enable_disable x11} \
270 %{__enable_disable xrandr} \
271 %{nil}
68612b1e 272
00f4b5ab 273%{__make} V=1
18b90c81
SP
274
275%install
276rm -rf $RPM_BUILD_ROOT
18b90c81 277%{__make} install \
92b96980 278 DESTDIR=$RPM_BUILD_ROOT
18b90c81 279
25890c53
ER
280%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
281
282# no -devel package yet
283%{__rm} -r $RPM_BUILD_ROOT%{_includedir}/kodi
284%{__rm} -r $RPM_BUILD_ROOT%{_includedir}/xbmc
285
a5bfc3a3
ER
286# no real use for symlinks to datadir, and make rpm packaging more difficult (symlink vs dir issues)
287%{__rm} $RPM_BUILD_ROOT%{_libdir}/xbmc
288%{__rm} $RPM_BUILD_ROOT%{_datadir}/xbmc
289
18b90c81
SP
290%clean
291rm -rf $RPM_BUILD_ROOT
292
293%files
294%defattr(644,root,root,755)
25890c53
ER
295%doc README.md docs/README.linux
296%attr(755,root,root) %{_bindir}/kodi
297%attr(755,root,root) %{_bindir}/kodi-standalone
18b90c81 298%{_datadir}/%{name}
92b96980 299%attr(755,root,root) %{_libdir}/%{name}
25890c53
ER
300%{_desktopdir}/kodi.desktop
301%{_iconsdir}/hicolor/*/apps/%{name}.png
302%{_datadir}/xsessions/kodi.desktop
303
304# legacy xbmc compatibility links
305%attr(755,root,root) %{_bindir}/xbmc
306%attr(755,root,root) %{_bindir}/xbmc-standalone
25890c53 307%{_datadir}/xsessions/xbmc.desktop
This page took 0.75493 seconds and 4 git commands to generate.