fontconfig: add systemd support, move userfont dir setup to xbmc

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2013-08-05 08:39:17 +02:00
parent 0ece1359d9
commit fe5630511e
5 changed files with 33 additions and 15 deletions

View File

@ -466,6 +466,7 @@ post_makeinstall_target() {
cp $PKG_DIR/scripts/xbmc-config $INSTALL/usr/lib/xbmc
cp $PKG_DIR/scripts/xbmc-hacks $INSTALL/usr/lib/xbmc
cp $PKG_DIR/scripts/xbmc-sources $INSTALL/usr/lib/xbmc
cp $PKG_DIR/scripts/xbmc-userfonts $INSTALL/usr/lib/xbmc
mkdir -p $INSTALL/usr/bin
cp $PKG_DIR/scripts/cputemp $INSTALL/usr/bin
@ -552,5 +553,6 @@ post_install() {
enable_service xbmc-halt.service
enable_service xbmc-poweroff.service
enable_service xbmc-reboot.service
enable_service xbmc-userfonts.service
enable_service xbmc.service
}

View File

@ -1,6 +1,7 @@
#!/bin/sh
################################################################################
# Copyright (C) 2009-2010 OpenELEC.tv
# http://www.openelec.tv
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -18,15 +19,11 @@
# http://www.gnu.org/copyleft/gpl.html
################################################################################
# start Avahi Daemon
#
# runlevels: openelec, textmode
. /etc/profile
FC_CACHE_DIRS="/usr/share/fonts/ /usr/share/xbmc/media/Fonts/"
SUBFONTS="/storage/.xbmc/userdata/fonts"
# hack to support user installed fonts
SUBFONTS="/storage/.xbmc/userdata/fonts"
if [ -d "$SUBFONTS" ]; then
files=$(ls $SUBFONTS/*.[tT][tT][fF] 2>/dev/null | wc -l)
if [ "$files" = "0" ]; then
@ -34,10 +31,3 @@ FC_CACHE_DIRS="/usr/share/fonts/ /usr/share/xbmc/media/Fonts/"
fi
mount --bind $SUBFONTS /usr/share/xbmc/media/Fonts/
fi
(
progress "Creating fontconfig cache"
fc-cache $FC_CACHE_DIRS
)&

View File

@ -0,0 +1,11 @@
[Unit]
Description=XBMC user fonts setup
Before=xbmc.service
[Service]
Type=oneshot
ExecStart=/usr/lib/xbmc/xbmc-userfonts
RemainAfterExit=yes
[Install]
WantedBy=xbmc.service

View File

@ -57,3 +57,7 @@ post_makeinstall_target() {
rm -rf $INSTALL/usr/bin/fc-scan
rm -rf $INSTALL/usr/bin/fc-validate
}
post_install() {
enable_service fc-cache.service
}

View File

@ -0,0 +1,11 @@
[Unit]
Description=Fontconfig caching
Before=graphical.target
[Service]
Type=oneshot
ExecStart=/usr/bin/fc-cache /usr/share/fonts/ /usr/share/xbmc/media/Fonts/
RemainAfterExit=yes
[Install]
WantedBy=graphical.target