description="A software media player and entertainment hub for digital media" url="http://kodi.tv" contributors="tnut, Rems" packager="tnut " name=kodi version=18.5 makedepends=(bluez cmake curl doxygen glew gperf hicolor-icon-theme jasper libaacs libass libbluray libcdio libcec mariadb libmicrohttpd libmodplug libmpeg2 nfs-utils libplist pulseaudio libssh libva libvdpau xorg-libxrandr libxslt lzo mesa nasm nss-mdns python2-pillow python2-bluez python2-simplejson rtmpdump shairplay samba speex swig taglib tinyxml unzip upower yajl zip git giflib libdvdcss libdvdnav libdvdread ffmpeg lirc lsb-release unrar desktop-file-utils xorg-xdpyinfo fribidi flatbuffers fmt fstrcmp rapidjson) run=(hicolor-icon-theme libaacs bluez python2-bluez libplist libcec lsb-release pulseaudio shairplay unrar unzip upower libva libvdpau libssh desktop-file-utils samba xorg-xdpyinfo taglib speex fribidi xorg-libxrandr) PKGMK_KEEP_SOURCES="no" source=(https://github.com/xbmc/xbmc/archive/$version-Leia.tar.gz cpuinfo) _components=( kodi kodi-bin kodi-eventclients-common kodi-eventclients-ps3 kodi-eventclients-xbmc-send kodi-tools-texturepacker kodi-addon-dev kodi-audio-dev kodi-eventclients-dev kodi-game-dev kodi-inputstream-dev kodi-peripheral-dev kodi-pvr-dev kodi-screensaver-dev kodi-visualization-dev) prepare() { [[ -d kodi-build ]] && rm -rvf kodi-build mkdir -v kodi-build } build() { cd kodi-build cmake -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=/usr/lib \ -DENABLE_EVENTCLIENTS=ON \ -DENABLE_BLUETOOTH=ON \ -DLIRC_DEVICE=/run/lirc/lircd \ ../"xbmc-$version-Leia"/ make make preinstall } package() { cd kodi-build for _cmp in ${_components[@]} do DESTDIR=$PKG /usr/bin/cmake \ -DCMAKE_INSTALL_COMPONENT="$_cmp" \ -P cmake_install.cmake done cd $PKG grep -lR '#!.*python' * | while read file; do sed -s 's/\(#!.*python\)/\12/g' -i "$file"; done }