mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 18:42:12 +08:00
103 lines
3.9 KiB
Bash
103 lines
3.9 KiB
Bash
#
|
|
# Chakra Packages for Chakra, part of chakra-project.org
|
|
#
|
|
# maintainer abveritas@chakra-project.org
|
|
|
|
_prefix=/usr
|
|
|
|
pkgname=xbmc
|
|
pkgver=12.2
|
|
pkgrel=4
|
|
pkgdesc="XBMC Media Center"
|
|
arch=('x86_64')
|
|
url="http://xbmc.org"
|
|
license=('GPL' 'custom')
|
|
depends=( 'bzip2' 'curl' 'enca' 'faac' 'faad2' 'fontconfig' 'fribidi' 'python2' 'python-pysqlite'
|
|
'glew' 'jasper' 'libcdio' 'libgl' 'libmad' 'libmms' 'libass' 'yajl'
|
|
'libmpeg2' 'libmariadbclient' 'libsamplerate' 'libxinerama' 'libpng' 'libbluedevil'
|
|
'libxrandr' 'libxtst' 'lzo2' 'sdl_image' 'sdl_mixer' 'libvorbis' 'libpulse' 'libdvdcss'
|
|
'samba' 'wavpack' 'mesa-demos' 'xorg-utils' 'libmicrohttpd' 'libjpeg-turbo' 'mesa' 'swig'
|
|
'libssh' 'libva' 'libmodplug' 'rtmpdump' 'lsb-release' 'sqlite3' 'libbluray' 'java-runtime'
|
|
'tinyxml' 'taglib' 'libcap')
|
|
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=("http://mirrors.xbmc.org/releases/source/xbmc-$pkgver.tar.gz"
|
|
"FEH.sh"
|
|
"${pkgname}.service")
|
|
sha256sums=('b2330634fc513d27a44b131bbbe4ca6b61d60a1fe6c7ca27a7dc749df0bcea1c'
|
|
'1b391dfbaa07f81e5a5a7dfd1288bf2bdeab8dc50bbb6dbf39a80d8797dfaeb0'
|
|
'547e06f3141866cd34b1df34025517e9826992b67543af7621d954bcdfa0ba94')
|
|
|
|
build() {
|
|
cd "${srcdir}/xbmc-$pkgver"
|
|
|
|
msg "Bootstrapping XBMC"
|
|
./bootstrap
|
|
|
|
msg "Configuring XBMC"
|
|
./configure --prefix=${_prefix} \
|
|
--enable-vdpau \
|
|
--enable-pulse \
|
|
--disable-avahi \
|
|
--disable-external-ffmpeg \
|
|
--enable-rtmp \
|
|
--enable-libbluray \
|
|
--enable-dvdcss \
|
|
--disable-debug
|
|
|
|
msg "Running make"
|
|
make
|
|
make -C lib/addons/script.module.pil
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/xbmc-$pkgver"
|
|
msg "Running make install"
|
|
make prefix="${pkgdir}${_prefix}" install
|
|
|
|
# Replace FEH.py with FEH.sh (and thus remove external python dependency)
|
|
install -D -m 0755 "${srcdir}/FEH.sh" "${pkgdir}${_prefix}/share/xbmc/FEH.sh"
|
|
sed -i -e 's/^python \(.*\)FEH.py \(.*\)$/\1FEH.sh \2/' "${pkgdir}${_prefix}/bin/xbmc"
|
|
|
|
# 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"
|
|
|
|
# .desktop files
|
|
install -D -m 0644 "${srcdir}/xbmc-$pkgver/tools/Linux/xbmc.desktop" "${pkgdir}${_prefix}/share/applications/xbmc.desktop"
|
|
install -D -m 0644 "${srcdir}/xbmc-$pkgver/tools/Linux/xbmc-48x48.png" "${pkgdir}${_prefix}/share/pixmaps/xbmc.png"
|
|
|
|
# Tools
|
|
install -D -m 0755 "${srcdir}/xbmc-$pkgver/xbmc-xrandr" "${pkgdir}${_prefix}/share/xbmc/xbmc-xrandr"
|
|
install -D -m 0755 "${srcdir}/xbmc-$pkgver/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
|
|
|
|
# Docs
|
|
install -d -m 0755 "${pkgdir}${_prefix}/share/doc/${pkgname}"
|
|
|
|
# cleanup some stuff
|
|
msg "Cleanup unneeded files"
|
|
rm -rf "${pkgdir}/usr/share/xsessions"
|
|
rm -f "${pkgdir}/usr/share/xbmc/FEH.py"
|
|
rm -f "${pkgdir}/usr/share/icons/hicolor/icon-theme.cache"
|
|
|
|
# Systemd service
|
|
install -Dm0644 "${srcdir}/xbmc.service" "${pkgdir}/usr/lib/systemd/system/xbmc.service"
|
|
}
|