# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="User-mode filesystem implementation" HOMEPAGE="http://lufs.sourceforge.net/lufs/" SRC_URI="mirror://sourceforge/lufs/${P}.tar.gz http://sites.inka.de/~W1752/vlfs/vlfs-0.3.diff http://dev.gentoo.org/~genstef/files/dist/lufs-automake.diff.bz2 http://dev.gentoo.org/~genstef/files/dist/captive.diff.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="debug gnome" DEPEND="sys-fs/lufis gnome? ( gnome-base/gnome-vfs )" src_unpack() { unpack ${P}.tar.gz lufs-automake.diff.bz2 captive.diff.bz2 cd ${S} # Fix GCC 3.3.2 build failure (see also # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13192) epatch ${FILESDIR}/gentoo-gcc332fix-${PV}.patch epatch ${FILESDIR}/${P}-fPIC.patch epatch ${FILESDIR}/lufs-automount-port.diff epatch ${FILESDIR}/${P}-enable-gnome-2.patch epatch ${DISTDIR}/vlfs-0.3.diff epatch ../captive.diff epatch ../lufs-automake.diff filesystems="ftpfs gnetfs localfs locasefs sshfs vlfs" use gnome && filesystems="${filesystems} gvfs" } src_compile() { einfo "Compiling for ${filesystems}" unset ARCH econf --enable-autofs-install \ --with-kernel=${KV} \ --with-kheaders=${ROOT}/usr/include \ $(use_enable debug) || die cd filesystems for i in ${filesystems} do cd ${i} emake || die "emake failed" cd .. done cd .. cd util; emake auto.sshfs auto.ftpfs || die "emake failed"; cd .. } src_install() { cd filesystems for i in ${filesystems} do cd ${i} make DESTDIR=${D} install || die "make install failed" cd .. done cd .. cd util; dobin auto.sshfs auto.ftpfs; cd .. dodir /etc/autofs dosym /usr/bin/auto.sshfs /etc/autofs/auto.sshfs dosym /usr/bin/auto.ftpfs /etc/autofs/auto.ftpfs } pkg_postinst() { ewarn "Lufs Kernel support and lufsd,lufsmnt have been disabled in favour" ewarn "of lufis, please use lufis to mount lufs-filesystems, eg:" echo "# lufis fs=sshfs,host=dev.gentoo.org,username=genstef /mnt/lufis/ -s" ewarn "If something does not work for you with this setup please" ewarn "complain to bugs.gentoo.org" }