From 7224c1253228e5c29c78cb3f0f26ce34770f2356 Mon Sep 17 00:00:00 2001 From: BlackNoxis Date: Sat, 15 Feb 2014 23:24:26 +0200 Subject: Added ebuilds for kogaion desktop --- eclass/rogentos-artwork.eclass | 62 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 eclass/rogentos-artwork.eclass (limited to 'eclass/rogentos-artwork.eclass') diff --git a/eclass/rogentos-artwork.eclass b/eclass/rogentos-artwork.eclass new file mode 100644 index 00000000..3f51fef9 --- /dev/null +++ b/eclass/rogentos-artwork.eclass @@ -0,0 +1,62 @@ +# Copyright 2004-2009 Sabayon Project +# Copyright 2012 Rogentos +# Distributed under the terms of the GNU General Public License v2 +# Original Authors: Sabayon Team +# Maintainer BlackNoxis +# $ + +inherit eutils + +# @ECLASS-VARIABLE: KERN_INITRAMFS_SEARCH_NAME +# @DESCRIPTION: +# Argument used by `find` to search inside ${ROOT}boot Linux +# Kernel initramfs files to patch +KERN_INITRAMFS_SEARCH_NAME="${KERN_INITRAMFS_SEARCH_NAME:-initramfs-genkernel*}" + +# @ECLASS-VARIABLE: GFX_SPLASH_NAME +# @DESCRIPTION: +# Default splash theme name to use +GFX_SPLASH_NAME="${GFX_SPLASH_NAME:-rogentos}" + +# @FUNCTION: update_kernel_initramfs_splash +# @USAGE: update_kernel_initramfs_splash [splash_theme] [splash_file] +# @RETURN: 1, if something went wrong +# +# @MAINTAINER: +# Brindusa Stefan Cristian +# @AUTHOR: +# Fabio Erculiani +update_kernel_initramfs_splash() { + + [[ -z "${2}" ]] && die "wrong update_kernel_splash arguments" + + if ! has_version "media-gfx/splashutils"; then + ewarn "media-gfx/splashutils not found, cannot update kernel splash" + return 1 + fi + splash_geninitramfs -a "${2}" ${1} + return ${?} + +} + +# @FUNCTION: update_sabayon_kernel_initramfs_splash +# @USAGE: update_sabayon_kernel_initramfs_splash +# +# @AUTHOR: +# Fabio Erculiani +# @MAINTAINER: +# Brindusa Stefan Cristian +update_sabayon_kernel_initramfs_splash() { + local splash_name="${GFX_SPLASH_NAME}" + local override_splash_file="${ROOT}etc/${splash_name}" + if [ -f "${override_splash_file}" ]; then + found_splash_name=$(cat "${override_splash_file}" | cut -d" " -f 1) + if [ -d "/etc/splash/${found_splash_name}" ]; then + splash_name="${found_splash_name}" + fi + fi + for bootfile in `find ${ROOT}boot -name "${KERN_INITRAMFS_SEARCH_NAME}"`; do + einfo "Updating boot splash for ${bootfile}" + update_kernel_initramfs_splash "${GFX_SPLASH_NAME}" "${bootfile}" + done +} -- cgit v1.2.3