90 lines
2.1 KiB
Bash
90 lines
2.1 KiB
Bash
|
# Copyright 1999-2009 Gentoo Foundation
|
||
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
# $Header: /var/cvsroot/gentoo-x86/sys-fs/fuse/fuse-2.7.4.ebuild,v 1.7 2009/05/18 14:08:43 jer Exp $
|
||
|
|
||
|
EAPI="2"
|
||
|
#WANT_AUTOCONF="2.5"
|
||
|
WANT_AUTOMAKE="1.11"
|
||
|
|
||
|
inherit linux-mod eutils autotools
|
||
|
|
||
|
MY_P=${P/_/-}
|
||
|
DESCRIPTION="The Solaris Porting Layer"
|
||
|
HOMEPAGE="http://wiki.github.com/behlendorf/spl/"
|
||
|
SRC_URI="http://github.com/downloads/behlendorf/spl/${MY_P}.tar.gz"
|
||
|
LICENSE="GPL-2"
|
||
|
KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd"
|
||
|
IUSE="kernel_linux"
|
||
|
S=${WORKDIR}/${MY_P}
|
||
|
|
||
|
pkg_setup() {
|
||
|
MODULE_NAMES="spl(fs/spl:${S}/module:${S}/module/spl) \
|
||
|
splat(fs/spl:${S}/module:${S}/module/splat)"
|
||
|
linux-mod_pkg_setup
|
||
|
# BUILD_PARAMS="majver=${KV_MAJOR}.${KV_MINOR} \
|
||
|
# fusemoduledir=\"${ROOT}\"/lib/modules/${KV_FULL/\ }/fs"
|
||
|
BUILD_TARGETS="all"
|
||
|
# ECONF_PARAMS="--with-kernel=${KV_DIR} --with-kernel-build=${KV_OUT_DIR}"
|
||
|
}
|
||
|
|
||
|
src_prepare() {
|
||
|
epatch "${FILESDIR}"/spl-0.4.9-kernel-2-6-33-1.patch
|
||
|
#AT_M4DIR="config" eautoreconf
|
||
|
sh autogen.sh
|
||
|
}
|
||
|
|
||
|
src_configure() {
|
||
|
econf \
|
||
|
--with-linux=${KERNEL_DIR} \
|
||
|
|| die "econf failed for fuse userland"
|
||
|
# cp module/Makefile module/Makefile.kl
|
||
|
# econf \
|
||
|
# --with-config=user \
|
||
|
# || die "econf failed for fuse userland"
|
||
|
}
|
||
|
|
||
|
src_compile() {
|
||
|
convert_to_m module/Makefile
|
||
|
# cp module/Makefile.kl module/Makefile
|
||
|
linux-mod_src_compile
|
||
|
emake || die "emake failed"
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
emake DESTDIR="${D}" install || die "emake install failed"
|
||
|
|
||
|
dodoc AUTHORS ChangeLog Filesystems README \
|
||
|
README.NFS NEWS doc/how-fuse-works \
|
||
|
doc/kernel.txt FAQ
|
||
|
docinto example
|
||
|
dodoc example/*
|
||
|
|
||
|
if use kernel_linux ; then
|
||
|
linux-mod_src_install
|
||
|
newinitd ${FILESDIR}/fuse.init fuse
|
||
|
else
|
||
|
insinto /usr/include/fuse
|
||
|
doins include/fuse_kernel.h
|
||
|
newinitd ${FILESDIR}/fuse-fbsd.init fuse
|
||
|
fi
|
||
|
|
||
|
rm -rf "${D}/dev"
|
||
|
|
||
|
dodir /etc
|
||
|
cat > ${D}/etc/fuse.conf <<EOF
|
||
|
# Set the maximum number of FUSE mounts allowed to non-root users.
|
||
|
# The default is 1000.
|
||
|
#
|
||
|
#mount_max = 1000
|
||
|
|
||
|
# Allow non-root users to specify the 'allow_other' or 'allow_root'
|
||
|
# mount options.
|
||
|
#
|
||
|
#user_allow_other
|
||
|
EOF
|
||
|
}
|
||
|
|
||
|
pkg_postinst() {
|
||
|
use kernel_linux && linux-mod_pkg_postinst
|
||
|
}
|