PKGBUILDs/alarm/kodi-c2/PKGBUILD

233 lines
7.8 KiB
Bash
Raw Normal View History

2017-08-26 00:40:53 +00:00
# vim:set ts=2 sw=2 et:
# $Id$
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: BlackIkeEagle < ike DOT devolder AT gmail DOT com >
# Contributor: graysky <graysky AT archlinux DOT us>
# Contributor: DonVla <donvla@users.sourceforge.net>
# Contributor: Ulf Winkelvos <ulf [at] winkelvos [dot] de>
# Contributor: Ralf Barth <archlinux dot org at haggy dot org>
# Contributor: B & monty - Thanks for your hints :)
# Contributor: marzoul
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Brad Fanella <bradfanella@archlinux.us>
# Contributor: [vEX] <niechift.dot.vex.at.gmail.dot.com>
# Contributor: Zeqadious <zeqadious.at.gmail.dot.com>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Maxime Gauduin <alucryd@gmail.com>
# Contributor: Jan Holthuis <holthuis dot jan at googlemail dot com>
#
# Original credits go to Edgar Hucek <gimli at dark-green dot com>
# for his xbmc-vdpau-vdr PKGBUILD at https://archvdr.svn.sourceforge.net/svnroot/archvdr/trunk/archvdr/xbmc-vdpau-vdr/PKGBUILD
2017-01-09 05:52:53 +00:00
2017-08-26 00:40:53 +00:00
buildarch=8
2017-01-09 05:52:53 +00:00
pkgbase=kodi-c2
2017-08-26 00:40:53 +00:00
pkgname=('kodi-c2' 'kodi-c2-eventclients' 'kodi-c2-tools-texturepacker' 'kodi-c2-dev')
pkgver=17.4
_commit=cf20c960135f7a9b702afbf7e252ab70cf22a1d9
pkgrel=2
2017-01-09 05:52:53 +00:00
arch=('aarch64')
url="http://kodi.tv"
license=('GPL2')
makedepends=(
2017-08-26 00:40:53 +00:00
'afpfs-ng' 'bluez-libs' 'boost' 'cmake' 'curl' 'cwiid' 'doxygen' 'glew'
2017-01-09 05:52:53 +00:00
'gperf' 'hicolor-icon-theme' 'jasper' 'java-runtime' 'libaacs' 'libass'
2017-08-26 00:40:53 +00:00
'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'
2017-01-09 05:52:53 +00:00
'shairplay' 'smbclient' 'swig' 'taglib' 'tinyxml' 'unzip' 'upower' 'yajl' 'zip'
2017-08-26 00:40:53 +00:00
'mesa' 'libcrossguid'
'odroid-c2-libgl-fb' 'odroid-c2-libgl-headers' 'aml-libs-c2'
2017-01-09 05:52:53 +00:00
)
2017-08-26 00:40:53 +00:00
source=(
"https://github.com/Owersun/xbmc/archive/${_commit}.tar.gz"
'fix-python-lib-path.patch'
'kodi_permissions.conf'
'kodi.service'
'polkit.rules'
'99-odroid.rules'
)
sha512sums=('a18d4104b1a901939f6b4e2a2f303f814fcae8518abc030894d260c1fc9bfbb6b897c11c5041375d835f483ee95fc5d12374534a8093fca2e5137d5a5725a807'
'0f41604e38648969572a66d1124d6e090c3bfca4f9d8ccabcd1806254c38b178ee08df35e1bbbd1228f820729df52353321b3257122af601c3233dbc6405c6d2'
'890ed1fb944c337ed04397db7b2c8de5ef74f25eb49936e2fec418baf279cfa7d3ba292ccd6beccb60f83dc94b020d068162bc2c9a4ede8392d64ad7edcd5601'
'9953861cd17ec4c31094a2b1ef7161df13759b4b840cbc0231650ffc5349aa3ce98d8b860b1109eac22c6dcd153c43e165ed3451e5dbe2a3dbe130db53c28ad4'
'2e28e1366b89a94848822ccf8f6874fc69c1b2ffd27b129132e793bc41d27652f87d53deb48ff9a1dc01050f39a2bafa16b58e2a9c1c0f3cdc4155cd357c9b2a'
'dcb23c9074a6f646c419957169642bfd565e004f221bd972ae6034bcc4ef6aa6f4f2bbda011c759fef769b682f7a686cc041a02e5326530bd1ad2011366d1529')
2017-01-09 05:52:53 +00:00
prepare() {
2017-08-26 00:40:53 +00:00
[[ -d kodi-build ]] && rm -rf kodi-build
mkdir kodi-build
2017-01-09 05:52:53 +00:00
2017-08-26 00:40:53 +00:00
cd "xbmc-$_commit"
patch -p1 -i "$srcdir/fix-python-lib-path.patch"
2017-01-09 05:52:53 +00:00
}
build() {
2017-08-26 00:40:53 +00:00
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 \
../"xbmc-$_commit"/project/cmake
make
make preinstall
2017-01-09 05:52:53 +00:00
}
2017-08-26 00:40:53 +00:00
# kodi
# components: kodi, kodi-bin
2017-01-09 05:52:53 +00:00
package_kodi-c2() {
pkgdesc="A software media player and entertainment hub for digital media (ODROID-C2)"
depends=(
2017-08-26 00:40:53 +00:00
'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'
2017-01-09 05:52:53 +00:00
)
optdepends=(
'afpfs-ng: Apple shares support'
'bluez: Blutooth support'
2017-08-26 00:40:53 +00:00
'python2-pybluez: Bluetooth support'
2017-01-09 05:52:53 +00:00
'libnfs: NFS shares support'
'libplist: AirPlay support'
2017-08-26 00:40:53 +00:00
'libcec: Pulse-Eight USB-CEC adapter support'
2017-01-09 05:52:53 +00:00
'lirc: Remote controller support'
2017-08-26 00:40:53 +00:00
'lsb-release: log distro information in crashlog'
2017-01-09 05:52:53 +00:00
'pulseaudio: PulseAudio support'
'shairplay: AirPlay support'
'unrar: Archives support'
'unzip: Archives support'
'upower: Display battery level'
)
install='kodi.install'
2017-08-26 00:40:53 +00:00
provides=('kodi' 'xbmc')
conflicts=('kodi' 'xbmc')
2017-01-09 05:52:53 +00:00
replaces=('xbmc')
2017-08-26 00:40:53 +00:00
_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
2017-01-09 05:52:53 +00:00
# Licenses
2017-08-26 00:40:53 +00:00
install -dm755 "$pkgdir/usr/share/licenses/$pkgname"
2017-01-09 05:52:53 +00:00
for licensef in LICENSE.GPL copying.txt; do
2017-08-26 00:40:53 +00:00
mv "$pkgdir/usr/share/doc/kodi/$licensef" \
"$pkgdir/usr/share/licenses/$pkgname"
2017-01-09 05:52:53 +00:00
done
2017-08-26 00:40:53 +00:00
# python2 is being used
cd "$pkgdir"
grep -lR '#!.*python' * | while read file; do sed -s 's/\(#!.*python\)/\12/g' -i "$file"; done
2017-01-09 05:52:53 +00:00
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
}
2017-08-26 00:40:53 +00:00
# kodi-eventclients
# components: kodi-eventclients-common kodi-eventclients-ps3 kodi-eventclients-wiiremote kodi-eventclients-xbmc-send
2017-01-09 05:52:53 +00:00
package_kodi-c2-eventclients() {
pkgdesc="Kodi Event Clients (ODROID-C2)"
provides=('kodi-eventclients')
conflicts=('kodi-eventclients')
2017-08-26 00:40:53 +00:00
2017-01-09 05:52:53 +00:00
depends=('cwiid')
2017-08-26 00:40:53 +00:00
_components=(
'kodi-eventclients-common'
'kodi-eventclients-ps3'
'kodi-eventclients-wiiremote'
'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
2017-01-09 05:52:53 +00:00
2017-08-26 00:40:53 +00:00
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
2017-01-09 05:52:53 +00:00
2017-08-26 00:40:53 +00:00
# python2 is being used
cd "$pkgdir"
grep -lR '#!.*python' * | while read file; do sed -s 's/\(#!.*python\)/\12/g' -i "$file"; done
2017-01-09 05:52:53 +00:00
}