2011-10-13 12:58:31 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
PREREQ=""
|
|
|
|
|
|
|
|
prereqs()
|
|
|
|
{
|
|
|
|
echo "${PREREQ}"
|
|
|
|
}
|
|
|
|
|
|
|
|
case "${1}" in
|
|
|
|
prereqs)
|
|
|
|
prereqs
|
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
. /usr/share/initramfs-tools/hook-functions
|
|
|
|
|
|
|
|
THEME="$(/usr/sbin/plymouth-set-default-theme || true)"
|
|
|
|
THEMES="/usr/share/plymouth/themes"
|
|
|
|
|
2011-10-13 20:41:50 +02:00
|
|
|
if [ -n "${THEME}" ]; then
|
2011-10-13 12:58:31 +02:00
|
|
|
THEME="${THEMES}/${THEME}/${THEME}.plymouth"
|
|
|
|
else
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
PLUGIN_PATH="$(plymouth --get-splash-plugin-path)"
|
|
|
|
|
|
|
|
case "$(basename ${THEME} .plymouth)" in
|
|
|
|
text)
|
|
|
|
PLUGINS="details.so text.so"
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
PLUGINS="details.so text.so label.so"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
MODULE="${PLUGIN_PATH}/$(sed -n 's/^ModuleName=\(.*\)/\1/p' ${THEME}).so"
|
|
|
|
|
|
|
|
# copy plugin and images for current theme
|
|
|
|
copy_exec "${MODULE}"
|
|
|
|
mkdir -p "${DESTDIR}/${THEMES}"
|
|
|
|
IMAGES="$(sed -n 's/^ImageDir=\(.*\)/\1/p' ${THEME})"
|
|
|
|
# No images in text mode:
|
2011-10-13 20:41:50 +02:00
|
|
|
if [ -n "${IMAGES}" ]; then
|
2011-10-13 12:58:31 +02:00
|
|
|
cp -r "${IMAGES}" "${DESTDIR}/${THEMES}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# copy binaries and base plugins
|
|
|
|
copy_exec /bin/plymouth
|
|
|
|
copy_exec /sbin/plymouthd
|
|
|
|
|
2011-10-13 20:41:50 +02:00
|
|
|
for PLUGIN in ${PLUGINS}; do
|
2011-10-13 12:58:31 +02:00
|
|
|
copy_exec ${PLUGIN_PATH}/${PLUGIN}
|
|
|
|
done
|
|
|
|
|
|
|
|
# copy base themes and logo
|
|
|
|
cp -a "${THEMES}/details" "${DESTDIR}/${THEMES}"
|
|
|
|
cp -a "${THEMES}/text" "${DESTDIR}/${THEMES}"
|
|
|
|
cp /etc/os-release "${DESTDIR}/etc"
|
|
|
|
|
|
|
|
case "$(basename ${THEME} .plymouth)" in
|
|
|
|
text)
|
|
|
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
2012-01-11 18:29:46 +01:00
|
|
|
# Void splash image
|
|
|
|
cp /usr/share/void-artwork/splash.png "${DESTDIR}/usr/share/plymouth"
|
2011-10-13 20:41:50 +02:00
|
|
|
|
2011-10-13 12:58:31 +02:00
|
|
|
# copy files for font rendering
|
2012-01-09 17:30:16 +01:00
|
|
|
mkdir -p "${DESTDIR}/usr/share/fonts/TTF"
|
2011-10-13 12:58:31 +02:00
|
|
|
mkdir -p "${DESTDIR}/etc/fonts/conf.d"
|
|
|
|
mkdir -p "${DESTDIR}/var/cache/fontconfig"
|
2012-01-09 17:30:16 +01:00
|
|
|
cp -a /usr/share/fonts/TTF/DejaVuSerif.ttf "${DESTDIR}/usr/share/fonts/TTF"
|
|
|
|
cp -a /usr/share/fonts/TTF/DejaVuSans.ttf "${DESTDIR}/usr/share/fonts/TTF"
|
2011-10-13 12:58:31 +02:00
|
|
|
cp -a /etc/fonts/fonts.conf "${DESTDIR}/etc/fonts"
|
|
|
|
cp -rL /etc/fonts/conf.d/60-latin.conf "${DESTDIR}/etc/fonts/conf.d"
|
|
|
|
if [ -d /usr/lib/pango/1.6.0 ]; then
|
|
|
|
PANGO_DIR=/usr/lib/pango/1.6.0
|
|
|
|
fi
|
|
|
|
copy_exec ${PANGO_DIR}/modules/pango-basic-fc.so
|
|
|
|
|
|
|
|
# copy renderers
|
|
|
|
copy_exec /usr/lib/plymouth/renderers/frame-buffer.so
|
|
|
|
copy_exec /usr/lib/plymouth/renderers/drm.so
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# copy config files
|
|
|
|
mkdir -p "${DESTDIR}/etc/plymouth"
|
|
|
|
|
2011-10-13 20:41:50 +02:00
|
|
|
if [ -r /etc/plymouth/plymouthd.conf ]; then
|
2011-10-13 12:58:31 +02:00
|
|
|
cp -a /etc/plymouth/plymouthd.conf "${DESTDIR}/etc/plymouth/"
|
|
|
|
fi
|
|
|
|
|
|
|
|
cp -a /usr/share/plymouth/plymouthd.defaults "${DESTDIR}/usr/share/plymouth/"
|