# $Header: /magellan-cvs/smage/splashutils/splashutils-1.1.9.7-r1.smage2,v 1.3 2008/02/07 14:23:54 niro Exp $ PNAME="splashutils" PVER="1.1.9.7" PBUILD="r1" PCATEGORIE="media-gfx" STATE="testing" DESCRIPTION="Splashutils from gentoo" HOMEPAGE="http://dev.gentoo.org/~spock/projects/gensplash/" DEPEND=">= media-libs/freetype-2 >= media-libs/libpng-1.2.8 >= media-libs/libjpeg-6b >= sys-libs/zlib-1.1.4 >= app-arch/cpio-2.5 >= sys-apps/initscripts-0.3.2 >= sys-apps/debianutils-2" SDEPEND=">= virtual/kernel-sources" # splashutils SRCFILE="${PNAME}-lite-${PVER}.tar.bz2" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" # miscsplashutils (fbtruetype) MISC_VER=0.1.3 SRCFILE_MISC="misc${PNAME}-${MISC_VER}.tar.bz2" SRCDIR_MISC="${BUILDDIR}/misc${PNAME}-${MISC_VER}" # initutils version IUVER=0.2 SRCFILE_UI="${PNAME}-magellan-${IUVER}.tar.gz" SRCDIR_UI="${BUILDDIR}/${PNAME}-magellan" # used klibc KLIBC_VER="1.0.8" KLIBC_SRCFILE="klibc-${KLIBC_VER}.tar.bz2" # used libjpeg LIBJPEG_VER="6b" LIBJPEG_SRCFILE="jpegsrc.v${LIBJPEG_VER}.tar.gz" # used libpng LIBPNG_VER="1.2.8" LIBPNG_SRCFILE="libpng-${LIBPNG_VER}.tar.bz2" # used zlib ZLIB_VER="1.2.1" ZLIB_SRCFILE="zlib-${ZLIB_VER}.tar.bz2" # used freetype FREETYPE_VER="2.1.9" FREETYPE_SRCFILE="freetype-${FREETYPE_VER}.tar.bz2" SRC_URI=( mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/${SRCFILE_MISC} mirror://${PNAME}/${SRCFILE_UI} mirror://${PNAME}/Theme-Linux-fbsplash.tar.bz2 mirror://${PNAME}/Theme-magellan-040-fbsplash.tar.bz2 mirror://klibc/${KLIBC_SRCFILE} mirror://libjpeg/${LIBJPEG_SRCFILE} mirror://libpng/${LIBPNG_SRCFILE} mirror://zlib/${ZLIB_SRCFILE} mirror://freetype/${FREETYPE_SRCFILE} ) # blocks: bootsplash # global var: ${LINUX_SOURCES} # location where they are [ -z "${LINUX_SOURCES}" ] && LINUX_SOURCES="/usr/src/linux" src_prepare() { munpack ${SRCFILE} || die munpack ${SRCFILE_MISC} || die munpack ${SRCFILE_UI} || die munpack ${KLIBC_SRCFILE} ${SRCDIR}/libs || die munpack ${LIBJPEG_SRCFILE} ${SRCDIR}/libs || die munpack ${LIBPNG_SRCFILE} ${SRCDIR}/libs || die munpack ${ZLIB_SRCFILE} ${SRCDIR}/libs || die munpack ${FREETYPE_SRCFILE} ${SRCDIR}/libs || die cd ${SRCDIR} if [ ! -e /usr/src/linux/include/linux/console_splash.h ] then echo "Failure:" echo "fbsplash was not found in your kernel." echo "Please give a location to your patched kernel:" echo " LINUX_SOURCES=/usr/src/linux-fbsplash smage2 smage-file" echo die "aborted." fi # where are our linux sources ? echo "Using '${LINUX_SOURCES}' as kernel-tree ..." ln -s "${LINUX_SOURCES}" linux || die # link klibc ln -s ../../linux ${SRCDIR}/libs/klibc-${KLIBC_VER}/linux || die # let the makefile to be rebuilt to prevent segfault in the splash_helper rm ${SRCDIR}/libs/zlib-${ZLIB_VER}/Makefile || die install -d ${SRCDIR}/kernel || die # use tty16 as the default silent tty sed -i -e 's/#define TTY_SILENT.*/#define TTY_SILENT 16/' ${SRCDIR}/splash.h || die # setup the kernel object directory echo "KRNLOBJ = ${LINUX_SOURCES}" >> ${SRCDIR}/libs/klibc-${KLIBC_VER}/MCONFIG || die # force use of our cflags sed -i -e "s/^CFLAGS[ \t]*=.*/CFLAGS = ${CFLAGS}/" Makefile || die } src_compile() { # splashutils cd ${SRCDIR} mmake -j1 MISCINCS="-I${LINUX_SOURCES}/include" || die # does not like more than one job # miscsplashutils (fbtruetype) cd ${SRCDIR_MISC} mmake || die } src_install() { cd ${SRCDIR} # needed directories install -d ${BINDIR}/etc/{conf.d,env.d,rc.d/init.d,splash} || die install -d ${BINDIR}/lib/splash/{tmp,cache,bin} || die install -d ${BINDIR}/usr/share/${PNAME} || die # splashutils cd ${SRCDIR} make DESTDIR=${BINDIR} install || die # miscsplashutils (fbtruetype) cd ${SRCDIR_MISC} make DESTDIR=${BINDIR} install || die touch ${BINDIR}/lib/splash/{tmp,cache,bin}/.keep || die ln -snf /lib/splash/bin/fbres ${BINDIR}/sbin/fbres || die # environment; don't want /etc/splash protected echo 'CONFIG_PROTECT_MASK="/etc/splash"' > ${BINDIR}/etc/env.d/99splash || die # installing our modified splash init utils # splash wrapper install -m 0755 -o root -g root ${SRCDIR_UI}/splash \ ${BINDIR}/sbin/splash || die # splash init functions install -m 0644 ${SRCDIR_UI}/splash-functions \ ${BINDIR}/etc/rc.d/init.d/splash-functions || die # conf files install -m0644 ${SRCDIR_UI}/splash.conf \ ${BINDIR}/etc/conf.d/splash || die # init scripts install -m0755 -o root -g root ${SRCDIR_UI}/init-splash \ ${BINDIR}/etc/rc.d/init.d/splash || die # default initrd #install -m 0644 ${SRCDIR_UI}/initrd.splash ${BINDIR}/usr/share/${PNAME} || die # default font install -m 0644 ${SRCDIR_MISC}/fbtruetype/luxisri.ttf ${BINDIR}/etc/splash || die # installing some default themes tar xvjf ${SOURCEDIR}/${PNAME}/Theme-Linux-fbsplash.tar.bz2 \ -C ${BINDIR}/etc/splash || die tar xvjf ${SOURCEDIR}/${PNAME}/Theme-magellan-040-fbsplash.tar.bz2 \ -C ${BINDIR}/etc/splash || die ln -snf ./magellan-040 ${BINDIR}/etc/splash/default || die # docs cd ${SRCDIR} minstalldocs AUTHORS COPYING README || die minstalldocs docs/* || die } postinstall() { echo echo "Checking whether /dev/tty1 is in place" local my_tmp="$(mktemp -d)" mount --bind ${MROOT}/ ${my_tmp} if [[ ! -c ${mytmp}/dev/tty1 ]] then echo "It appears that the /dev/tty1 character device doesn't exist" echo "the root filesystem. This will prevent the silent mode from working" echo "properly. I will create a new one for you now." echo mknod ${mytmp}/dev/tty1 c 4 1 fi umount ${my_tmp} echo echo "To use the fbsplash feature you must do following steps:" echo echo " 1. mount /boot" echo " 2. create a initramfs image with your favorite splash:" echo -e " splash_geninitramfs -v -g /boot/1024-default \\" echo " -r 1024x768 default" echo " 3. add /etc/init.d/splash to your runlevels:" echo " rc-config add splash" echo " 4. edit your grub.conf:" echo " nano -w /boot/grub/grub.conf" echo echo " and modify it like this:" echo " title Magellan Linux with splash" echo " root (hd0,0)" echo -e " kernel (hd0,0)/bzImage root=/dev/hda3 \\" echo -e " video=vesafb:ywrap,pmipal,1024x768-32@60 \\" echo -e " splash=silent,fadein,theme:default \\" echo -e " quiet CONSOLE=/dev/tty1" echo " initrd /boot/1024-default" echo echo " save and exit, reboot ... that's it." echo }