# vim:set ts=2 sw=2 et: # $Id$ # Maintainer: Sergej Pupykin # Maintainer: BlackIkeEagle < ike DOT devolder AT gmail DOT com > # Contributor: graysky # Contributor: DonVla # Contributor: Ulf Winkelvos # Contributor: Ralf Barth # Contributor: B & monty - Thanks for your hints :) # Contributor: marzoul # Contributor: Sergej Pupykin # Contributor: Brad Fanella # Contributor: [vEX] # Contributor: Zeqadious # Contributor: Bartłomiej Piotrowski # Contributor: Maxime Gauduin # Contributor: Jan Holthuis # # Original credits go to Edgar Hucek # for his xbmc-vdpau-vdr PKGBUILD at https://archvdr.svn.sourceforge.net/svnroot/archvdr/trunk/archvdr/xbmc-vdpau-vdr/PKGBUILD buildarch=8 pkgbase=kodi-c2 pkgname=('kodi-c2' 'kodi-c2-eventclients' 'kodi-c2-tools-texturepacker' 'kodi-c2-dev') _commit=7e7160eacdcb0c5b70e91dd4265d20358ba33c26 _codename=Krypton pkgver=17.6 pkgrel=5 arch=('aarch64') url="http://kodi.tv" license=('GPL2') makedepends=( 'afpfs-ng' 'bluez-libs' 'boost' 'cmake' 'curl' 'doxygen' 'glew' 'gperf' 'hicolor-icon-theme' 'jasper' 'java-runtime' 'libaacs' 'libass' 'libbluray' 'libcdio' 'libcec' 'libgl' 'libmariadbclient' 'libmicrohttpd' 'libmodplug' 'libmpeg2' 'libnfs' 'libplist' 'libpulse' 'libssh' 'libva' 'libvdpau' 'libxrandr' 'libxslt' 'lzo' 'nasm' 'nss-mdns' 'python2-pillow' 'python2-pybluez' 'python2-simplejson' 'rtmpdump' 'shairplay' 'smbclient' 'swig' 'taglib' 'tinyxml' 'unzip' 'upower' 'yajl' 'zip' 'mesa' 'odroid-c2-libgl-fb' 'odroid-c2-libgl-headers' 'aml-libs-c2' ) _libdvdcss_commit="2f12236bc1c92f73c21e973363f79eb300de603f" _libdvdnav_commit="981488f7f27554b103cca10c1fbeba027396c94a" _libdvdread_commit="17d99db97e7b8f23077b342369d3c22a6250affd" _ffmpeg_version="3.1.11-$_codename-17.5" _crossguid_version="8f399e8bd4" source=( "$pkgbase-$pkgver-$_codename.tar.gz::https://github.com/Owersun/xbmc/archive/${_commit}.tar.gz" "$pkgbase-libdvdcss-$_libdvdcss_commit.tar.gz::https://github.com/xbmc/libdvdcss/archive/$_libdvdcss_commit.tar.gz" "$pkgbase-libdvdnav-$_libdvdnav_commit.tar.gz::https://github.com/xbmc/libdvdnav/archive/$_libdvdnav_commit.tar.gz" "$pkgbase-libdvdread-$_libdvdread_commit.tar.gz::https://github.com/xbmc/libdvdread/archive/$_libdvdread_commit.tar.gz" "$pkgbase-ffmpeg-$_ffmpeg_version.tar.gz::https://github.com/xbmc/FFmpeg/archive/$_ffmpeg_version.tar.gz" "http://mirrors.kodi.tv/build-deps/sources/crossguid-$_crossguid_version.tar.gz" 'fix-python-lib-path.patch' 'kodi_permissions.conf' 'kodi.service' 'polkit.rules' '99-odroid.rules') sha256sums=('aafe2852620a6bc62c929bf1bdb24760e7e9573787ca4dd37aceed2d1dbb32dd' 'b6eb2d929ff56cb051152c32010afc5e7cf5fe8c5ae32dca412a2b46b6b57e34' '312b3d15bc448d24e92f4b2e7248409525eccc4e75776026d805478e51c5ef3d' 'e7179b2054163652596a56301c9f025515cb08c6d6310b42b897c3ad11c0199b' '7df8bce40765b39de5766ca9d08b5b9ac1f498c65c805c989461b907cee6b7c0' '3d77d09a5df0de510aeeb940df4cb534787ddff3bb1828779753f5dfa1229d10' '1c07c9fdd8e2958262cf917e4266c4933fcd06529c111e3cb0cbaaa05c934033' '8c606f29aa9ec90f4c93e1751cfd4000872937e604e6ad7538b96ba29612d2f6' '03c89e8c15603ae1f61f632da5e283adc3d30a260d83bd51199b2eaa88638ab6' 'c68ed2bd377f80b606b8815d78239b9132b479eafc1d19797cee5824debe1800' '5ddf80329c9f5d054525b45f788b3405d199bfc6cf5b08c543ad29766ec27f6e') noextract=(  "$pkgbase-libdvdcss-$_libdvdcss_commit.tar.gz"  "$pkgbase-libdvdnav-$_libdvdnav_commit.tar.gz"  "$pkgbase-libdvdread-$_libdvdread_commit.tar.gz" "$pkgbase-ffmpeg-$_ffmpeg_version.tar.gz" "crossguid-$_crossguid_version.tar.gz" ) prepare() { [[ -d kodi-build ]] && rm -rf kodi-build mkdir kodi-build cd "xbmc-$_commit" patch -p1 -i "$srcdir/fix-python-lib-path.patch" } build() { cd kodi-build cmake -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=/usr/lib \ -DENABLE_EVENTCLIENTS=ON \ -DLIRC_DEVICE=/run/lirc/lircd \ -DENABLE_AML=ON \ -DENABLE_OPENGL=OFF \ -DENABLE_OPENGLES=ON \ -DENABLE_PULSEAUDIO=OFF \ -DENABLE_VAAPI=OFF \ -DENABLE_VDPAU=OFF \ -DENABLE_X11=OFF \ -Dlibdvdcss_URL="$srcdir/$pkgbase-libdvdcss-$_libdvdcss_commit.tar.gz" \  -Dlibdvdnav_URL="$srcdir/$pkgbase-libdvdnav-$_libdvdnav_commit.tar.gz" \  -Dlibdvdread_URL="$srcdir/$pkgbase-libdvdread-$_libdvdread_commit.tar.gz" \  -DFFMPEG_URL="$srcdir/$pkgbase-ffmpeg-$_ffmpeg_version.tar.gz" \ -DCROSSGUID_URL="$srcdir/crossguid-$_crossguid_version.tar.gz" \ -DENABLE_INTERNAL_CROSSGUID=ON \  ../"xbmc-$_commit"/project/cmake make make preinstall } # kodi # components: kodi, kodi-bin package_kodi-c2() { pkgdesc="A software media player and entertainment hub for digital media (ODROID-C2)" depends=( 'python2-pillow' 'python2-simplejson' 'xorg-xdpyinfo' 'bluez-libs' 'fribidi' 'freetype2' 'glew' 'hicolor-icon-theme' 'libcdio' 'libjpeg-turbo' 'libmariadbclient' 'libmicrohttpd' 'libpulse' 'libssh' 'libva' 'libvdpau' 'libxrandr' 'libxslt' 'lzo' 'smbclient' 'taglib' 'tinyxml' 'yajl' 'mesa' 'desktop-file-utils' 'odroid-c2-libgl-fb' 'aml-libs-c2' ) optdepends=( 'afpfs-ng: Apple shares support' 'bluez: Blutooth support' 'python2-pybluez: Bluetooth support' 'libnfs: NFS shares support' 'libplist: AirPlay support' 'libcec: Pulse-Eight USB-CEC adapter support' 'lirc: Remote controller support' 'lsb-release: log distro information in crashlog' 'pulseaudio: PulseAudio support' 'shairplay: AirPlay support' 'unrar: Archives support' 'unzip: Archives support' 'upower: Display battery level' ) install='kodi.install' provides=('kodi' 'xbmc') conflicts=('kodi' 'xbmc') replaces=('xbmc') _components=( 'kodi' 'kodi-bin' ) cd kodi-build # install eventclients for _cmp in ${_components[@]}; do DESTDIR="$pkgdir" /usr/bin/cmake \ -DCMAKE_INSTALL_COMPONENT="$_cmp" \ -P cmake_install.cmake done # Licenses install -dm755 "$pkgdir/usr/share/licenses/$pkgname" for licensef in LICENSE.GPL copying.txt; do mv "$pkgdir/usr/share/doc/kodi/$licensef" \ "$pkgdir/usr/share/licenses/$pkgname" done # python2 is being used cd "$pkgdir" grep -lR '#!.*python' * | while read file; do sed -s 's/\(#!.*python\)/\12/g' -i "$file"; done install -Dm0644 $srcdir/kodi_permissions.conf $pkgdir/etc/tmpfiles.d/kodi_permissions.conf install -Dm0644 $srcdir/kodi.service $pkgdir/usr/lib/systemd/system/kodi.service install -Dm0644 $srcdir/polkit.rules $pkgdir/etc/polkit-1/rules.d/10-kodi.rules # fix permissions necessary for accelerated video playback install -Dm0644 $srcdir/99-odroid.rules $pkgdir/etc/udev/rules.d/99-odroid.rules } # kodi-eventclients # components: kodi-eventclients-common kodi-eventclients-ps3 kodi-eventclients-wiiremote kodi-eventclients-xbmc-send package_kodi-c2-eventclients() { pkgdesc="Kodi Event Clients (ODROID-C2)" provides=('kodi-eventclients') conflicts=('kodi-eventclients') _components=( 'kodi-eventclients-common' 'kodi-eventclients-ps3' 'kodi-eventclients-xbmc-send' ) cd kodi-build # install eventclients for _cmp in ${_components[@]}; do DESTDIR="$pkgdir" /usr/bin/cmake \ -DCMAKE_INSTALL_COMPONENT="$_cmp" \ -P cmake_install.cmake done # python2 is being used cd "$pkgdir" grep -lR '#!.*python' * | while read file; do sed -s 's/\(#!.*python\)/\12/g' -i "$file"; done } # kodi-tools-texturepacker # components: kodi-tools-texturepacker package_kodi-c2-tools-texturepacker() { pkgdesc="Kodi Texturepacker tool (ODROID-C2)" depends=('libpng' 'giflib' 'libjpeg-turbo' 'lzo') provides=('kodi-tools-texturepacker') conflicts=('kodi-tools-texturepacker') _components=( 'kodi-tools-texturepacker' ) cd kodi-build # install eventclients for _cmp in ${_components[@]}; do DESTDIR="$pkgdir" /usr/bin/cmake \ -DCMAKE_INSTALL_COMPONENT="$_cmp" \ -P cmake_install.cmake done } # kodi-dev # components: 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 package_kodi-c2-dev() { pkgdesc="Kodi dev files (ODROID-C2)" depends=('kodi') provides=('kodi-dev') conflicts=('kodi-dev') _components=( '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' ) cd kodi-build # install eventclients for _cmp in ${_components[@]}; do DESTDIR="$pkgdir" /usr/bin/cmake \ -DCMAKE_INSTALL_COMPONENT="$_cmp" \ -P cmake_install.cmake done # python2 is being used cd "$pkgdir" grep -lR '#!.*python' * | while read file; do sed -s 's/\(#!.*python\)/\12/g' -i "$file"; done }