mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-08 23:03:46 +00:00
207 lines
7.5 KiB
Bash
207 lines
7.5 KiB
Bash
# Contributor graysky <graysky AT archlinux DOT org>
|
|
# Contributor BlackIkeEagle < ike DOT devolder AT gmail DOT com >
|
|
# Contributor Oleg Rakhmanov <oleg [at] archlinuxarm [dot] com>
|
|
# Contributor tomasgroth at yahoo.dk
|
|
# Contributor WarheadsSE <max@warheads.net>
|
|
# Contributor Adrian Fedoreanu <adrian [dot] fedoreanu [at] gmail [dot] com>
|
|
|
|
buildarch=20
|
|
|
|
_prefix=/usr
|
|
|
|
pkgbase=kodi-rbp-git
|
|
_suffix=rbp-git
|
|
pkgname=("kodi-$_suffix" "kodi-eventclients-$_suffix" "kodi-tools-texturepacker-$_suffix" "kodi-dev-$_suffix")
|
|
pkgver=17.4rc1.20170811
|
|
_tag=17.4rc1-Krypton
|
|
pkgrel=3
|
|
arch=('armv6h' 'armv7h')
|
|
url="http://kodi.tv"
|
|
license=('GPL2')
|
|
makedepends=('hicolor-icon-theme' 'fribidi' 'lzo' 'smbclient' 'libtiff' 'libva' 'libpng' 'libcdio'
|
|
'yajl' 'libmariadbclient' 'libjpeg-turbo' 'libsamplerate' 'libssh' 'libmicrohttpd'
|
|
'sdl_image' 'python2' 'python2-pillow' 'python2-pybluez' 'python2-simplejson' 'libass'
|
|
'libmpeg2' 'libmad' 'libmodplug' 'jasper' 'rtmpdump' 'unzip' 'xorg-xdpyinfo' 'libbluray'
|
|
'libnfs' 'afpfs-ng' 'avahi' 'bluez-libs' 'tinyxml' 'raspberrypi-firmware' 'libcec-rpi'
|
|
'libplist' 'swig' 'taglib' 'libxslt' 'shairplay' 'boost' 'cmake' 'gperf' 'nasm' 'zip'
|
|
'upower' 'git' 'autoconf' 'java-environment' 'dcadec' 'libpulse')
|
|
source=("xbmc-$_tag.tar.gz::https://github.com/xbmc/xbmc/archive/$_tag.tar.gz"
|
|
'kodi.service'
|
|
'99-kodi.rules'
|
|
'https://github.com/popcornmix/xbmc/commit/0c320b6cdd4fb409be45008e6b9042463d54b742.patch'
|
|
'https://github.com/popcornmix/xbmc/commit/4d983105d7fd65b1d92f2ae2602e6e1cdcaddbe0.patch'
|
|
'polkit.rules'
|
|
'hifiberry_digi.patch'
|
|
'fix-python-lib-path.patch')
|
|
|
|
sha256sums=('dd0604419528e00e14669c5c2ae9285ea60a7588eebf203bd2f399f9b8033e8c'
|
|
'5235068d5800d69f0287087815990e7fe8d6572733d60c8800546d35f608e87f'
|
|
'b31570f95654434b01fd8531612fbb6be77cbc1c519dd60f92feae26eb160f3d'
|
|
'6f23df9cf214502f0a446edf07b18ce1855e549cabb1cd94ac9180770ba48ee4'
|
|
'82057eccc4cadbd568dda76103dcc667754194e926ede78e43d70b3a17bbb5e5'
|
|
'9ea592205023ba861603d74b63cdb73126c56372a366dc4cb7beb379073cbb96'
|
|
'0b9d951911a8576c26dec8a31f394282677e48afff49b9579448121d27b8509e'
|
|
'1c07c9fdd8e2958262cf917e4266c4933fcd06529c111e3cb0cbaaa05c934033')
|
|
|
|
prepare() {
|
|
cd "$srcdir/xbmc-$_tag"
|
|
# python2 path fix
|
|
patch -p1 -i "$srcdir/fix-python-lib-path.patch"
|
|
|
|
# ffmpeg: Automatic switch to software decode for GMC with more than one warp point
|
|
patch -Np1 -i "$srcdir/0c320b6cdd4fb409be45008e6b9042463d54b742.patch"
|
|
# fix for files with GMC
|
|
patch -Np1 -i "$srcdir/4d983105d7fd65b1d92f2ae2602e6e1cdcaddbe0.patch"
|
|
# fix for lack of passthrough audio with hifiberry-digi+ card
|
|
patch -Np1 -i "$srcdir/hifiberry_digi.patch"
|
|
|
|
[[ -d kodi-build ]] && rm -rf kodi-build
|
|
mkdir $srcdir/kodi-build
|
|
}
|
|
|
|
build() {
|
|
cd kodi-build
|
|
|
|
# -DCPU=arm1176jzf-s for rpi1
|
|
# -DCPU=cortex-a7 for rpi2
|
|
# -DCPU=cortex-a53 for rpi3
|
|
|
|
[[ $CARCH == "armv6h" ]] && _CPU=arm1176jzf-s && LDFLAGS+=" -latomic"
|
|
[[ $CARCH == "armv7h" ]] && _CPU=cortex-a7
|
|
|
|
# needed to avoid bad value on build/lib/libcrossguid.a
|
|
CFLAGS+=" -fPIC"
|
|
CXXFLAGS+=" -fPIC"
|
|
|
|
cmake -DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
|
|
-DCMAKE_PREFIX_PATH=/opt/vc \
|
|
-DCORE_SYSTEM_NAME=rbpi \
|
|
-DWITH_CPU="$_CPU" \
|
|
-DENABLE_EVENTCLIENTS=ON \
|
|
-DENABLE_OPENGL=OFF \
|
|
-DENABLE_X11=OFF \
|
|
-DENABLE_VAAPI=OFF \
|
|
-DENABLE_VDPAU=OFF \
|
|
-DENABLE_INTERNAL_CROSSGUID=ON \
|
|
-DLIRC_DEVICE=/run/lirc/lircd \
|
|
../"xbmc-$_tag"/project/cmake
|
|
|
|
make
|
|
make preinstall
|
|
}
|
|
|
|
package_kodi-rbp-git() {
|
|
pkgdesc="A software media player and entertainment hub for digital media (Raspberry Pi)"
|
|
depends=('hicolor-icon-theme' 'fribidi' 'lzo' 'smbclient' 'libtiff' 'libva' 'libpng' 'libcdio'
|
|
'yajl' 'libmariadbclient' 'libjpeg-turbo' 'libsamplerate' 'libssh' 'libmicrohttpd'
|
|
'sdl_image' 'python2' 'python2-pillow' 'python2-pybluez' 'python2-simplejson' 'libass'
|
|
'libmpeg2' 'libmad' 'libmodplug' 'jasper' 'rtmpdump' 'xorg-xdpyinfo' 'libbluray'
|
|
'avahi' 'bluez-libs' 'tinyxml' 'raspberrypi-firmware' 'libpulse'
|
|
'libplist' 'swig' 'taglib' 'libxslt')
|
|
optdepends=(
|
|
'afpfs-ng: Apple airplay and AFP share support'
|
|
'libcec-rpi: Pulse-Eight USB-CEC adapter support'
|
|
'libnfs: NFS shares support'
|
|
'lirc: remote controller support'
|
|
'lsb-release: log distro information in crashlog'
|
|
'polkit: permissions for automounting external drives and power management functionality'
|
|
'shairplay: limited Apple airplay support'
|
|
'unrar: access compressed files without unpacking them'
|
|
'unzip: access compressed files without unpacking them'
|
|
'upower: used to trigger power management functionality')
|
|
install='kodi.install'
|
|
provides=('xbmc' 'kodi')
|
|
conflicts=('xbmc' 'kodi' 'arm-mem-git' 'shairplay-git')
|
|
replaces=('xbmc-rbp-git')
|
|
_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.service" "$pkgdir/usr/lib/systemd/system/kodi.service"
|
|
install -Dm0644 "$srcdir/polkit.rules" "$pkgdir/usr/share/polkit-1/rules.d/10-kodi.rules"
|
|
chmod 0750 "$pkgdir/usr/share/polkit-1/rules.d/"
|
|
|
|
# fix permissions necessary for accelerated video playback
|
|
install -Dm0644 "$srcdir/99-kodi.rules" "$pkgdir/etc/udev/rules.d/99-kodi.rules"
|
|
}
|
|
|
|
package_kodi-eventclients-rbp-git() {
|
|
pkgdesc="Kodi Event Clients (master branch)"
|
|
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
|
|
}
|
|
|
|
package_kodi-tools-texturepacker-rbp-git() {
|
|
pkgdesc="Kodi Texturepacker tool (master branch)"
|
|
depends=('libpng' 'giflib' 'libjpeg-turbo' 'lzo')
|
|
_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
|
|
}
|
|
|
|
package_kodi-dev-rbp-git() {
|
|
pkgdesc="Kodi dev files (master branch)"
|
|
depends=('kodi')
|
|
provides=('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
|
|
}
|