# 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 kernel-mod set_arch_to_kernel() { export KERNEL_ECLASS_PORTAGE_ARCH="${ARCH}" case ${ARCH} in x86) export ARCH="i386";; amd64) export ARCH="x86_64";; hppa) export ARCH="parisc";; mips) export ARCH="mips";; *) export ARCH="${ARCH}";; esac } set_arch_to_portage() { export ARCH="${KERNEL_ECLASS_PORTAGE_ARCH}" } src_compile() { econf --disable-example || die set_arch_to_kernel emake || die set_arch_to_portage } src_install() { if kernel-mod_is_2_6_kernel then KV_OBJ="ko" else KV_OBJ="o" fi dodoc AUTHORS BUGS ChangeLog Filesystems README README-2.4 README-2.6 README.NFS \ NEWS TODO docinto example dodoc example/* dolib.a lib/libfuse.a insinto /usr/include doins include/fuse.h dobin util/fusermount util/mount.fuse insinto /lib/modules/${KV}/extra doins kernel/fuse.${KV_OBJ} } pkg_postinst() { if ! use suid-fum; then chmod -s /usr/bin/fusermount einfo 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." einfo else einfo einfo "/usr/bin/fusermount is suid root. Read the README; this is a security risk." einfo fi /usr/sbin/update-modules }