community/xbmc to 13.1-5

This commit is contained in:
Kevin Mihelich 2014-08-09 00:59:31 +00:00
parent 4678754702
commit 1b36589e24
3 changed files with 14 additions and 50 deletions

View file

@ -18,15 +18,16 @@ _prefix=/usr
pkgname=xbmc
pkgver=13.1
_codename=Gotham
pkgrel=4
pkgrel=5
pkgdesc="A software media player and entertainment hub for digital media"
arch=('i686' 'x86_64')
url="http://xbmc.org"
license=('GPL2')
depends=(
'avahi' 'ffmpeg' 'hicolor-icon-theme' 'libcdio' 'libmad' 'libmicrohttpd'
'libmpeg2' 'libmysqlclient' 'libsamplerate' 'libssh' 'libxrandr' 'libxslt'
'lzo2' 'mesa' 'mesa-demos' 'python2' 'sdl_image' 'sdl_mixer' 'smbclient'
'avahi' 'ffmpeg' 'hicolor-icon-theme' 'lame' 'libass' 'libbluray' 'libcdio' 'libmad'
'libmicrohttpd' 'libmodplug' 'libmpeg2' 'libmysqlclient' 'libsamplerate'
'libssh' 'libva' 'libvdpau' 'libvorbis' 'libxrandr' 'libxslt' 'lzo' 'mesa'
'mesa-demos' 'python2' 'python2-pillow' 'rtmpdump' 'sdl_image' 'smbclient'
'taglib' 'tinyxml' 'unzip' 'xorg-xdpyinfo' 'yajl'
)
makedepends=(
@ -49,12 +50,10 @@ optdepends=(
)
install="${pkgname}.install"
source=("xbmc-$pkgver-$_codename.tar.gz::https://github.com/xbmc/xbmc/archive/$pkgver-$_codename.tar.gz"
'xbmc.service'
'enable-external-ffmpeg.patch'
'0001-make-sure-applications-xbmc.desktop-does-nt-have-exe.patch'
'libnfs-header-changes.patch')
sha256sums=('344b604eae2ddb47c032dd7964d01f27e6fcd7a8873c84c0841d5da75961a678'
'f83097388e6c9b301cac78de95cf1797d4aaa11e4021734c28d643320e76d919'
'0239e33e87292c7340ed2092f2b5f1e82f5e283b1f763fb125b3aee78f50c355'
'5f5fe2932050265ad71c82b5d23efe5eaf7b2b3a152bdc6da66675cfb655fabe'
'cec996873f7c45fd01c04b5598152f4a13509eed9b38f395dd1fe0d5c8a4c1ff')
@ -130,11 +129,4 @@ package() {
mv "${pkgdir}$_prefix/share/doc/xbmc/$licensef" \
"${pkgdir}$_prefix/share/licenses/$pkgname"
done
# install systemd service
install -Dm0644 "$srcdir/xbmc.service" "$pkgdir/usr/lib/systemd/system/xbmc.service"
# XBMC user home
install -dm 700 "${pkgdir}"/var/lib/xbmc
chown 420:420 "${pkgdir}"/var/lib/xbmc
}

View file

@ -1,36 +1,24 @@
post_install() {
update_icons
getent group xbmc > /dev/null || groupadd -g 420 xbmc
if ! getent passwd xbmc > /dev/null; then
useradd -c 'XBMC user' -u 420 -g xbmc -G audio,video,network,optical -d /var/lib/xbmc -s /sbin/nologin xbmc
passwd -l xbmc > /dev/null
fi
update_autostart
}
post_upgrade() {
post_install $1
if ! getent group xbmc | cut -d: -f3 | grep 420 > /dev/null 2>&1; then
groupmod -g 420 xbmc > /dev/null 2>&1
fi
if ! id -u xbmc | grep 420 > /dev/null 2>&1; then
usermod -u 420 xbmc > /dev/null 2>&1
if [[ $? -ne 0 ]]; then
echo "Changing uid of user xbmc failed"
echo "It is recommended that the uid is changed."
echo "Stop all processes running under the xbmc user and reinstall xbmc"
echo "or change the uid manually. (usermod -u 420 xbmc)"
fi
chown -R xbmc:xbmc /var/lib/xbmc
fi
update_icons
update_autostart
}
post_remove() {
update_icons
getent passwd xbmc > /dev/null 2>&1 && userdel xbmc
getent group xbmc > /dev/null 2>&1 && groupdel xbmc
update_autostart
}
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
}
update_autostart() {
echo "To autostart xbmc standalone read: https://wiki.archlinux.org/index.php/Xbmc#Autostarting_at_boot"
}

View file

@ -1,16 +0,0 @@
[Unit]
Description = Starts instance of XBMC using xinit
After = systemd-user-sessions.service
Conflicts=getty@tty7.service
[Service]
User = xbmc
Group = xbmc
PAMName=login
Type = simple
TTYPath=/dev/tty7
ExecStart = /usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/xbmc-standalone -- :0 -nolisten tcp vt7
Restart = on-abort
[Install]
WantedBy = multi-user.target