mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 18:42:12 +08:00
124 lines
4.5 KiB
Bash
124 lines
4.5 KiB
Bash
# Mantainer: Manuel 'UtG' <utg[dot]chakra.linux[at]gmail[dot]com>
|
|
# Contributorr: Neophytos Kolokotronis <tetris4 AT gmail DOT com>
|
|
|
|
### NOTE: when you update XBMC, you also have to update xbmc-pvr-addons
|
|
|
|
pkgname=xbmc
|
|
pkgver=13.2
|
|
_codename=Gotham
|
|
pkgrel=1
|
|
pkgdesc="XBMC Media Center is a software media player and entertainment hub for digital media"
|
|
arch=('x86_64')
|
|
url="http://xbmc.org"
|
|
license=('GPL2')
|
|
depends=( 'bzip2' 'curl' 'enca' 'faac' 'faad2' 'ffmpeg' 'fontconfig' 'fribidi' 'python2' 'python-pysqlite'
|
|
'glew' 'jasper' 'libcdio' 'libgl' 'libmad' 'libmms' 'libass' 'yajl' 'libtiff'
|
|
'libmpeg2' 'libmariadbclient' 'libsamplerate' 'libxinerama' 'libpng' 'libbluedevil'
|
|
'libxrandr' 'libxtst' 'lzo2' 'sdl_image' 'sdl_mixer' 'libvorbis' 'libpulse' 'libdvdcss'
|
|
'smbclient' 'wavpack' 'mesa-demos' 'xorg-utils' 'libmicrohttpd' 'libjpeg-turbo' 'mesa' 'swig'
|
|
'libssh' 'libva' 'libmodplug' 'rtmpdump' 'lsb-release' 'sqlite3' 'libbluray' 'java-runtime'
|
|
'tinyxml' 'taglib' 'libcap' 'avahi' 'libshairport' 'glu' 'libplist' 'libnfs' 'libcec' 'pcre')
|
|
makedepends=('boost' 'cmake' 'gperf' 'nasm' 'libvdpau' 'unzip' 'zip' 'cvs' 'autoconf' 'automake'
|
|
'udisks' 'upower' 'mesa' 'doxygen' 'swig')
|
|
optdepends=('lirc: remote controller support'
|
|
'unrar: access compressed files without unpacking them'
|
|
'udisks: automount external drives'
|
|
'upower: used to trigger suspend functionality'
|
|
'libvdpau: for nvidia hardware acceleration'
|
|
'lcms'
|
|
'tk')
|
|
categories=('multimedia')
|
|
screenshot=('http://xbmc.org/wp-content/gallery/back-row/screenshot000.jpg')
|
|
install=${pkgname}.install
|
|
options=('makeflags')
|
|
source=("xbmc-$pkgver.tar.gz::https://github.com/xbmc/xbmc/archive/${pkgver}-${_codename}.tar.gz"
|
|
"${pkgname}.service"
|
|
"polkit.rules"
|
|
"enable-external-ffmpeg.patch")
|
|
sha256sums=('acbf5dffa3034a3406240ee3cf81e721386cd383d23d056ddde1f769e050e585'
|
|
'547e06f3141866cd34b1df34025517e9826992b67543af7621d954bcdfa0ba94'
|
|
'4ea78374a08e13a64dcf6a424b111b8bfc11de03ed5829744fc6d9b5fc1ec96e'
|
|
'0239e33e87292c7340ed2092f2b5f1e82f5e283b1f763fb125b3aee78f50c355')
|
|
|
|
prepare() {
|
|
cd xbmc-${pkgver}-${_codename}
|
|
|
|
patch -p1 -i ../enable-external-ffmpeg.patch
|
|
|
|
# fix lsb_release dependency
|
|
sed -i -e 's:/usr/bin/lsb_release -d:cat /etc/arch-release:' xbmc/utils/SystemInfo.cpp
|
|
sed -i -e 's:#include <libsmbclient.h>:#include <samba-4.0/libsmbclient.h>:' xbmc/filesystem/{SmbFile,SMBDirectory}.cpp
|
|
}
|
|
|
|
build() {
|
|
cd xbmc-${pkgver}-${_codename}
|
|
|
|
msg "Bootstrapping XBMC"
|
|
./bootstrap
|
|
|
|
msg "Configuring XBMC"
|
|
# external python v2
|
|
export PYTHON_VERSION=2
|
|
./configure --prefix=/usr \
|
|
--enable-optimizations \
|
|
--enable-gl \
|
|
--enable-sdl \
|
|
--enable-vaapi \
|
|
--enable-vdpau \
|
|
--enable-xrandr \
|
|
--enable-rsxs \
|
|
--enable-projectm \
|
|
--enable-x11 \
|
|
--enable-pulse \
|
|
--enable-samba \
|
|
--enable-nfs \
|
|
--enable-avahi \
|
|
--enable-airplay \
|
|
--enable-airtunes \
|
|
--enable-ffmpeg-libvorbis \
|
|
--enable-rtmp \
|
|
--enable-libbluray \
|
|
--enable-dvdcss \
|
|
--enable-webserver \
|
|
--enable-optical-drive \
|
|
--enable-texturepacker \
|
|
--enable-udev \
|
|
--enable-libusb \
|
|
--enable-external-libraries \
|
|
--enable-libcec \
|
|
--enable-joystick \
|
|
--disable-hal \
|
|
--disable-external-ffmpeg \
|
|
--disable-debug
|
|
|
|
|
|
msg "Running make"
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd xbmc-${pkgver}-${_codename}
|
|
msg "Running make install"
|
|
make DESTDIR="${pkgdir}" install
|
|
|
|
# lsb_release fix
|
|
sed -i -e 's/which lsb_release &> \/dev\/null/\[ -f \/etc\/chakra-release ]/g' "${pkgdir}/usr/bin/xbmc"
|
|
sed -i -e "s/lsb_release -a 2> \/dev\/null | sed -e 's\/\^\/ \/'/cat \/etc\/chakra-release/g" "${pkgdir}/usr/bin/xbmc"
|
|
|
|
# Tools
|
|
install -D -m 0755 "${srcdir}/xbmc-${pkgver}-${_codename}/xbmc-xrandr" "${pkgdir}/usr/share/xbmc/xbmc-xrandr"
|
|
install -D -m 0755 "${srcdir}/xbmc-${pkgver}-${_codename}/tools/TexturePacker/TexturePacker" "${pkgdir}/usr/share/xbmc/"
|
|
|
|
# Licenses
|
|
install -d -m 0755 "${pkgdir}/usr/share/licenses/${pkgname}"
|
|
for licensef in LICENSE.GPL copying.txt; do
|
|
mv "${pkgdir}/usr/share/doc/xbmc/${licensef}" "${pkgdir}/usr/share/licenses/${pkgname}"
|
|
done
|
|
|
|
# Systemd service
|
|
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/"
|
|
}
|
|
|