mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
add alarm/kodi-rpi-legacy to 18.9-1
Pi 2/3 cannot use 'leia_pi4' fork for HW decoding on certain video formats such as HEVC it seems. Restore a kodi package based on 'newclock5' fork which does x264 HW decoding via mmal. When v19 gets released, this package will stay frozen at v18 since upstream support for it has been declared nonexistent.
This commit is contained in:
parent
d3076c4123
commit
b1a19281dc
8 changed files with 349 additions and 0 deletions
4
alarm/kodi-rpi-legacy/99-kodi.rules
Normal file
4
alarm/kodi-rpi-legacy/99-kodi.rules
Normal file
|
@ -0,0 +1,4 @@
|
|||
SUBSYSTEM=="bcm2708_vcio",GROUP="video",MODE="0660"
|
||||
SUBSYSTEM=="vc-sm",GROUP="video",MODE="0660"
|
||||
SUBSYSTEM=="vchiq",GROUP="video",MODE="0660"
|
||||
SUBSYSTEM=="tty", KERNEL=="tty[0-9]*", GROUP="tty", MODE="0660"
|
268
alarm/kodi-rpi-legacy/PKGBUILD
Normal file
268
alarm/kodi-rpi-legacy/PKGBUILD
Normal file
|
@ -0,0 +1,268 @@
|
|||
# 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-rpi-legacy
|
||||
pkgname=('kodi-rpi-legacy' 'kodi-rpi-legacy-eventclients' 'kodi-rpi-legacy-tools-texturepacker' 'kodi-rpi-legacy-dev')
|
||||
pkgver=18.9
|
||||
pkgrel=1
|
||||
_codename=Leia
|
||||
_tag="$pkgver-$_codename"
|
||||
_ffmpeg_version="4.0.4-$_codename-18.4"
|
||||
_libdvdcss_version="1.4.2-$_codename-Beta-5"
|
||||
_libdvdnav_version="6.0.0-$_codename-Alpha-3"
|
||||
_libdvdread_version="6.0.0-$_codename-Alpha-3"
|
||||
_fmt_version="5.1.0"
|
||||
_crossguid_version="8f399e8bd4"
|
||||
_fstrcmp_version="0.7.D001"
|
||||
_flatbuffers_version="1.9.0"
|
||||
arch=('armv6h' 'armv7h')
|
||||
url="https://github.com/popcornmix/xbmc/tree/newclock5"
|
||||
license=('GPL2')
|
||||
makedepends=(
|
||||
'afpfs-ng' 'bluez-libs' 'boost' 'cmake' 'curl' 'doxygen'
|
||||
'gperf' 'hicolor-icon-theme' 'jasper' 'java-environment' 'libaacs' 'libass'
|
||||
'libbluray-kodi-rbp' 'libcdio' 'mariadb-libs' 'libmicrohttpd' 'groff'
|
||||
'libmodplug' 'libmpeg2' 'libnfs' 'libplist' 'libpulse' 'libssh' 'libcec-rpi'
|
||||
'libxrandr' 'libxslt' 'lirc' 'lzo' 'nasm' 'nss-mdns' 'python2-pillow6'
|
||||
'python2-pybluez' 'python2-pycryptodomex' 'python2-simplejson' 'raspberrypi-firmware'
|
||||
'rtmpdump' 'shairplay' 'smbclient' 'speex' 'swig' 'taglib' 'tinyxml' 'unzip' 'upower'
|
||||
'yajl' 'zip' 'giflib' 'rapidjson' 'polkit' 'libinput' 'libxkbcommon' 'ghostscript'
|
||||
)
|
||||
source=("https://github.com/popcornmix/xbmc/archive/newclock5_$_tag.tar.gz"
|
||||
'kodi.service'
|
||||
'kodi-framebuffer'
|
||||
'99-kodi.rules'
|
||||
'polkit.rules'
|
||||
"ffmpeg-$_ffmpeg_version.tar.gz::https://github.com/xbmc/FFmpeg/archive/$_ffmpeg_version.tar.gz"
|
||||
"libdvdcss-$_libdvdcss_version.tar.gz::https://github.com/xbmc/libdvdcss/archive/$_libdvdcss_version.tar.gz"
|
||||
"libdvdnav-$_libdvdnav_version.tar.gz::https://github.com/xbmc/libdvdnav/archive/$_libdvdnav_version.tar.gz"
|
||||
"libdvdread-$_libdvdread_version.tar.gz::https://github.com/xbmc/libdvdread/archive/$_libdvdread_version.tar.gz"
|
||||
"http://mirrors.kodi.tv/build-deps/sources/fmt-$_fmt_version.tar.gz"
|
||||
"http://mirrors.kodi.tv/build-deps/sources/crossguid-$_crossguid_version.tar.gz"
|
||||
"http://mirrors.kodi.tv/build-deps/sources/fstrcmp-$_fstrcmp_version.tar.gz"
|
||||
"http://mirrors.kodi.tv/build-deps/sources/flatbuffers-$_flatbuffers_version.tar.gz"
|
||||
sysusers.conf
|
||||
tmpfiles.conf
|
||||
)
|
||||
noextract=(
|
||||
"libdvdcss-$_libdvdcss_version.tar.gz"
|
||||
"libdvdnav-$_libdvdnav_version.tar.gz"
|
||||
"libdvdread-$_libdvdread_version.tar.gz"
|
||||
"ffmpeg-$_ffmpeg_version.tar.gz"
|
||||
"fmt-$_fmt_version.tar.gz"
|
||||
"crossguid-$_crossguid_version.tar.gz"
|
||||
"fstrcmp-$_fstrcmp_version.tar.gz"
|
||||
"flatbuffers-$_flatbuffers_version.tar.gz"
|
||||
)
|
||||
sha256sums=('82829e066b6468f2a4d30a4a5e2f67e436312425f71cc29095770e3b29f9cb15'
|
||||
'bef46c3e5a773ba97df196fd8d6c27972f712efa137d525d75acdee9c32144f8'
|
||||
'fe7a1ab2a6e2bf00f756c76545a338d2763003052764d722d492b06b1bc05f5e'
|
||||
'b31570f95654434b01fd8531612fbb6be77cbc1c519dd60f92feae26eb160f3d'
|
||||
'5d38a895ee7b93689fab79124a3aad23a5e3e643abd08878d778d04066c8d26f'
|
||||
'e11e7594af35f36ab2711252c3d6bb106908f26605498aef4a9be2d7bc001db2'
|
||||
'38816f8373e243bc5950449b4f3b18938c4e1c59348e3411e23f31db4072e40d'
|
||||
'071e414e61b795f2ff9015b21a85fc009dde967f27780d23092643916538a57a'
|
||||
'a30b6aa0aad0f2c505bc77948af2d5531a80b6e68112addb4c123fca24d5d3bf'
|
||||
'73d4cab4fa8a3482643d8703de4d9522d7a56981c938eca42d929106ff474b44'
|
||||
'3d77d09a5df0de510aeeb940df4cb534787ddff3bb1828779753f5dfa1229d10'
|
||||
'e4018e850f80700acee8da296e56e15b1eef711ab15157e542e7d7e1237c3476'
|
||||
'5ca5491e4260cacae30f1a5786d109230db3f3a6e5a0eb45d0d0608293d247e3'
|
||||
'f521b98232e5035b7cada46cf03975b8d753e93d0802bf22913fceed769f9d96'
|
||||
'9c5e79ed8719cd032a3b17dac585aeff28a198e37af1da9af68ef1b86bab4d18')
|
||||
prepare() {
|
||||
# force python 'binary' as python2
|
||||
[[ -d "$srcdir/path" ]] && rm -rf "$srcdir/path"
|
||||
mkdir "$srcdir/path"
|
||||
ln -s /usr/bin/python2 "$srcdir/path/python"
|
||||
|
||||
cd "xbmc-newclock5_$_tag"
|
||||
|
||||
[[ -d kodi-build ]] && rm -rf kodi-build
|
||||
mkdir $srcdir/kodi-build
|
||||
}
|
||||
|
||||
build() {
|
||||
export PATH="$srcdir/path:$PATH"
|
||||
|
||||
cd kodi-build
|
||||
|
||||
# _CPU=arm1176jzf-s for rpi1
|
||||
# _CPU=cortex-a7 for rpi2
|
||||
# _CPU=cortex-a53 for rpi3
|
||||
|
||||
if [[ $CARCH == "armv6h" ]]; then
|
||||
_CPU=arm1176jzf-s
|
||||
export CFLAGS+=" -march=armv6zk"
|
||||
export CXXFLAGS="${CFLAGS}"
|
||||
export LDFLAGS+=" -latomic"
|
||||
elif [[ $CARCH == "armv7h" ]]; then
|
||||
_CPU=cortex-a7
|
||||
export CFLAGS+=" -march=armv7ve"
|
||||
export CXXFLAGS="${CFLAGS}"
|
||||
fi
|
||||
|
||||
cmake -DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
|
||||
-DCMAKE_PREFIX_PATH=/opt/vc \
|
||||
-DCORE_PLATFORM_NAME=rbpi \
|
||||
-DWITH_CPU="$_CPU" \
|
||||
-DENABLE_EVENTCLIENTS=ON \
|
||||
-DENABLE_OPENGL=OFF \
|
||||
-DENABLE_INTERNAL_FFMPEG=ON \
|
||||
-DENABLE_INTERNAL_FMT=ON \
|
||||
-DENABLE_INTERNAL_CROSSGUID=ON \
|
||||
-DENABLE_INTERNAL_FSTRCMP=ON \
|
||||
-DENABLE_INTERNAL_FLATBUFFERS=ON \
|
||||
-DENABLE_MYSQLCLIENT=ON \
|
||||
-Dlibdvdcss_URL="$srcdir/libdvdcss-$_libdvdcss_version.tar.gz" \
|
||||
-Dlibdvdnav_URL="$srcdir/libdvdnav-$_libdvdnav_version.tar.gz" \
|
||||
-Dlibdvdread_URL="$srcdir/libdvdread-$_libdvdread_version.tar.gz" \
|
||||
-DFFMPEG_URL="$srcdir/ffmpeg-$_ffmpeg_version.tar.gz" \
|
||||
-DFMT_URL="$srcdir/fmt-$_fmt_version.tar.gz" \
|
||||
-DCROSSGUID_URL="$srcdir/crossguid-$_crossguid_version.tar.gz" \
|
||||
-DFSTRCMP_URL="$srcdir/fstrcmp-$_fstrcmp_version.tar.gz" \
|
||||
-DFLATBUFFERS_URL="$srcdir/flatbuffers-$_flatbuffers_version.tar.gz" \
|
||||
../"xbmc-newclock5_$_tag"
|
||||
make
|
||||
make preinstall
|
||||
}
|
||||
|
||||
package_kodi-rpi-legacy() {
|
||||
pkgdesc="Media player and entertainment hub for Raspberry Pi 2 and 3, newclock5 fork"
|
||||
depends=(
|
||||
'bluez-libs' 'desktop-file-utils' 'freetype2' 'fribidi' 'libcec-rpi'
|
||||
'hicolor-icon-theme' 'libass' 'libcdio' 'libjpeg-turbo' 'mariadb-libs'
|
||||
'libmicrohttpd' 'libpulse' 'libssh' 'libxrandr' 'lirc' 'raspberrypi-firmware'
|
||||
'libxslt' 'lzo' 'python2-pillow6' 'python2-simplejson' 'smbclient'
|
||||
'speex' 'taglib' 'tinyxml' 'xorg-xdpyinfo' 'yajl' 'libinput' 'libxkbcommon' 'libbluray-kodi-rbp'
|
||||
'fbset' 'libnfs' 'curl'
|
||||
)
|
||||
optdepends=(
|
||||
'afpfs-ng: Apple shares support'
|
||||
'bluez: Blutooth support'
|
||||
'python2-pybluez: Bluetooth support'
|
||||
'libplist: Limited AirPlay support'
|
||||
'lsb-release: log distro information in crashlog'
|
||||
'shairplay: Limited AirPlay support'
|
||||
'unrar: Archives support'
|
||||
'unzip: Archives support'
|
||||
'upower: Display battery level'
|
||||
)
|
||||
install='kodi.install'
|
||||
provides=('xbmc' "kodi=${pkgver}")
|
||||
conflicts=('xbmc' 'kodi' 'arm-mem-git' 'shairplay-git' 'kodi-rpi' 'kodi-rbp' 'kodi-rbp3' 'kodi-rbp4')
|
||||
replaces=('xbmc-rbp-git' 'kodi-rbp' 'kodi-rbp3')
|
||||
_components=('kodi' 'kodi-bin')
|
||||
|
||||
export PATH="$srcdir/path:$PATH"
|
||||
|
||||
cd kodi-build
|
||||
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
|
||||
|
||||
# fix permissions necessary for accelerated video playback
|
||||
install -Dm0644 "$srcdir/99-kodi.rules" "$pkgdir/etc/udev/rules.d/99-kodi.rules"
|
||||
|
||||
# systemd manages kodi user
|
||||
install -Dm644 "$srcdir"/sysusers.conf "$pkgdir/usr/lib/sysusers.d/kodi.conf"
|
||||
install -Dm644 "$srcdir"/tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/kodi.conf"
|
||||
|
||||
# systemd service, polkit rules, and framebuffer tweak
|
||||
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"
|
||||
install -Dm0644 "$srcdir/kodi-framebuffer" "$pkgdir/etc/conf.d/kodi-framebuffer"
|
||||
chmod 0750 "$pkgdir/usr/share/polkit-1/rules.d/"
|
||||
}
|
||||
|
||||
package_kodi-rpi-legacy-eventclients() {
|
||||
pkgdesc="Kodi Event Clients for Raspberry Pi2 and 3, newclock5 fork"
|
||||
provides=("kodi-eventclients=${pkgver}")
|
||||
conflicts=('kodi-eventclients' 'kodi-rpi-eventclients' 'kodi-rbp-eventclients' 'kodi-rbp3-eventclients' 'kodi-rbp4-eventclients')
|
||||
replaces=('kodi-rbp-eventclients' 'kodi-rbp3-eventclients')
|
||||
optdepends=('python2: most eventclients are implemented in python2')
|
||||
|
||||
_components=(
|
||||
'kodi-eventclients-common'
|
||||
'kodi-eventclients-ps3'
|
||||
'kodi-eventclients-kodi-send'
|
||||
)
|
||||
|
||||
export PATH="$srcdir/path:$PATH"
|
||||
|
||||
cd kodi-build
|
||||
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-rpi-legacy-tools-texturepacker() {
|
||||
pkgdesc="Kodi Texturepacker Tool for Raspberry Pi 2 and 3, newclock5 fork"
|
||||
depends=('libpng' 'giflib' 'libjpeg-turbo' 'lzo')
|
||||
conflicts=('kodi-rpi-tools-texturepacker' 'kodi-rbp-tools-texturepacker' 'kodi-rbp3-tools-texturepacker' 'kodi-rbp4-tools-texturepacker')
|
||||
replaces=('kodi-rbp-tools-texturepacker' 'kodi-rbp3-tools-texturepacker')
|
||||
_components=('kodi-tools-texturepacker')
|
||||
|
||||
export PATH="$srcdir/path:$PATH"
|
||||
|
||||
cd kodi-build
|
||||
for _cmp in ${_components[@]}; do
|
||||
DESTDIR="$pkgdir" /usr/bin/cmake \
|
||||
-DCMAKE_INSTALL_COMPONENT="$_cmp" \
|
||||
-P cmake_install.cmake
|
||||
done
|
||||
}
|
||||
|
||||
package_kodi-rpi-legacy-dev() {
|
||||
pkgdesc="Kodi dev files for Raspberry Pi 2 and 3, newclock5 fork"
|
||||
depends=('kodi')
|
||||
conflicts=('kodi-rpi-dev' 'kodi-rbp-dev' 'kodi-rbp3-dev' 'kodi-rbp4-dev')
|
||||
replaces=('kodi-rbp-dev' 'kodi-rbp3-dev')
|
||||
provides=("kodi-dev=${pkgver}")
|
||||
|
||||
_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')
|
||||
|
||||
export PATH="$srcdir/path:$PATH"
|
||||
|
||||
cd kodi-build
|
||||
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
|
||||
}
|
9
alarm/kodi-rpi-legacy/kodi-framebuffer
Normal file
9
alarm/kodi-rpi-legacy/kodi-framebuffer
Normal file
|
@ -0,0 +1,9 @@
|
|||
#
|
||||
# /etc/conf.d/kodi-framebuffer
|
||||
#
|
||||
# The RESTOREMODE variable defines the preferred settings for the frame buffer
|
||||
# when kodi is stopped. Syntax is <xres> <yres> <vxres> <vyres> <depth>
|
||||
#
|
||||
# Tip: get the current frame buffer settings by running `fbset` as root
|
||||
|
||||
RESTOREMODE="1824 984 1824 984 32"
|
10
alarm/kodi-rpi-legacy/kodi.install
Normal file
10
alarm/kodi-rpi-legacy/kodi.install
Normal file
|
@ -0,0 +1,10 @@
|
|||
post_install() {
|
||||
echo "****************************************************************"
|
||||
echo "Recommended GPU memory for 1080p x265 content is at least 320 MB"
|
||||
echo "Add the following to /boot/config.txt: gpu_mem=320"
|
||||
echo "****************************************************************"
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
echo "==> Optionally remove /var/lib/kodi/"
|
||||
}
|
24
alarm/kodi-rpi-legacy/kodi.service
Normal file
24
alarm/kodi-rpi-legacy/kodi.service
Normal file
|
@ -0,0 +1,24 @@
|
|||
[Unit]
|
||||
Description=Kodi standalone
|
||||
After=remote-fs.target systemd-user-sessions.service network-online.target nss-lookup.target sound.target bluetooth.target polkit.service upower.service mysqld.service
|
||||
Wants=network-online.target polkit.service upower.service
|
||||
Conflicts=getty@tty1.service
|
||||
|
||||
[Service]
|
||||
User=kodi
|
||||
Group=kodi
|
||||
PAMName=login
|
||||
TTYPath=/dev/tty1
|
||||
EnvironmentFile=/etc/conf.d/kodi-framebuffer
|
||||
ExecStartPre=+/bin/sh -c 'echo 0 > /sys/class/vtconsole/vtcon1/bind'
|
||||
ExecStartPre=+/usr/bin/fbset -g 8 8 8 8 32
|
||||
ExecStart=/usr/bin/kodi-standalone
|
||||
ExecStop=/usr/bin/killall --user kodi --exact --wait kodi-rbpi
|
||||
ExecStopPost=+/usr/bin/fbset -g $RESTOREMODE
|
||||
ExecStopPost=+/bin/sh -c 'echo 1 > /sys/class/vtconsole/vtcon1/bind'
|
||||
Restart=on-abort
|
||||
StandardInput=tty
|
||||
StandardOutput=journal
|
||||
|
||||
[Install]
|
||||
Alias=display-manager.service
|
15
alarm/kodi-rpi-legacy/polkit.rules
Normal file
15
alarm/kodi-rpi-legacy/polkit.rules
Normal file
|
@ -0,0 +1,15 @@
|
|||
polkit.addRule(function(action, subject) {
|
||||
if (subject.user == "kodi") {
|
||||
polkit.log("action=" + action);
|
||||
polkit.log("subject=" + subject);
|
||||
if (action.id.indexOf("org.freedesktop.login1.") == 0) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
if (action.id.indexOf("org.freedesktop.udisks.") == 0) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
if (action.id.indexOf("org.freedesktop.udisks2.") == 0) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
}
|
||||
});
|
16
alarm/kodi-rpi-legacy/sysusers.conf
Normal file
16
alarm/kodi-rpi-legacy/sysusers.conf
Normal file
|
@ -0,0 +1,16 @@
|
|||
# override these settings by copying this to /etc/sysusers.d/ and modifying it therein
|
||||
|
||||
#Type Name ID GECOS Home directory Shell
|
||||
g kodi - -
|
||||
u kodi - "Kodi User" /var/lib/kodi
|
||||
|
||||
# supplemental groups
|
||||
m kodi audio
|
||||
m kodi disk
|
||||
m kodi input
|
||||
m kodi network
|
||||
m kodi optical
|
||||
m kodi power
|
||||
m kodi storage
|
||||
m kodi tty
|
||||
m kodi video
|
3
alarm/kodi-rpi-legacy/tmpfiles.conf
Normal file
3
alarm/kodi-rpi-legacy/tmpfiles.conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
#Type Path Mode User Group Age Argument
|
||||
d /var/lib/kodi 0750 kodi kodi - -
|
||||
Z /var/lib/kodi - kodi kodi - -
|
Loading…
Reference in a new issue