mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
143 lines
5.5 KiB
Bash
143 lines
5.5 KiB
Bash
# Contributor tomasgroth at yahoo.dk
|
|
# Contributor WarheadsSE <max@warheads.net>
|
|
# Contributor Romzetron <asromzek@gmail.com>
|
|
# Contributor Holzhaus <holthuis.jan@googlemail.com>
|
|
|
|
buildarch=16
|
|
|
|
pkgname=xbmc-rbp
|
|
pkgver=13.1
|
|
_codename=Gotham
|
|
pkgrel=2
|
|
pkgdesc="A software media player and entertainment hub for digital media for the Raspberry Pi"
|
|
arch=('armv6h')
|
|
url="http://xbmc.org"
|
|
license=('GPL' 'custom')
|
|
depends=('hicolor-icon-theme' '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' 'raspberrypi-firmware' 'libcec' 'libplist' 'swig' 'taglib' 'libxslt' 'shairplay-git')
|
|
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=("xbmc")
|
|
conflicts=("xbmc")
|
|
install="xbmc.install"
|
|
source=("https://github.com/xbmc/xbmc/archive/$pkgver-$_codename.tar.gz"
|
|
'xbmc.service'
|
|
'polkit.rules'
|
|
'panasonicCEC.patch'
|
|
'fix_libnfs.patch')
|
|
|
|
sha256sums=('344b604eae2ddb47c032dd7964d01f27e6fcd7a8873c84c0841d5da75961a678'
|
|
'189804742290946424a401163e351f5158bfd1b71e5b86b864589254b13f9571'
|
|
'4ea78374a08e13a64dcf6a424b111b8bfc11de03ed5829744fc6d9b5fc1ec96e'
|
|
'554140506063a85000d7072a961bb02514969e58b38a466aa120e9fb668a1863'
|
|
'67dc3b48e47a90728f25bc0035be6d0a96685067c1779635f69288995ddaa161')
|
|
|
|
_prefix=/usr
|
|
|
|
prepare() {
|
|
cd "$srcdir/xbmc-$pkgver-$_codename"
|
|
|
|
# fix lsb_release dependency
|
|
sed -i -e 's:/usr/bin/lsb_release -d:cat /etc/arch-release:' xbmc/utils/SystemInfo.cpp
|
|
|
|
# Suppress double keys within 250ms for some Panasonic TVs
|
|
# https://github.com/chbmuc/xbmc/commit/6e5822d4fe648abbd575cf77ced943a1461e9ae5
|
|
# http://archlinuxarm.org/forum/viewtopic.php?f=31&t=6376&start=10
|
|
patch -Np1 -i ${srcdir}/panasonicCEC.patch
|
|
|
|
# Fix missing headers includes
|
|
patch -Np1 -i ${srcdir}/fix_libnfs.patch
|
|
|
|
# fix samba4 libsmbclient.h location
|
|
sed -e 's/\(#include \)<libsmbclient\.h>/\1<samba-4.0\/libsmbclient\.h>/g' \
|
|
-i xbmc/filesystem/SmbFile.cpp \
|
|
-i xbmc/filesystem/SMBDirectory.cpp
|
|
}
|
|
|
|
build() {
|
|
cd "$srcdir/xbmc-$pkgver-$_codename"
|
|
|
|
# Bootstrapping XBMC
|
|
./bootstrap
|
|
|
|
# Configuring XBMC
|
|
export PYTHON_VERSION=2 # external python v2
|
|
# we need to compile for armv6 instead of armv5 to avoid problems compiling assembler code
|
|
export CFLAGS="-Ofast -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -fexcess-precision=fast -mfloat-abi=hard \
|
|
-mfpu=vfp -mabi=aapcs-linux -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=1 \
|
|
-I/opt/vc/include/ -I/opt/vc/include/IL -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
|
|
export CXXFLAGS="-Ofast -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -fexcess-precision=fast -mfloat-abi=hard -mfpu=vfp \
|
|
-mabi=aapcs-linux -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=1 \
|
|
-I/opt/vc/include/ -I/opt/vc/include/IL -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
|
|
export LDFLAGS="$LDFLAGS -L/opt/vc/lib"
|
|
export MAKEFLAGS="-j1"
|
|
|
|
./configure --prefix=$_prefix --exec-prefix=$_prefix \
|
|
--with-platform=raspberry-pi \
|
|
--disable-gl \
|
|
--enable-gles \
|
|
--disable-x11 \
|
|
--disable-sdl \
|
|
--enable-optimizations \
|
|
--disable-external-libraries \
|
|
--disable-goom \
|
|
--disable-hal \
|
|
--disable-pulse \
|
|
--disable-vaapi \
|
|
--disable-vdpau \
|
|
--disable-xrandr \
|
|
--enable-airplay \
|
|
--enable-airtunes \
|
|
--disable-alsa \
|
|
--enable-avahi \
|
|
--enable-libbluray \
|
|
--enable-dvdcss \
|
|
--disable-debug \
|
|
--disable-joystick \
|
|
--disable-mid \
|
|
--enable-nfs \
|
|
--disable-profiling \
|
|
--disable-projectm \
|
|
--enable-rsxs \
|
|
--enable-rtmp \
|
|
--disable-vaapi \
|
|
--disable-vdadecoder \
|
|
--disable-external-ffmpeg \
|
|
--enable-optical-drive \
|
|
--enable-player=omxplayer
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd "$srcdir/xbmc-$pkgver-$_codename"
|
|
# Running make install
|
|
make DESTDIR="${pkgdir}" install
|
|
|
|
# run feh with python2
|
|
sed -i -e 's/python/python2/g' ${pkgdir}${_prefix}/bin/xbmc
|
|
|
|
# Remove checks that don't apply to the raspberry pi
|
|
head -n 171 "${pkgdir}${_prefix}/share/xbmc/FEH.py" > "${pkgdir}${_prefix}/share/xbmc/FEH.py.new"
|
|
mv "${pkgdir}${_prefix}/share/xbmc/FEH.py.new" "${pkgdir}${_prefix}/share/xbmc/FEH.py"
|
|
|
|
# lsb_release fix
|
|
sed -i -e 's/which lsb_release > \/dev\/null/\[ -f \/etc\/arch-release ]/g' "${pkgdir}${_prefix}/bin/xbmc"
|
|
sed -i -e "s/lsb_release -a 2> \/dev\/null | sed -e 's\/\^\/ \/'/cat \/etc\/arch-release/g" "${pkgdir}${_prefix}/bin/xbmc"
|
|
|
|
# Tools
|
|
install -D -m 0755 "${srcdir}/xbmc-${pkgver}-${_codename}/tools/TexturePacker/TexturePacker" "${pkgdir}${_prefix}/share/xbmc/"
|
|
|
|
# Licenses
|
|
install -d -m 0755 "${pkgdir}${_prefix}/share/licenses/${pkgname}"
|
|
for licensef in LICENSE.GPL copying.txt; do
|
|
mv "${pkgdir}${_prefix}/share/doc/xbmc/${licensef}" "${pkgdir}${_prefix}/share/licenses/${pkgname}"
|
|
done
|
|
|
|
install -Dm0644 $srcdir/xbmc.service $pkgdir/usr/lib/systemd/system/xbmc.service
|
|
install -Dm0644 $srcdir/polkit.rules $pkgdir/usr/share/polkit-1/rules.d/10-xbmc.rules
|
|
chmod 0700 $pkgdir/usr/share/polkit-1/rules.d/
|
|
}
|