# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-fs/shfs/shfs-0.35-r3.ebuild,v 1.8 2007/01/04 05:14:18 compnerd Exp $ inherit linux-mod eutils DESCRIPTION="Secure Shell File System" HOMEPAGE="http://shfs.sourceforge.net/" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="alpha amd64 ia64 ppc sparc x86" IUSE="X amd doc" RDEPEND="virtual/modutils net-misc/openssh amd? ( net-fs/am-utils )" DEPEND=". Submitted by Torsten Krah (bug #127092). if kernel_is ge 2 6 16 ; then epatch ${FILESDIR}/${PN}-0.35-2.6.16-dentry.patch fi } src_compile() { linux-mod_src_compile cd ${S}/shfsmount emake || die "failed to build userland utilities" } src_install() { # Install kernel module linux-mod_src_install # Install userland utilities cd ${S}/shfsmount dobin shfsmount dobin shfsumount if use amd ; then insinto /etc/amd doins ${FILESDIR}/amd.conf doins ${FILESDIR}/amd.shfs exeinto /etc/amd doexe ${FILESDIR}/shfs.mount dosym /etc/amd/shfs.mount /etc/amd/shfs.unmount fi # Setup permissions einfo "Setting SUID bit on /usr/bin executables..." fperms 4511 /usr/bin/shfsmount fperms 4511 /usr/bin/shfsumount # Create symlinks to support mount(8) einfo "Adding /sbin/mount.shfs symlink..." dodir /sbin dosym /usr/bin/shfsmount /sbin/mount.shfs # Install docs doman ${S}/docs/manpages/shfsmount.8 ${S}/docs/manpages/shfsumount.8 use doc && dohtml -r ${S}/docs/html } pkg_postinst() { linux-mod_pkg_postinst echo einfo "Use either 'shfsmount' or 'mount -t shfs' to mount remote" einfo "filesystems into your local filesystem." echo einfo "Note the following:" einfo einfo " 1. The shfs kernel module has to be loaded first before you can" einfo " start mounting filesystems." einfo " Try: 'modprobe shfs' as root." einfo einfo " 2. When mouting, you must enter the absolute path of the remote" einfo " filesystem without any special characters such as tilde (~)," einfo " for example as they will not be evaluated." echo }