summaryrefslogtreecommitdiff
path: root/extra/fuse
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /extra/fuse
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'extra/fuse')
-rw-r--r--extra/fuse/PKGBUILD55
-rw-r--r--extra/fuse/fuse.conf9
-rw-r--r--extra/fuse/fuse.install14
-rwxr-xr-xextra/fuse/fuse.rc.d49
4 files changed, 127 insertions, 0 deletions
diff --git a/extra/fuse/PKGBUILD b/extra/fuse/PKGBUILD
new file mode 100644
index 000000000..f3863969e
--- /dev/null
+++ b/extra/fuse/PKGBUILD
@@ -0,0 +1,55 @@
+# $Id: PKGBUILD 94450 2010-10-07 10:30:45Z ronald $
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Contributor: Mark Rosenstand <mark@archlinux.org>
+
+pkgname=fuse
+pkgver=2.8.5
+pkgrel=1
+pkgdesc="A library that makes it possible to implement a filesystem in a userspace program."
+arch=('i686' 'x86_64')
+url="http://fuse.sourceforge.net/"
+license="GPL2"
+depends=('glibc')
+makedepends=('pkg-config')
+backup=(etc/fuse.conf)
+install=fuse.install
+source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
+ 'fuse.conf')
+options=(!libtool)
+sha1sums=('862320b56d6bc4ad5e7be2b1e0b5029166aae09b'
+ '3b42e37a741d4651099225987dc40e7f02a716ad')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ ./configure --prefix=/usr --enable-lib \
+ --enable-util --bindir=/bin
+ make || return 1
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ make DESTDIR=${pkgdir} install || return 1
+
+ # static device nodes will cause collision.
+ rm -rf ${pkgdir}/dev
+
+ # Remove init script in wrong path
+ # Don't add our own for now, as fusectl fs oopses on 2.6.18
+ rm -rf ${pkgdir}/etc/init.d
+ #install -D -m755 ${srcdir}/fuse.rc.d ${pkgdir}/etc/rc.d/fuse
+
+ install -d ${pkgdir}/lib
+ mv ${pkgdir}/usr/lib/libfuse.so.${pkgver} ${pkgdir}/lib/ || return 1
+ ln -s ../../lib/libfuse.so.${pkgver} ${pkgdir}/usr/lib/libfuse.so.${pkgver} || return 1
+ ln -s libfuse.so.${pkgver} ${pkgdir}/lib/libfuse.so.2 || return 1
+ mv ${pkgdir}/usr/lib/libulockmgr.so.1.0.1 ${pkgdir}/lib/ || return 1
+ ln -s ../../lib/libulockmgr.so.1.0.1 ${pkgdir}/usr/lib/libulockmgr.so.1.0.1 || return 1
+ ln -s libulockmgr.so.1.0.1 ${pkgdir}/lib/libulockmgr.so.1 || return 1
+
+ # install sample config file
+ install -Dm644 ${srcdir}/fuse.conf ${pkgdir}/etc/fuse.conf || return 1
+ # Fix udev rule location
+ install -d -m755 "${pkgdir}/lib"
+ mv "${pkgdir}/etc/udev" "${pkgdir}/lib/"
+}
diff --git a/extra/fuse/fuse.conf b/extra/fuse/fuse.conf
new file mode 100644
index 000000000..cb6c631e0
--- /dev/null
+++ b/extra/fuse/fuse.conf
@@ -0,0 +1,9 @@
+# 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
diff --git a/extra/fuse/fuse.install b/extra/fuse/fuse.install
new file mode 100644
index 000000000..595ac7c12
--- /dev/null
+++ b/extra/fuse/fuse.install
@@ -0,0 +1,14 @@
+post_install() {
+ cat << 'EOM'
+==> You must load the fuse kernel module to use FUSE.
+ -> Run 'modprobe fuse' to load the module now.
+ -> Add fuse to $MODULES in /etc/rc.conf to load on every boot.
+==> You will need a /dev/fuse device node to use FUSE.
+ -> If you use udev, nothing needs to be done
+ -> For a static /dev, run: mknod /dev/fuse -m 0666 c 10 229
+EOM
+}
+
+op=$1
+shift
+$op $*
diff --git a/extra/fuse/fuse.rc.d b/extra/fuse/fuse.rc.d
new file mode 100755
index 000000000..768da5b02
--- /dev/null
+++ b/extra/fuse/fuse.rc.d
@@ -0,0 +1,49 @@
+#!/bin/bash
+#
+# fuse Init script for Filesystem in Userspace
+# Based on the script by Miklos Szeredi <miklos@szeredi.hu>
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+FUSECTL=/sys/fs/fuse/connections
+
+case "$1" in
+ start)
+ stat_busy "Starting fuse"
+ if ! grep -qw fuse /proc/filesystems; then
+ modprobe fuse >/dev/null 2>&1
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ fi
+ fi
+ if grep -qw fusectl /proc/filesystems && ! grep -qw $FUSECTL /proc/mounts; then
+ mount -t fusectl none $FUSECTL >/dev/null 2>&1
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ fi
+ fi
+ add_daemon fuse
+ stat_done
+ ;;
+ stop)
+ stat_busy "Stopping fuse"
+ umount $FUSECTL >/dev/null 2>&1
+ rmmod fuse >/dev/null 2>&1
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon fuse
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0