# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit kernel-mod 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="fusesuid" DEPEND="virtual/kernel" pkg_setup() { kernel-mod_check_modules_supported } src_compile() { econf --disable-example --with-kernel="${ROOT}/usr/src/linux" || die "econf failed" # http://marc.theaimsgroup.com/?l=gentoo-dev&m=109672618708314&w=2 kernel-mod_getversion if [ ${KV_MINOR} -gt 5 ] && [ ${KV_PATCH} -gt 5 ] then sed -i 's:SUBDIRS=:M=:g' kernel/Makefile fi unset ARCH emake || die "emake failed" } 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 fusesuid; 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 chmod +s /usr/bin/fusermount einfo einfo "/usr/bin/fusermount is suid root. Read the README; this is a security risk." einfo fi einfo "Checking kernel module dependencies" test -r "${ROOT}/usr/src/linux/System.map" && \ depmod -ae -F "${ROOT}/usr/src/linux/System.map" -b "${ROOT}" -r ${KV} }