You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

113 lines
2.6 KiB

  1. #!/bin/sh
  2. set -e
  3. PREREQ=""
  4. prereqs()
  5. {
  6. echo "${PREREQ}"
  7. }
  8. case "${1}" in
  9. prereqs)
  10. prereqs
  11. exit 0
  12. ;;
  13. esac
  14. . /usr/share/initramfs-tools/hook-functions
  15. THEME="$(/usr/sbin/plymouth-set-default-theme || true)"
  16. THEMES="/usr/share/plymouth/themes"
  17. if [ -n "${THEME}" ]
  18. then
  19. THEME="${THEMES}/${THEME}/${THEME}.plymouth"
  20. else
  21. exit 0
  22. fi
  23. PLUGIN_PATH="$(plymouth --get-splash-plugin-path)"
  24. case "$(basename ${THEME} .plymouth)" in
  25. text)
  26. PLUGINS="details.so text.so"
  27. ;;
  28. *)
  29. PLUGINS="details.so text.so label.so"
  30. ;;
  31. esac
  32. MODULE="${PLUGIN_PATH}/$(sed -n 's/^ModuleName=\(.*\)/\1/p' ${THEME}).so"
  33. # copy plugin and images for current theme
  34. copy_exec "${MODULE}"
  35. mkdir -p "${DESTDIR}/${THEMES}"
  36. IMAGES="$(sed -n 's/^ImageDir=\(.*\)/\1/p' ${THEME})"
  37. # No images in text mode:
  38. if [ -n "${IMAGES}" ]
  39. then
  40. cp -r "${IMAGES}" "${DESTDIR}/${THEMES}"
  41. fi
  42. # copy binaries and base plugins
  43. copy_exec /bin/plymouth
  44. copy_exec /sbin/plymouthd
  45. for PLUGIN in ${PLUGINS}
  46. do
  47. copy_exec ${PLUGIN_PATH}/${PLUGIN}
  48. done
  49. # copy base themes and logo
  50. cp -a "${THEMES}/details" "${DESTDIR}/${THEMES}"
  51. cp -a "${THEMES}/text" "${DESTDIR}/${THEMES}"
  52. cp /etc/debian_version "${DESTDIR}/etc"
  53. case "$(basename ${THEME} .plymouth)" in
  54. text)
  55. ;;
  56. *)
  57. cp /usr/share/plymouth/debian-logo.png "${DESTDIR}/usr/share/plymouth"
  58. # copy files for font rendering
  59. mkdir -p "${DESTDIR}/usr/share/fonts/truetype/ttf-dejavu"
  60. mkdir -p "${DESTDIR}/usr/lib/pango/1.6.0/modules"
  61. mkdir -p "${DESTDIR}/etc/fonts/conf.d"
  62. mkdir -p "${DESTDIR}/var/cache/fontconfig"
  63. cp -a /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf "${DESTDIR}/usr/share/fonts/truetype/ttf-dejavu"
  64. cp -a /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf "${DESTDIR}/usr/share/fonts/truetype/ttf-dejavu"
  65. cp -a /etc/fonts/fonts.conf "${DESTDIR}/etc/fonts"
  66. cp -rL /etc/fonts/conf.d/60-latin.conf "${DESTDIR}/etc/fonts/conf.d"
  67. copy_exec /usr/lib/pango/1.6.0/modules/pango-basic-fc.so
  68. copy_exec /usr/lib/pango/1.6.0/module-files.d/libpango1.0-0.modules
  69. copy_exec /usr/lib/libpango-1.0.so.0
  70. copy_exec /usr/lib/libpangoft2-1.0.so.0
  71. copy_exec /usr/lib/libpangocairo-1.0.so.0
  72. # copy renderers
  73. copy_exec /usr/lib/plymouth/renderers/frame-buffer.so
  74. copy_exec /usr/lib/plymouth/renderers/drm.so
  75. # add drm/fb modules
  76. manual_add_modules intel-agp
  77. manual_add_modules ati-agp
  78. manual_add_modules i915
  79. manual_add_modules radeon
  80. ;;
  81. esac
  82. # copy config files
  83. mkdir -p "${DESTDIR}/etc/plymouth"
  84. if [ -r /etc/plymouth/plymouthd.conf ]
  85. then
  86. cp -a /etc/plymouth/plymouthd.conf "${DESTDIR}/etc/plymouth/"
  87. fi
  88. cp -a /usr/share/plymouth/plymouthd.defaults "${DESTDIR}/usr/share/plymouth/"