alarm/kodi-imx to 14.2-2

This commit is contained in:
Kevin Mihelich 2015-04-04 02:31:12 +00:00
parent c4a449bc3b
commit 8380b4be7a
4 changed files with 140 additions and 134 deletions

View file

@ -1,137 +1,169 @@
# Contributor tomasgroth at yahoo.dk
# Contributor WarheadsSE <max@warheads.net>
# Contributor Romzetron <asromzek@gmail.com>
# Contributor Holzhaus <holthuis.jan@googlemail.com>
# 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: 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
pkgname=kodi-imx
pkgver=14.1
_prefix=/usr
pkgbase=kodi
pkgname=('kodi-imx' 'kodi-imx-eventclients')
pkgver=14.2
_codename=Helix
pkgrel=2
pkgdesc="A software media player and entertainment hub for digital media for select imx6 system"
arch=('armv7h')
arch=('i686' 'x86_64')
url="http://kodi.tv"
license=('GPL' 'custom')
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')
license=('GPL2')
makedepends=(
'boost' 'cmake' 'gperf' 'nasm' 'zip' 'udisks' 'upower' 'git'
'autoconf' 'java-environment')
optdepends=(
'lirc: remote controller support'
'udisks: automount external drives'
'upower: used to trigger power management functionality'
'unrar: access compressed files without unpacking them')
provides=("kodi")
conflicts=("xbmc" "kodi")
replaces=("xbmc-imx")
install="kodi.install"
source=("https://github.com/xbmc/xbmc/archive/$pkgver-$_codename.tar.gz"
'kodi.service'
'polkit.rules'
'runkodi'
'kodi.conf'
'imx-spdif.conf'
'imx-hdmi-soc.conf')
sha256sums=('a38059e292cf8523918834e49fcc2d688525ceb7951ddf7f5ee535f4147255d6'
'b8cb9bc4fd7f21e197aeed88453c037d6e688f6e353c04b1f63052b6ba1f879c'
'9ea592205023ba861603d74b63cdb73126c56372a366dc4cb7beb379073cbb96'
'b7f9ef15f774fe9ddd9fa029a2032c2d7668be1095a0561640826f16cdd1ba00'
'db6372248015fa4e663bf789e4f7121b5a9ade323f361994bbd6f135ce169123'
'afpfs-ng' 'bluez-libs' 'boost' 'cmake' 'curl' 'cwiid' 'doxygen' 'git' 'glew'
'gperf' 'hicolor-icon-theme' 'jasper' 'java-runtime' 'libaacs' 'libass'
'libbluray' 'libcdio' 'libmariadbclient' 'libmicrohttpd'
'libmodplug' 'libmpeg2' 'libnfs' 'libplist' 'libpulse' 'libssh' 'libva'
'libxrandr' 'libxslt' 'lzo' 'nasm' 'nss-mdns' 'python2-pillow'
'python2-pybluez' 'python2-simplejson' 'rtmpdump' 'sdl2' 'sdl_image'
'shairplay' 'smbclient' 'swig' 'taglib' 'tinyxml' 'unzip' 'upower' 'yajl' 'zip'
'libfslvpuwrap' 'gpu-viv-bin-mx6q-fb' 'libcec-imx6' 'firmware-imx'
)
source=(
"$pkgname-$pkgver-$_codename.tar.gz::https://github.com/xbmc/xbmc/archive/$pkgver-$_codename.tar.gz"
'imx-hdmi-soc.conf'
'imx-spdif.conf'
'kodi.service'
'polkit.rules'
)
sha256sums=('d9cb8590430a925fb789a5beb4da2695cdcd2d2500dd31126f3b77b31aa267f4'
'6d9822d97b9e1268c04078f6c9b6316eb013f95f96f90034b51fa7473b9752ff'
'0e16e4d2ec0c0e1810fe1ad6a7c4dee99d6fc0f49502f0e836210f5dd537d92d'
'6d9822d97b9e1268c04078f6c9b6316eb013f95f96f90034b51fa7473b9752ff')
_prefix=/usr
'5235068d5800d69f0287087815990e7fe8d6572733d60c8800546d35f608e87f'
'9ea592205023ba861603d74b63cdb73126c56372a366dc4cb7beb379073cbb96')
prepare() {
cd "$srcdir/xbmc-$pkgver-$_codename"
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/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() {
cd "$srcdir/xbmc-$pkgver-$_codename"
# Bootstrapping Kodi
# Bootstrapping
MAKEFLAGS=-j1 ./bootstrap
# Configuring Kodi
export PYTHON_VERSION=2 # external python v2
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"
#./configure --help
#return 1
#If build fails try uncommenting the line below first
#export MAKEFLAGS="-j1"
./configure --prefix=$_prefix --exec-prefix=$_prefix \
--disable-gl \
--enable-gles \
--disable-x11 \
--disable-sdl \
--enable-optimizations \
--disable-goom \
--disable-pulse \
--disable-vaapi \
--disable-vdpau \
--disable-xrandr \
--enable-airplay \
--enable-airtunes \
--enable-avahi \
--enable-libbluray \
--enable-dvdcss \
--disable-debug \
--disable-joystick \
--disable-mid \
--enable-nfs \
--disable-profiling \
--disable-projectm \
--enable-rsxs \
--enable-rtmp \
--disable-vaapi \
# Configuring XBMC
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"
CXXFLAGS="${CFLAGS}"
CPPFLAGS+=" -I/opt/fsl/include"
LDFLAGS+=" -Wl,-rpath,/opt/fsl/lib -L/opt/fsl/lib"
./configure --prefix=$_prefix --exec-prefix=$_prefix \
--disable-debug \
--disable-gl \
--enable-gles \
--disable-x11 \
--disable-sdl \
--enable-optimizations \
--disable-goom \
--disable-pulse \
--enable-libbluray \
--enable-external-libraries \
--with-lirc-device=/run/lirc/lircd \
--disable-vaapi \
--disable-openmax \
--enable-optical-drive \
--enable-texturepacker \
--with-lirc-device=/run/lirc/lircd \
--enable-codec=imxvpu \
--enable-libcec
--enable-codec=imxvpu \
--enable-libcec \
ac_cv_lib_bluetooth_hci_devid=no
# Now (finally) build
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"
# 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
install -dm755 ${pkgdir}${_prefix}/share/licenses/${pkgname}
install -dm755 ${pkgdir}${_prefix}/share/licenses/${pkgname}
for licensef in LICENSE.GPL copying.txt; do
mv ${pkgdir}${_prefix}/share/doc/kodi/${licensef} \
${pkgdir}${_prefix}/share/licenses/${pkgname}
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 -Dm0755 $srcdir/runkodi $pkgdir/usr/bin/runkodi
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
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
install -Dm0644 $srcdir/imx-hdmi-soc.conf $pkgdir/usr/share/alsa/cards/imx-hdmi-soc.conf
}
package_kodi-imx-eventclients() {
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
}

View file

@ -1,19 +1,24 @@
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 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
mkdir -p var/lib/kodi
chown -R kodi:kodi var/lib/kodi
update_icons
}
post_upgrade() {
post_install $1
update_icons
}
post_remove() {
[[ $(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 && groupdel 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
}

View file

@ -6,7 +6,7 @@ After = remote-fs.target
User = kodi
Group = kodi
Type = simple
ExecStart = /usr/bin/runkodi
ExecStart = /usr/bin/kodi-standalone -l /run/lirc/lircd
Restart = on-failure
[Install]

View file

@ -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