# Copyright 1999-2001 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # Author Tod Neidt # /home/cvsroot/gentoo-x86/skel.build,v 1.7 2001/08/25 21:15:08 chadh Exp S=${WORKDIR}/${P} DESCRIPTION="The notorious fortune program." SRC_URI="http://www.ibiblio.org/pub/Linux/games/amusements/fortune/${P}.tar.gz" #For lack of a better one. HOMEPAGE="http://www.ibiblio.org/pub/Linux/games/amusements/fortune/fortune-mod-9708.README" DEPEND="virtual/glibc" src_compile() { local offensive #Turn offensive fortunes off by default, set equal to "1" #if you want to be offended. offensive=0 cp Makefile Makefile.orig #Note the mixture of single and double quotes below is by design #Set install locations in System location for the compile. sed \ -e "s:\(FORTDIR=/usr/\).*:\1bin:" \ -e "s:\(COOKIEDIR=/usr/\)local/\(share\).*:\1\2/fortune:" \ -e "s:\(BINDIR=/usr/\)local/\(bin\).*:\1\2:" \ -e "s:\(BINMANDIR=/usr/\)local/\(man/man1\).*:\1share/\2:" \ -e "s:\(FORTMANDIR=/usr/\)local/\(man/man6\).*:\1share/\2:" \ -e "s:\(OFFENSIVE=\)1.*:\1$offensive:" \ -e 's:\(CFLAGS=\)-O2 \($(DEFINES)\).*:'"\1${CFLAGS} \2:" \ Makefile.orig > Makefile emake || die } src_install () { #Install into portage image directory ${D}. sed \ -e "s:\(FORTDIR=\)\(/usr/\).*:\1${D}\2bin:" \ -e "s:\(COOKIEDIR=\)\(/usr/\)local/\(share\).*:\1${D}\2\3/fortune:" \ -e "s:\(BINDIR=\)\(/usr/\)local/\(bin\).*:\1${D}\2\3:" \ -e "s:\(BINMANDIR=\)\(/usr/\)local/\(man/man1\).*:\1${D}\2share/\3:" \ -e "s:\(FORTMANDIR=\)\(/usr/\)local/\(man/man6\).*:\1${D}\2share/\3:" \ -e "s:\(OFFENSIVE=\)1.*:\1$offensive:" \ Makefile.orig > Makefile make install || die dodoc ChangeLog INDEX INSTALL Notes README TODO }