# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="An interface for filesystems implemented in userspace." HOMEPAGE="http://sourceforge.net/projects/avf" SRC_URI="mirror://sourceforge/avf/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="x86" IUSE="doc suid-fum" DEPEND="virtual/kernel" inherit eutils src_compile() { econf --disable-example || die cd ${S}/kernel epatch ${FILESDIR}/${P}.patch || die cd ${S} if ( use x86 && [ ! -e /usr/src/linux/arch/x86 ] ); then #the following is necessary because portage's $ARCH interferes with the kernel's $ARCH ARCH_BKUP=${ARCH} unset ARCH emake || die ARCH=${ARCH_BKUP} else emake || die fi } src_install() { if ( use x86 && [ ! -e /usr/src/linux/arch/x86 ] ); then unset ARCH make install DESTDIR=${D} || die ARCH=${ARCH_BKUP} unset ARCH_BKUP else make install DESTDIR=${D} || die fi dodoc AUTHORS BUGS ChangeLog Filesystems README README-2.4 README-2.6 README.NFS \ NEWS TODO docinto example dodoc example/* } pkg_postinst() { if ! use suid-fum; then chmod -s /usr/bin/fusermount einfo "/usr/bin/fusermount is not suid root because that is a security risk (see the README)" einfo "If you want normal users to be able to use it, you must set it suid root yourself." else einfo "/usr/bin/fusermount is suid root. Read the README; this is a security risk." fi /usr/sbin/update-modules } pkg_postrm() { /sbin/modprobe -r fuse }