# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 IUSE="" S="${WORKDIR}/${P}" DESCRIPTION="A Virtual File System" HOMEPAGE="http://http://www.inf.bme.hu/~mszeredi/avfs/" SRC_URI="mirror://sourceforge/avf/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="ssl" DEPEND="ssl? ( dev-libs/openssl )" src_compile() { check_KV myconf="" use ssl && myconf="${myconf} --with-ssl" econf \ --disable-dav \ --disable-preload \ --with-kernel="${ROOT}usr/src/linux" \ ${myconf} || die "Configuration failed" cp ${FILESDIR}/avfscoda.gentoo ${S}/scripts/init mv ${S}/scripts/Makefile ${S}/scripts/Makefile.old sed {s/rc.d/init.d/} ${S}/scripts/Makefile.old > ${S}/scripts/Makefile.new sed {s/generic/gentoo/} ${S}/scripts/Makefile.new > ${S}/scripts/Makefile mv ${S}/avfscoda/redir/Makefile ${S}/avfscoda/redir/Makefile.old sed -e /depmod/d ${S}/avfscoda/redir/Makefile.old > ${S}/avfscoda/redir/Makefile make all || die "Make failed" } src_install() { dodir /overlay make install_root=${D} DESTDIR=${D} install || die insinto /etc doins scripts/avfscoda.sh dodoc README FORMAT INSTALL.avfscoda COPYING NEWS TODO } pkg_postinst() { if [ "${ROOT}" = / ] then [ -x /usr/sbin/update-modules ] && /usr/sbin/update-modules fi einfo einfo "Make sure you have coda file system support compiled into the" einfo "kernel. You'll want to add 'avfscoda' to your default runlevel" einfo "and add the following lines to your /etc/profile:" einfo " if [ -f /etc/avfscoda.sh ]; then" einfo " source /etc/avfscoda.sh" einfo " fi" einfo einfo "To have AVFS turned on automatically when you login, touch ~/.avfs" einfo }