mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-01-17 23:34:07 +00:00
alarm/kodi-imx to 14.2-2
This commit is contained in:
parent
c4a449bc3b
commit
8380b4be7a
4 changed files with 140 additions and 134 deletions
|
@ -1,137 +1,169 @@
|
||||||
# Contributor tomasgroth at yahoo.dk
|
# vim:set ts=2 sw=2 et:
|
||||||
# Contributor WarheadsSE <max@warheads.net>
|
# $Id$
|
||||||
# Contributor Romzetron <asromzek@gmail.com>
|
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
|
||||||
# Contributor Holzhaus <holthuis.jan@googlemail.com>
|
# Maintainer: BlackIkeEagle < ike DOT devolder AT gmail DOT com >
|
||||||
|
# Contributor: Brad Fanella <bradfanella@archlinux.us>
|
||||||
|
# Contributor: [vEX] <niechift.dot.vex.at.gmail.dot.com>
|
||||||
|
# Contributor: Zeqadious <zeqadious.at.gmail.dot.com>
|
||||||
|
# Contributor: BlackIkeEagle < ike DOT devolder AT gmail DOT com >
|
||||||
|
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
|
||||||
|
# Contributor: Maxime Gauduin <alucryd@gmail.com>
|
||||||
|
|
||||||
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||||
|
# - i.MX6 changes
|
||||||
|
|
||||||
buildarch=4
|
buildarch=4
|
||||||
|
|
||||||
pkgname=kodi-imx
|
_prefix=/usr
|
||||||
pkgver=14.1
|
|
||||||
|
pkgbase=kodi
|
||||||
|
pkgname=('kodi-imx' 'kodi-imx-eventclients')
|
||||||
|
pkgver=14.2
|
||||||
_codename=Helix
|
_codename=Helix
|
||||||
pkgrel=2
|
pkgrel=2
|
||||||
pkgdesc="A software media player and entertainment hub for digital media for select imx6 system"
|
arch=('i686' 'x86_64')
|
||||||
arch=('armv7h')
|
|
||||||
url="http://kodi.tv"
|
url="http://kodi.tv"
|
||||||
license=('GPL' 'custom')
|
license=('GPL2')
|
||||||
depends=(
|
|
||||||
'python2-pillow' 'python2-pybluez' 'python2-simplejson' 'fribidi'
|
|
||||||
'lzo2' 'smbclient' 'libtiff' 'libva' 'libpng' 'libcdio' 'yajl'
|
|
||||||
'libmariadbclient' 'libjpeg-turbo' 'libsamplerate' 'libssh'
|
|
||||||
'libmicrohttpd' 'sdl_image' 'python2' 'libass' 'libmpeg2' 'libmad'
|
|
||||||
'libmodplug' 'jasper' 'rtmpdump' 'unzip' 'xorg-xdpyinfo' 'libbluray'
|
|
||||||
'libnfs' 'afpfs-ng' 'avahi' 'bluez-libs' 'tinyxml' 'libcec'
|
|
||||||
'libplist' 'swig' 'taglib' 'libxslt' 'shairplay-git'
|
|
||||||
'hicolor-icon-theme' 'libfslvpuwrap' 'gpu-viv-bin-mx6q-fb'
|
|
||||||
'libva' 'libcec-imx6' 'firmware-imx')
|
|
||||||
makedepends=(
|
makedepends=(
|
||||||
'boost' 'cmake' 'gperf' 'nasm' 'zip' 'udisks' 'upower' 'git'
|
'afpfs-ng' 'bluez-libs' 'boost' 'cmake' 'curl' 'cwiid' 'doxygen' 'git' 'glew'
|
||||||
'autoconf' 'java-environment')
|
'gperf' 'hicolor-icon-theme' 'jasper' 'java-runtime' 'libaacs' 'libass'
|
||||||
optdepends=(
|
'libbluray' 'libcdio' 'libmariadbclient' 'libmicrohttpd'
|
||||||
'lirc: remote controller support'
|
'libmodplug' 'libmpeg2' 'libnfs' 'libplist' 'libpulse' 'libssh' 'libva'
|
||||||
'udisks: automount external drives'
|
'libxrandr' 'libxslt' 'lzo' 'nasm' 'nss-mdns' 'python2-pillow'
|
||||||
'upower: used to trigger power management functionality'
|
'python2-pybluez' 'python2-simplejson' 'rtmpdump' 'sdl2' 'sdl_image'
|
||||||
'unrar: access compressed files without unpacking them')
|
'shairplay' 'smbclient' 'swig' 'taglib' 'tinyxml' 'unzip' 'upower' 'yajl' 'zip'
|
||||||
provides=("kodi")
|
'libfslvpuwrap' 'gpu-viv-bin-mx6q-fb' 'libcec-imx6' 'firmware-imx'
|
||||||
conflicts=("xbmc" "kodi")
|
)
|
||||||
replaces=("xbmc-imx")
|
source=(
|
||||||
install="kodi.install"
|
"$pkgname-$pkgver-$_codename.tar.gz::https://github.com/xbmc/xbmc/archive/$pkgver-$_codename.tar.gz"
|
||||||
source=("https://github.com/xbmc/xbmc/archive/$pkgver-$_codename.tar.gz"
|
'imx-hdmi-soc.conf'
|
||||||
'kodi.service'
|
'imx-spdif.conf'
|
||||||
'polkit.rules'
|
'kodi.service'
|
||||||
'runkodi'
|
'polkit.rules'
|
||||||
'kodi.conf'
|
)
|
||||||
'imx-spdif.conf'
|
sha256sums=('d9cb8590430a925fb789a5beb4da2695cdcd2d2500dd31126f3b77b31aa267f4'
|
||||||
'imx-hdmi-soc.conf')
|
'6d9822d97b9e1268c04078f6c9b6316eb013f95f96f90034b51fa7473b9752ff'
|
||||||
|
|
||||||
sha256sums=('a38059e292cf8523918834e49fcc2d688525ceb7951ddf7f5ee535f4147255d6'
|
|
||||||
'b8cb9bc4fd7f21e197aeed88453c037d6e688f6e353c04b1f63052b6ba1f879c'
|
|
||||||
'9ea592205023ba861603d74b63cdb73126c56372a366dc4cb7beb379073cbb96'
|
|
||||||
'b7f9ef15f774fe9ddd9fa029a2032c2d7668be1095a0561640826f16cdd1ba00'
|
|
||||||
'db6372248015fa4e663bf789e4f7121b5a9ade323f361994bbd6f135ce169123'
|
|
||||||
'0e16e4d2ec0c0e1810fe1ad6a7c4dee99d6fc0f49502f0e836210f5dd537d92d'
|
'0e16e4d2ec0c0e1810fe1ad6a7c4dee99d6fc0f49502f0e836210f5dd537d92d'
|
||||||
'6d9822d97b9e1268c04078f6c9b6316eb013f95f96f90034b51fa7473b9752ff')
|
'5235068d5800d69f0287087815990e7fe8d6572733d60c8800546d35f608e87f'
|
||||||
|
'9ea592205023ba861603d74b63cdb73126c56372a366dc4cb7beb379073cbb96')
|
||||||
_prefix=/usr
|
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
cd "$srcdir/xbmc-$pkgver-$_codename"
|
cd "$srcdir/xbmc-$pkgver-$_codename"
|
||||||
|
|
||||||
find -type f -name *.py -exec sed 's|^#!.*python$|#!/usr/bin/python2|' -i "{}" +
|
find -type f -name *.py -exec sed 's|^#!.*python$|#!/usr/bin/python2|' -i "{}" +
|
||||||
sed 's|^#!.*python$|#!/usr/bin/python2|' -i tools/depends/native/rpl-native/rpl
|
sed 's|^#!.*python$|#!/usr/bin/python2|' -i tools/depends/native/rpl-native/rpl
|
||||||
sed 's/python/python2/' -i tools/Linux/kodi.sh.in
|
sed 's/python/python2/' -i tools/Linux/kodi.sh.in
|
||||||
|
sed 's/shell python/shell python2/' -i tools/EventClients/Makefile.in
|
||||||
|
# disable wiiremote due to incompatibility with bluez-5.29
|
||||||
|
sed '/WiiRemote/d' -i tools/EventClients/Makefile.in
|
||||||
|
sed '/mkdir -p $(DESTDIR)$(bindir)/i \
|
||||||
|
install:' -i tools/EventClients/Makefile.in
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd "$srcdir/xbmc-$pkgver-$_codename"
|
cd "$srcdir/xbmc-$pkgver-$_codename"
|
||||||
|
|
||||||
# Bootstrapping Kodi
|
# Bootstrapping
|
||||||
MAKEFLAGS=-j1 ./bootstrap
|
MAKEFLAGS=-j1 ./bootstrap
|
||||||
|
|
||||||
# Configuring Kodi
|
#./configure --help
|
||||||
export PYTHON_VERSION=2 # external python v2
|
#return 1
|
||||||
INCLUDES="-I/opt/fsl/include"
|
|
||||||
export CFLAGS="-Ofast -mfloat-abi=hard -mfpu=vfpv3-d16 -mtls-dialect=gnu -march=armv7-a -mtune=cortex-a9 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 $INCLUDES -Wl,-rpath,/opt/fsl/lib -L/opt/fsl/lib"
|
|
||||||
export CPPFLAGS="-Ofast -mfloat-abi=hard -mfpu=vfpv3-d16 -mtls-dialect=gnu -march=armv7-a -mtune=cortex-a9 -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 $INCLUDES -Wl,-rpath,/opt/fsl/lib -L/opt/fsl/lib"
|
|
||||||
export CXXFLAGS="-Ofast -mfloat-abi=hard -mfpu=vfpv3-d16 -mtls-dialect=gnu -march=armv7-a -mtune=cortex-a9 -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 $INCLUDES -Wl,-rpath,/opt/fsl/lib -L/opt/fsl/lib"
|
|
||||||
export LDFLAGS="$LDFLAGS -L/opt/fsl/lib"
|
|
||||||
|
|
||||||
#If build fails try uncommenting the line below first
|
# Configuring XBMC
|
||||||
#export MAKEFLAGS="-j1"
|
export PYTHON_VERSION=2 # external python v2
|
||||||
|
CFLAGS="-Ofast -mfloat-abi=hard -mfpu=neon -mtls-dialect=gnu -march=armv7-a -mtune=cortex-a9 -pipe -fstack-protector --param=ssp-buffer-size=4 -I/opt/fsl/include"
|
||||||
./configure --prefix=$_prefix --exec-prefix=$_prefix \
|
CXXFLAGS="${CFLAGS}"
|
||||||
--disable-gl \
|
CPPFLAGS+=" -I/opt/fsl/include"
|
||||||
--enable-gles \
|
LDFLAGS+=" -Wl,-rpath,/opt/fsl/lib -L/opt/fsl/lib"
|
||||||
--disable-x11 \
|
./configure --prefix=$_prefix --exec-prefix=$_prefix \
|
||||||
--disable-sdl \
|
--disable-debug \
|
||||||
--enable-optimizations \
|
--disable-gl \
|
||||||
--disable-goom \
|
--enable-gles \
|
||||||
--disable-pulse \
|
--disable-x11 \
|
||||||
--disable-vaapi \
|
--disable-sdl \
|
||||||
--disable-vdpau \
|
--enable-optimizations \
|
||||||
--disable-xrandr \
|
--disable-goom \
|
||||||
--enable-airplay \
|
--disable-pulse \
|
||||||
--enable-airtunes \
|
--enable-libbluray \
|
||||||
--enable-avahi \
|
--enable-external-libraries \
|
||||||
--enable-libbluray \
|
--with-lirc-device=/run/lirc/lircd \
|
||||||
--enable-dvdcss \
|
--disable-vaapi \
|
||||||
--disable-debug \
|
|
||||||
--disable-joystick \
|
|
||||||
--disable-mid \
|
|
||||||
--enable-nfs \
|
|
||||||
--disable-profiling \
|
|
||||||
--disable-projectm \
|
|
||||||
--enable-rsxs \
|
|
||||||
--enable-rtmp \
|
|
||||||
--disable-vaapi \
|
|
||||||
--disable-openmax \
|
--disable-openmax \
|
||||||
--enable-optical-drive \
|
--enable-codec=imxvpu \
|
||||||
--enable-texturepacker \
|
--enable-libcec \
|
||||||
--with-lirc-device=/run/lirc/lircd \
|
ac_cv_lib_bluetooth_hci_devid=no
|
||||||
--enable-codec=imxvpu \
|
|
||||||
--enable-libcec
|
# Now (finally) build
|
||||||
|
|
||||||
make
|
make
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package_kodi-imx() {
|
||||||
|
pkgdesc="A software media player and entertainment hub for digital media (Freescale i.MX6)"
|
||||||
|
|
||||||
|
# depends expected for kodi plugins:
|
||||||
|
# 'python2-pillow' 'python2-pybluez' 'python2-simplejson'
|
||||||
|
# depends expeced in FEH.py
|
||||||
|
# 'mesa-demos' 'xorg-xdpyinfo'
|
||||||
|
depends=(
|
||||||
|
'python2-pillow' 'python2-pybluez' 'python2-simplejson' 'xorg-xdpyinfo'
|
||||||
|
'bluez-libs' 'fribidi' 'glew' 'hicolor-icon-theme' 'libcdio'
|
||||||
|
'libjpeg-turbo' 'libmariadbclient' 'libmicrohttpd' 'libpulse' 'libssh'
|
||||||
|
'libva' 'libxrandr' 'libxslt' 'lzo' 'sdl2' 'smbclient' 'taglib' 'tinyxml'
|
||||||
|
'yajl' 'libfslvpuwrap' 'gpu-viv-bin-mx6q-fb' 'libcec-imx6' 'firmware-imx'
|
||||||
|
)
|
||||||
|
optdepends=(
|
||||||
|
'afpfs-ng: Apple shares support'
|
||||||
|
'bluez: Blutooth support'
|
||||||
|
'libnfs: NFS shares support'
|
||||||
|
'libplist: AirPlay support'
|
||||||
|
'lirc: Remote controller support'
|
||||||
|
'polkit: permissions for automounting external drives and power management functionality'
|
||||||
|
'pulseaudio: PulseAudio support'
|
||||||
|
'shairplay: AirPlay support'
|
||||||
|
'udisks: Automount external drives'
|
||||||
|
'unrar: Archives support'
|
||||||
|
'unzip: Archives support'
|
||||||
|
'upower: Display battery level'
|
||||||
|
'lsb-release: log distro information in crashlog'
|
||||||
|
)
|
||||||
|
install="kodi.install"
|
||||||
|
provides=('xbmc' 'kodi')
|
||||||
|
conflicts=('xbmc' 'kodi' 'shairplay-git')
|
||||||
|
replaces=('xbmc')
|
||||||
|
|
||||||
cd "$srcdir/xbmc-$pkgver-$_codename"
|
cd "$srcdir/xbmc-$pkgver-$_codename"
|
||||||
# Running make install
|
# Running make install
|
||||||
make DESTDIR="${pkgdir}" install
|
make DESTDIR="$pkgdir" install
|
||||||
|
|
||||||
|
# We will no longer support the xbmc name
|
||||||
|
rm "$pkgdir/usr/share/xsessions/xbmc.desktop"
|
||||||
|
rm "$pkgdir/usr/bin/"xbmc{,-standalone}
|
||||||
|
# we will leave /usr/{include,lib,share}/xbmc for now
|
||||||
|
|
||||||
# Licenses
|
# Licenses
|
||||||
install -dm755 ${pkgdir}${_prefix}/share/licenses/${pkgname}
|
install -dm755 ${pkgdir}${_prefix}/share/licenses/${pkgname}
|
||||||
for licensef in LICENSE.GPL copying.txt; do
|
for licensef in LICENSE.GPL copying.txt; do
|
||||||
mv ${pkgdir}${_prefix}/share/doc/kodi/${licensef} \
|
mv ${pkgdir}${_prefix}/share/doc/kodi/${licensef} \
|
||||||
${pkgdir}${_prefix}/share/licenses/${pkgname}
|
${pkgdir}${_prefix}/share/licenses/${pkgname}
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# imx6-specific alsa conf
|
||||||
|
install -Dm0644 $srcdir/imx-spdif.conf $pkgdir/usr/share/alsa/cards/imx-spdif.conf
|
||||||
|
install -Dm0644 $srcdir/imx-hdmi-soc.conf $pkgdir/usr/share/alsa/cards/imx-hdmi-soc.conf
|
||||||
|
|
||||||
install -Dm0644 $srcdir/kodi.service $pkgdir/usr/lib/systemd/system/kodi.service
|
install -Dm0644 $srcdir/kodi.service $pkgdir/usr/lib/systemd/system/kodi.service
|
||||||
install -Dm0755 $srcdir/runkodi $pkgdir/usr/bin/runkodi
|
|
||||||
install -Dm0644 $srcdir/kodi.conf $pkgdir/etc/tmpfiles.d/kodi.conf
|
install -Dm0644 $srcdir/kodi.conf $pkgdir/etc/tmpfiles.d/kodi.conf
|
||||||
install -Dm0644 $srcdir/polkit.rules $pkgdir/usr/share/polkit-1/rules.d/10-kodi.rules
|
install -Dm0644 $srcdir/polkit.rules $pkgdir/usr/share/polkit-1/rules.d/10-kodi.rules
|
||||||
chmod 0700 $pkgdir/usr/share/polkit-1/rules.d/
|
chmod 0700 $pkgdir/usr/share/polkit-1/rules.d/
|
||||||
|
}
|
||||||
# imx6-specific alsa conf
|
|
||||||
install -Dm0644 $srcdir/imx-spdif.conf $pkgdir/usr/share/alsa/cards/imx-spdif.conf
|
package_kodi-imx-eventclients() {
|
||||||
install -Dm0644 $srcdir/imx-hdmi-soc.conf $pkgdir/usr/share/alsa/cards/imx-hdmi-soc.conf
|
pkgdesc="Kodi Event Clients (Freescale i.MX6)"
|
||||||
|
provides=('kodi-eventclients')
|
||||||
|
conflicts=('kodi-eventclients')
|
||||||
|
depends=('cwiid')
|
||||||
|
|
||||||
|
cd "$srcdir/xbmc-$pkgver-$_codename"
|
||||||
|
|
||||||
|
make DESTDIR="$pkgdir" eventclients WII_EXTRA_OPTS=-DCWIID_OLD
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +1,24 @@
|
||||||
post_install() {
|
post_install() {
|
||||||
[[ $(type -p gtk-update-icon-cache) ]] && usr/bin/gtk-update-icon-cache -qtf usr/share/icons/hicolor
|
|
||||||
[[ $(type -p update-desktop-database) ]] && usr/bin/update-desktop-database -q usr/share/applications
|
|
||||||
getent group kodi > /dev/null || groupadd -r kodi
|
getent group kodi > /dev/null || groupadd -r kodi
|
||||||
getent passwd kodi > /dev/null || useradd -r -m -d /var/lib/kodi -g kodi -s /usr/bin/nologin kodi
|
getent passwd kodi > /dev/null || useradd -r -m -d /var/lib/kodi -g kodi -s /usr/bin/nologin kodi
|
||||||
usermod -a -G kodi,audio,video,power,network,optical,storage,disk kodi
|
usermod -a -G kodi,audio,video,power,network,optical,storage,disk kodi
|
||||||
mkdir -p var/lib/kodi
|
mkdir -p var/lib/kodi
|
||||||
chown -R kodi:kodi var/lib/kodi
|
chown -R kodi:kodi var/lib/kodi
|
||||||
|
update_icons
|
||||||
}
|
}
|
||||||
|
|
||||||
post_upgrade() {
|
post_upgrade() {
|
||||||
post_install $1
|
update_icons
|
||||||
}
|
}
|
||||||
|
|
||||||
post_remove() {
|
post_remove() {
|
||||||
[[ $(type -p gtk-update-icon-cache) ]] && usr/bin/gtk-update-icon-cache -qtf usr/share/icons/hicolor
|
getent group kodi > /dev/null && groupdel kodi
|
||||||
[[ $(type -p update-desktop-database) ]] && usr/bin/update-desktop-database -q usr/share/applications
|
|
||||||
getent passwd kodi > /dev/null && userdel kodi
|
getent passwd kodi > /dev/null && userdel kodi
|
||||||
|
update_icons
|
||||||
|
}
|
||||||
|
|
||||||
|
update_icons() {
|
||||||
|
type -p gtk-update-icon-cache > /dev/null 2>&1 && usr/bin/gtk-update-icon-cache -qtf usr/share/icons/hicolor
|
||||||
|
type -p update-desktop-database > /dev/null 2>&1 && usr/bin/update-desktop-database -q usr/share/applications
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ After = remote-fs.target
|
||||||
User = kodi
|
User = kodi
|
||||||
Group = kodi
|
Group = kodi
|
||||||
Type = simple
|
Type = simple
|
||||||
ExecStart = /usr/bin/runkodi
|
ExecStart = /usr/bin/kodi-standalone -l /run/lirc/lircd
|
||||||
Restart = on-failure
|
Restart = on-failure
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
#pre_umount () {
|
|
||||||
# [ -f /lib/systemd/system/automounter-nfs.service ] && systemctl stop automounter-nfs.service
|
|
||||||
# [ -f /lib/systemd/system/automounter-smb.service ] && systemctl stop automounter-smb.service
|
|
||||||
#}
|
|
||||||
|
|
||||||
echo 0 > /sys/class/graphics/fbcon/cursor_blink
|
|
||||||
|
|
||||||
[ -n "$LOGFILE" ] || LOGFILE="/dev/null"
|
|
||||||
/usr/lib/kodi/kodi.bin $@
|
|
||||||
EXIT_CODE=$?
|
|
||||||
|
|
||||||
case "$EXIT_CODE" in
|
|
||||||
64) # 64=powerdown
|
|
||||||
echo "kodi exited with EXIT_CODE=$EXIT_CODE at $(date). Shutting down..." >>$LOGFILE
|
|
||||||
# pre_umount
|
|
||||||
systemctl poweroff
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
66) # 66=reboot
|
|
||||||
echo "kodi exited with EXIT_CODE=$EXIT_CODE at $(date). Rebooting..." >>$LOGFILE
|
|
||||||
# pre_umount
|
|
||||||
systemctl reboot
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*) # 0=quit, 65=restart-app; let systemd restart the service
|
|
||||||
echo "kodi exited with EXIT_CODE=$EXIT_CODE at $(date). Returning -1 to systemd..." >>$LOGFILE
|
|
||||||
echo 1 > /sys/class/graphics/fbcon/cursor_blink
|
|
||||||
exit 1
|
|
||||||
esac
|
|
Loading…
Reference in a new issue