home *** CD-ROM | disk | FTP | other *** search
- #!/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"
-
- if [ -n "${THEME}" ]
- then
- 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:
- if [ -n "${IMAGES}" ]
- then
- cp -r "${IMAGES}" "${DESTDIR}/${THEMES}"
- fi
-
- # copy binaries and base plugins
- copy_exec /bin/plymouth
- copy_exec /sbin/plymouthd
-
- for PLUGIN in ${PLUGINS}
- do
- 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/debian_version "${DESTDIR}/etc"
-
- case "$(basename ${THEME} .plymouth)" in
- text)
-
- ;;
-
- *)
- cp /usr/share/plymouth/debian-logo.png "${DESTDIR}/usr/share/plymouth"
-
- # copy files for font rendering
- mkdir -p "${DESTDIR}/usr/share/fonts/truetype/ttf-dejavu"
- mkdir -p "${DESTDIR}/etc/fonts/conf.d"
- mkdir -p "${DESTDIR}/var/cache/fontconfig"
- cp -a /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf "${DESTDIR}/usr/share/fonts/truetype/ttf-dejavu"
- cp -a /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf "${DESTDIR}/usr/share/fonts/truetype/ttf-dejavu"
- cp -a /etc/fonts/fonts.conf "${DESTDIR}/etc/fonts"
- cp -rL /etc/fonts/conf.d/60-latin.conf "${DESTDIR}/etc/fonts/conf.d"
- if [ -e /usr/lib/pango/1.6.0/module-files.d/libpango1.0-0.modules ]
- then
- # pre-multiarch fallback
- PANGO_DIR=/usr/lib/pango/1.6.0
- else
- PANGO_DIR=/usr/lib//pango/1.6.0
- fi
- mkdir -p "${DESTDIR}${PANGO_DIR}/module-files.d"
- mkdir -p "${DESTDIR}${PANGO_DIR}/modules"
- cp ${PANGO_DIR}/module-files.d/libpango1.0-0.modules ${DESTDIR}${PANGO_DIR}/module-files.d/
- 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
-
- # add drm/fb modules
- manual_add_modules intel-agp
- manual_add_modules ati-agp
- manual_add_modules i915
- manual_add_modules radeon
- ;;
- esac
-
- # copy config files
- mkdir -p "${DESTDIR}/etc/plymouth"
-
- if [ -r /etc/plymouth/plymouthd.conf ]
- then
- cp -a /etc/plymouth/plymouthd.conf "${DESTDIR}/etc/plymouth/"
- fi
-
- cp -a /usr/share/plymouth/plymouthd.defaults "${DESTDIR}/usr/share/plymouth/"
-