mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
aur/xmbc-rbp-git (v6h only)
This commit is contained in:
parent
4de1b8821a
commit
d7736c5453
1 changed files with 99 additions and 0 deletions
99
aur/xbmc-rbp-git/PKGBUILD
Normal file
99
aur/xbmc-rbp-git/PKGBUILD
Normal file
|
@ -0,0 +1,99 @@
|
|||
# Contributor tomasgroth at yahoo.dk
|
||||
# Contributor WarheadsSE <max@warheads.net>
|
||||
pkgname=xbmc-rbp-git
|
||||
pkgver=20120902
|
||||
pkgrel=1
|
||||
buildarch=16
|
||||
|
||||
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' 'libpng' 'libcdio' 'yajl' 'libmysqlclient' 'libjpeg-turbo' 'libsamplerate' 'libssh' 'libmicrohttpd' 'python2' 'libass' 'libmpeg2' 'libmad' 'libmodplug' 'rtmpdump' 'unzip' 'xorg-xdpyinfo' 'libbluray' 'libnfs' 'afpfs-ng' 'libshairport' 'avahi' 'bluez' 'jasper' 'tinyxml' 'raspberrypi-firmware' 'sdl_image' 'libcec')
|
||||
makedepends=('boost' 'cmake' 'gperf' 'nasm' 'zip' 'libcec' 'udisks' 'upower' 'bluez' 'git' 'autoconf')
|
||||
optdepends=(
|
||||
'lirc: remote controller support'
|
||||
'udisks: automount external drives'
|
||||
'upower: used to trigger suspend functionality'
|
||||
'unrar: access compressed files without unpacking them'
|
||||
)
|
||||
source=()
|
||||
|
||||
sha256sums=()
|
||||
|
||||
_gitroot="git://github.com/xbmc"
|
||||
_gitname="xbmc-rbp"
|
||||
|
||||
_prefix=/usr
|
||||
|
||||
build() {
|
||||
cd "${srcdir}"
|
||||
|
||||
msg2 "Connecting to GIT server..."
|
||||
if [[ -d "${_gitname}" ]]; then
|
||||
cd "${_gitname}" && git pull origin
|
||||
msg2 "The local files are updated."
|
||||
else
|
||||
git clone "${_gitroot}/${_gitname}"
|
||||
fi
|
||||
msg2 "GIT checkout done or server timeout."
|
||||
|
||||
cd "${srcdir}/${_gitname}"
|
||||
|
||||
# fix lsb_release dependency
|
||||
sed -i -e 's:/usr/bin/lsb_release -d:cat /etc/arch-release:' xbmc/utils/SystemInfo.cpp
|
||||
|
||||
# fix sse2 compiler flags
|
||||
sed -i -e 's/-DSQUISH_USE_SSE=2 -msse2//g' lib/libsquish/Makefile.in
|
||||
|
||||
# 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="-O3 -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp -mabi=aapcs-linux -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -I/opt/vc/include/ -I/opt/vc/include/IL -I/opt/vc/include/interface/vcos/pthreads"
|
||||
export CXXFLAGS="-O3 -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp -mabi=aapcs-linux -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -I/opt/vc/include/ -I/opt/vc/include/IL -I/opt/vc/include/interface/vcos/pthreads"
|
||||
export LDFLAGS="$LDFLAGS -L/opt/vc/lib"
|
||||
# export MAKEFLAGS="-j1"
|
||||
./configure --prefix=$_prefix --exec-prefix=$_prefix \
|
||||
--enable-gles --disable-sdl --disable-x11 --disable-xrandr --disable-openmax \
|
||||
--disable-optical-drive --disable-dvdcss --disable-joystick --disable-debug \
|
||||
--disable-crystalhd --disable-vtbdecoder --disable-vaapi --disable-vdpau \
|
||||
--disable-pulse --disable-projectm --with-platform=raspberry-pi --disable-optimizations \
|
||||
--enable-rpi-cec-api
|
||||
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${_gitname}"
|
||||
# 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 doesn'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}/${_gitname}/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
|
||||
|
||||
# Create lib links
|
||||
mkdir -p "${pkgdir}"/etc/ld.so.conf.d/
|
||||
|
||||
# ensure we can load libs
|
||||
echo "/opt/vc/lib/" > "${pkgdir}"/etc/ld.so.conf.d/xbmc-rbp-git.conf
|
||||
}
|
Loading…
Reference in a new issue