# hook-addon for plymouth support if [ ! -x /bin/plymouth ]; then _verbose "(90plymouth) Plymouth not installed" else if [ $TCOS_DISABLE_PLYMOUTH ]; then rm -f ${DESTDIR}/lib/plymouth 2>/dev/null rm -f ${DESTDIR}/sbin/plymouthd 2>/dev/null rm -f ${DESTDIR}/bin/plymouth 2>/dev/null rm -rf ${DESTDIR}/usr/share/plymouth ${DESTDIR}/lib/plymouth ${DESTDIR}/usr/lib/plymouth 2>/dev/null rm -f ${DESTDIR}/scripts/*/plymouth 2>/dev/null cat << EOF > ${DESTDIR}/sbin/plymouthd #!/bin/sh exit 0 EOF chmod +x ${DESTDIR}/sbin/plymouthd cp ${DESTDIR}/sbin/plymouthd ${DESTDIR}/bin/plymouth _verbose "(90plymouth) TCOS_DISABLE_PLYMOUTH enabled !!!" else #TCOS_DISABLE_PLYMOUTH not found stat_before PLY_PATH="/usr/share/plymouth" # in ubuntu /lib/plymouth if [ -d /lib/plymouth/themes ]; then PLY_PATH="/lib/plymouth" fi mkdir -p ${DESTDIR}/${PLY_PATH} mkdir -p ${DESTDIR}/${PLY_PATH}/renderers mkdir -p ${DESTDIR}/${PLY_PATH}/themes copy_exec /sbin/plymouthd /sbin copy_exec /bin/plymouth /bin echo "TCOS $TCOS_VESRION" >> $DESTDIR/etc/debian_version THEMES="$PLY_PATH/themes" if [ ! -e ${THEMES}/${TCOS_PLYMOUTH}/${TCOS_PLYMOUTH}.plymouth ]; then TCOS_PLYMOUTH=default THEME=$(readlink -f ${THEMES}/${TCOS_PLYMOUTH}.plymouth) else THEME=$(readlink -f ${THEMES}/${TCOS_PLYMOUTH}/${TCOS_PLYMOUTH}.plymouth) fi MODULE=$(grep "ModuleName *= *" ${THEME} | sed 's/ModuleName *= *//') #TEXT_THEME=$(readlink -f ${THEMES}/text.plymouth) #MODULE_TEXT=$(grep "ModuleName *= *" ${TEXT_THEME} | sed 's/ModuleName *= *//') # plugin that is always required copy_exec /lib/plymouth/details.so ${PLY_PATH} # copy the default themes cp -a ${PLY_PATH}/themes/details ${DESTDIR}${PLY_PATH}/themes/ #if [ -n "$TEXT_THEME" ]; then # rm -f ${DESTDIR}${PLY_PATH}/themes/text.plymouth 2>/dev/null # ln -s $TEXT_THEME ${DESTDIR}${PLY_PATH}/themes/text.plymouth # cp -a $(dirname $TEXT_THEME) ${DESTDIR}${PLY_PATH}/themes/ # cpifexists /lib/plymouth/$MODULE_TEXT.so ${PLY_PATH} #fi if [ -n "$THEME" ]; then rm -f ${DESTDIR}${PLY_PATH}/themes/default.plymouth 2>/dev/null ln -s $THEME ${DESTDIR}${PLY_PATH}/themes/default.plymouth cp -a $(dirname $THEME) ${DESTDIR}${PLY_PATH}/themes/ copy_exec ${PLY_PATH}/$MODULE.so ${PLY_PATH} # if we have a non-text theme, make sure we copy all the support libs [ -e ${PLY_PATH}/label.so ] && copy_exec ${PLY_PATH}/label.so ${PLY_PATH} # output renderers [ -e $PLY_PATH/renderers/frame-buffer.so.png ] && copy_exec ${PLY_PATH}/renderers/frame-buffer.so ${PLY_PATH}/renderers/ [ -e $PLY_PATH/renderers/drm.so ] && copy_exec ${PLY_PATH}/renderers/drm.so ${PLY_PATH}/renderers/ [ -e $PLY_PATH/renderers/vga16fb.so ] && copy_exec ${PLY_PATH}/renderers/vga16fb.so ${PLY_PATH}/renderers/ [ -e $PLY_PATH/${TCOS_PLYMOUTH}.png ] && cp $PLY_PATH/${TCOS_PLYMOUTH}.png ${DESTDIR}${PLY_PATH} [ -e $PLY_PATH/ubuntu-logo.png ] && cp $PLY_PATH/ubuntu-logo.png ${DESTDIR}${PLY_PATH} [ -e $PLY_PATH/debian-logo.png ] && cp $PLY_PATH/debian-logo.png ${DESTDIR}${PLY_PATH} # and copy the font support files needed in order to actually display # any text # mkdir -p ${DESTDIR}/usr/share/fonts/truetype/ttf-dejavu [ -e ${DESTDIR}/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf ] && rm -f ${DESTDIR}/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf mkdir -p ${DESTDIR}/etc/fonts/conf.d mkdir -p ${DESTDIR}/usr/lib/pango/1.6.0/module-files.d mkdir -p ${DESTDIR}/usr/lib/pango/1.6.0/modules # cp /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf ${DESTDIR}/usr/share/fonts/truetype/ttf-dejavu/ cp /etc/fonts/fonts.conf ${DESTDIR}/etc/fonts/fonts.conf cp -L /etc/fonts/conf.d/60-latin.conf ${DESTDIR}/etc/fonts/conf.d cp /usr/lib/pango/1.6.0/module-files.d/libpango1.0-0.modules ${DESTDIR}/usr/lib/pango/1.6.0/module-files.d/ cp /usr/lib/pango/1.6.0/modules/pango-basic-fc.so ${DESTDIR}/usr/lib/pango/1.6.0/modules/pango-basic-fc.so fi stat_after "Plymouth support" fi fi