# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/media-gfx/gfxboot/gfxboot.ebuild,v 1.1 # 2007/29/03 16:55:00 Rion Exp $ IUSE="themes doc" inherit rpm distutils versionator MY_PV=$(replace_version_separator 3 '-') VC=$(get_version_components) MY_S="${WORKDIR}/${PN}-" for i in ${VC}; do MY_S="${MY_S}${i}."; done MY_S=${MY_S%.} MY_S=${MY_S%.*} DESCRIPTION="gfxboot allows you to create gfx menus for bootmanagers." HOMEPAGE="http://suse.com" SRC_URI="http://download.opensuse.org/distribution/SL-OSS-factory/inst-source/suse/src/gfxboot-${MY_PV}.src.rpm" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~amd64" THEMES="SuSE NLD SLES Zen" DEPEND="dev-lang/nasm >=media-libs/freetype-2 themes? ( dev-libs/fribidi ) doc? ( app-text/xmlto )" src_unpack () { rpm_src_unpack ${A} einfo ${MY_S} einfo ${S} mv ${MY_S} ${S} cd "${WORKDIR}" mv themes "${S}/" cd "${S}" epatch "${FILESDIR}"/bininstall.patch } src_compile() { cd "${S}" emake X11LIBS=/usr/X11R6/lib/ || die "Make failed!" if use themes; then for th in ${THEMES}; do emake prep -C themes/${th}/ || die "Preparing of ${th} theme failed!" done; emake themes || die "Make themes failed!" fi; if use doc; then emake doc || die "Make doc failed!" fi; } src_install() { make DESTDIR="${D}" install || die "Install failed" if use doc; then mkdir -p ${D}/usr/share/doc/gfxboot cp -a doc/gfxboot.txt ${D}/usr/share/doc/gfxboot/ cp -a doc/gfxboot.html ${D}/usr/share/doc/gfxboot/ fi; if use themes; then #mv ${D}themes ${D}usr/share/gfxboot for th in ${THEMES}; do cd ${D}usr/share/gfxboot/themes/${th} find . -type l -exec rm '{}' \; -exec ln -sf /usr/share/gfxboot/themes/SuSE/'{}' '{}' \; done; else rm -rf ${D}usr/share/gfxboot/themes fi; } pkg_postinst() { einfo "read manual on how to build theme" einfo "if you build gfxboot with doc use flag, manual must be in /usr/share/doc/gfxboot" }