From 05d506a28b60356a7bde8e4e28f883b7ad594192 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 30 Nov 2009 07:35:37 +0100 Subject: [PATCH] Added fuse-2.8.1 build template. --HG-- extra : convert_revision : 40572a03b6891841f12b408c746ef00df86ce370 --- srcpkgs/fuse-devel | 1 + srcpkgs/fuse/files/fuse.rc | 30 ++++++++++++++++++++++++++++++ srcpkgs/fuse/fuse-devel.template | 17 +++++++++++++++++ srcpkgs/fuse/template | 31 +++++++++++++++++++++++++++++++ 4 files changed, 79 insertions(+) create mode 120000 srcpkgs/fuse-devel create mode 100644 srcpkgs/fuse/files/fuse.rc create mode 100644 srcpkgs/fuse/fuse-devel.template create mode 100644 srcpkgs/fuse/template diff --git a/srcpkgs/fuse-devel b/srcpkgs/fuse-devel new file mode 120000 index 0000000000..b0717664a1 --- /dev/null +++ b/srcpkgs/fuse-devel @@ -0,0 +1 @@ +fuse \ No newline at end of file diff --git a/srcpkgs/fuse/files/fuse.rc b/srcpkgs/fuse/files/fuse.rc new file mode 100644 index 0000000000..f524fc69e1 --- /dev/null +++ b/srcpkgs/fuse/files/fuse.rc @@ -0,0 +1,30 @@ +#!/sbin/runscript + +FUSECTL_SYSFS=/sys/fs/fuse/connections + +depend() +{ + need localmount +} + +start() +{ + ebegin "Starting fuse" + if ! grep -qw fuse /proc/filesystems; then + modprobe fuse >/dev/null 2>&1 || eend $? + fi + if grep -qw fusectl /proc/filesystems && \ + ! grep -qw $FUSECTL_SYSFS /proc/mounts; then + mount -t fusectl none $FUSECTL_SYSFS >/dev/null 2>&1 || eend $? + fi + eend +} + +stop() +{ + ebegin "Stopping fuse" + if grep -qw $FUSECTL_SYSFS /proc/mounts; then + umount $FUSECTL_SYSFS >/dev/null 2>&1 || eend $? + fi + eend +} diff --git a/srcpkgs/fuse/fuse-devel.template b/srcpkgs/fuse/fuse-devel.template new file mode 100644 index 0000000000..88e75a5e4e --- /dev/null +++ b/srcpkgs/fuse/fuse-devel.template @@ -0,0 +1,17 @@ +# Template file for 'fuse-devel'. +# +short_desc="${short_desc} (development files)" +long_desc="${long_desc} + + This package contains files for development, headers, static libs, etc." + +Add_dependency run fuse + +do_install() +{ + mkdir -p ${DESTDIR}/usr/lib + mv ${SRCPKGDESTDIR}/usr/include ${DESTDIR}/usr + mv ${SRCPKGDESTDIR}/usr/lib/*.so ${DESTDIR}/usr/lib + mv ${SRCPKGDESTDIR}/usr/lib/*.a ${DESTDIR}/usr/lib + mv ${SRCPKGDESTDIR}/usr/lib/pkgconfig ${DESTDIR}/usr/lib +} diff --git a/srcpkgs/fuse/template b/srcpkgs/fuse/template new file mode 100644 index 0000000000..8965262a29 --- /dev/null +++ b/srcpkgs/fuse/template @@ -0,0 +1,31 @@ +# Template file for 'fuse' +pkgname=fuse +version=2.8.1 +distfiles="${SOURCEFORGE_SITE}/$pkgname/$pkgname-$version.tar.gz" +build_style=gnu_configure +configure_args="--enable-lib --enable-util --bindir=/bin" +short_desc="Filesystem in Userspace" +maintainer="Juan RP " +checksum=007f1056ce329a7c9976ab7b68d3361991261e188f36364d0406f8ee457d2eaf +long_desc=" + With FUSE it is possible to implement a fully functional filesystem in + a userspace program. Features include: + + * Simple library API + * Simple installation (no need to patch or recompile the kernel) + * Secure implementation + * Userspace - kernel interface is very efficient + * Usable by non privileged users + * Runs on Linux kernels 2.4.X and 2.6.X + * Has proven very stable over time" + +subpackages="$pkgname-devel" +openrc_services="fuse default" +Add_dependency full glibc + +post_install() +{ + # Remove provided init script, we use our own. + rm -f ${DESTDIR}/etc/init.d/fuse + install -m755 ${FILESDIR}/fuse.rc ${DESTDIR}/etc/init.d/fuse +}