summaryrefslogtreecommitdiffstats
path: root/fuse
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2006-08-25 21:10:29 +0000
committer Eric Hameleers <alien@slackware.com>2006-08-25 21:10:29 +0000
commit15e9a7f1b05fd698d3f1b68f0c4a727ec02a0c31 (patch)
tree9839219c5e95c716311769e3dd4096e28486c5be /fuse
parentc90144cb873fcfcef5b1fa0c829368e4ad42010b (diff)
downloadasb-15e9a7f1b05fd698d3f1b68f0c4a727ec02a0c31.tar.gz
asb-15e9a7f1b05fd698d3f1b68f0c4a727ec02a0c31.tar.xz
Initial revision
Diffstat (limited to 'fuse')
-rwxr-xr-xfuse/build/fuse.SlackBuild216
-rw-r--r--fuse/build/slack-desc19
2 files changed, 235 insertions, 0 deletions
diff --git a/fuse/build/fuse.SlackBuild b/fuse/build/fuse.SlackBuild
new file mode 100755
index 00000000..b7a251a9
--- /dev/null
+++ b/fuse/build/fuse.SlackBuild
@@ -0,0 +1,216 @@
+#!/bin/sh
+# $Id$
+# Copyright (c) 2006 Eric Hameleers <alien@sox.homeip.net>
+# Distributed under the terms of the GNU General Public License, Version 2
+# -----------------------------------------------------------------------------
+#
+# Slackware SlackBuild script
+# ===========================
+# By: Eric Hameleers <alien@sox.homeip.net>
+# For: fuse
+# URL: http://fuse.sourceforge.net/
+# Needs:
+# Changelog:
+# 2.2-1: 04/mar/2005 by Eric Hameleers <alien@sox.homeip.net>
+# * Initial build.
+# 2.2-2: 17/mar/2005 by Eric Hameleers <alien@sox.homeip.net>
+# * Separate kernel module into its own package.
+# 2.4.2-1: 19/dec/2005 by Eric Hameleers <alien@slackware.com>
+# * Update. Proper parametrisation of kernel version
+# and kernel sourcedirectory. Fixed 'bin' group ownership of
+# the binaries. try to run 'depmod -a' and add
+# '/sbin/modprobe fuse' to rc.modules.
+# 2.4.2-2: 23/dec/2005 by Eric Hameleers <alien@slackware.com>
+# * Fixed generation of the fuse-module-xxxxxx.txt file which is
+# basically the slack-desc- file. Also, added a "rm -rf $PKG2"
+# in the "--cleanup" section.
+#
+# Run 'sh SlackBuild --cleanup' to build a Slackware package.
+# The package (.tgz) plus descriptive .txt file are created in /tmp .
+# Install using 'installpkg'.
+#
+# -----------------------------------------------------------------------------
+
+# --- INIT ---
+# Set initial variables:
+CWD=`pwd`
+if [ "$TMP" = "" ]; then
+ TMP=/tmp
+fi
+
+PRGNAM=fuse
+PRGNAM2=fuse-module
+VERSION=2.4.2
+KVERSION=${KVERSION:-`/usr/bin/uname -r`}
+KSRC=${KSRC:-/lib/modules/$KVERSION/build}
+ARCH=${ARCH:-i486}
+BUILD=2
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2"
+fi
+
+PKG=$TMP/package-$PRGNAM
+PKG2=$TMP/package-$PRGNAM2
+
+if [ ! -d $TMP/tmp-$PRGNAM ]; then
+ mkdir -p $TMP/tmp-$PRGNAM # location to build the source
+fi
+
+
+# --- PACKAGE BUILDING ---
+
+echo "++"
+echo "|| $PRGNAM-$VERSION"
+echo "++"
+
+rm -rf $PKG/*
+mkdir -p $PKG # place for the package to be built
+
+rm -rf $PKG2/*
+mkdir -p $PKG2
+
+cd $PKG
+
+# Explode the package framework:
+if [ -f $CWD/_$PRGNAM.tar.gz ]; then
+ explodepkg $CWD/_$PRGNAM.tar.gz
+fi
+
+cd $TMP/tmp-$PRGNAM
+
+
+# --- TARBALL EXTRACTION,PATCH,MODIFY ---
+
+echo "Extracting the program tarball for $PRGNAM..."
+tar -xzvf $CWD/${PRGNAM}-${VERSION}.tar.gz
+
+cd ${PRGNAM}-${VERSION}
+
+chown -R root.root *
+
+
+# --- BUILDING ---
+
+echo Building ...
+
+CFLAGS="$SLKCFLAGS" \
+./configure --prefix=/usr \
+ --localstatedir=/var \
+ --sysconfdir=/etc \
+ --enable-kernel-module \
+ --with-kernel=${KSRC} \
+ --enable-lib \
+ --enable-util \
+ --enable-example \
+ 2>&1 | tee $CWD/configure-${PRGNAM}.log
+make 2>&1 | tee $CWD/make-${PRGNAM}.log
+
+#
+# Install all the needed stuff to the package dir
+#
+# Use installwatch if available:
+which installwatch > /dev/null 2>&1
+if [ $? == 0 ]; then
+ installwatch -o $CWD/install-${PRGNAM}.log make DESTDIR=$PKG install
+else
+ make DESTDIR=$PKG install 2>&1 |tee $CWD/install-${PRGNAM}.log
+fi
+
+
+# --- DOCUMENTATION ---
+
+DOCS="AUTHORS COPYING COPYING.LIB ChangeLog FAQ Filesystems \
+ NEWS README README-2.4 README.NFS doc/how-fuse-works doc/kernel.txt"
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a $DOCS \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+chmod -R a-w $PKG/usr/doc/$PRGNAM-$VERSION/*
+
+# Compress the man page(s)
+gzip -9f $PKG/usr/man/*/*
+
+# Strip binaries
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+
+# --- OWNERSHIP, RIGHTS ---
+
+chmod -R o-w $PKG
+chown root:bin $PKG/usr/bin/* $PKG/usr/sbin/* $PKG/bin/* $PKG/sbin/* 2>/dev/null
+
+# Some people might find this a security risk. The fuse documentation thinks it
+# is wrapped in adequate safety guards. If you do not make fusermount setuid root,
+# then the normal user will not be able to mount a fuse filesystem.
+chmod 4755 $PKG/usr/bin/fusermount
+
+
+# --- PACKAGE DESCRIPTION ---
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+if [ -f $CWD/doinst.sh ]; then
+ cat $CWD/doinst.sh > $PKG/install/doinst.sh
+fi
+
+
+# --- BUILDING ---
+
+# Build the packages:
+cd $PKG
+mv lib $PKG2/
+
+makepkg --linkadd y --chown n $TMP/$PRGNAM-$VERSION-$ARCH-$BUILD.tgz \
+ 2>&1 | tee $CWD/makepkg-${PRGNAM}.log
+(cd $TMP && md5sum $PRGNAM-$VERSION-$ARCH-$BUILD.tgz > $PRGNAM-$VERSION-$ARCH-$BUILD.tgz.md5)
+cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $TMP/$PRGNAM-$VERSION-$ARCH-$BUILD.txt
+
+# Create the module package
+cd $PKG2
+mkdir -p $PKG2/install
+cat <<-EEOOTT > $PKG2/install/doinst.sh
+ # Only run depmod on matching running kernel
+ # Slackware will run depmod anyway on reboot):
+ MYMODVER=$KVERSION
+ MYKERNEL=\`uname -r\`
+
+ if [ "\$MYKERNEL" = "\$MYMODVER" ]; then
+ if [ -x sbin/depmod ]; then
+ chroot . /sbin/depmod -a \$MYKERNEL 1> /dev/null 2> /dev/null
+ fi
+ fi
+
+ # Update rc.modules so that fuse will be loaded on boot
+ if ! grep "^/sbin/modprobe fuse" etc/rc.d/rc.modules 1>/dev/null 2>&1 ; then
+ cat <<_EOM_ >> etc/rc.d/rc.modules
+ # Load fuse
+ /sbin/modprobe fuse
+ _EOM_
+ fi
+ EEOOTT
+
+cat $CWD/${PRGNAM2}.slack-desc > $PKG2/install/slack-desc
+makepkg --linkadd y --chown n $TMP/$PRGNAM2-${VERSION}_${KVERSION}-$ARCH-$BUILD.tgz \
+ 2>&1 | tee $CWD/makepkg-${PRGNAM2}.log
+(cd $TMP && md5sum $PRGNAM2-${VERSION}_${KVERSION}-$ARCH-$BUILD.tgz > $PRGNAM2-${VERSION}_${KVERSION}-$ARCH-$BUILD.tgz.md5)
+cat $PKG2/install/slack-desc | grep "^${PRGNAM2}" > $TMP/$PRGNAM2-${VERSION}_${KVERSION}-$ARCH-$BUILD.txt
+
+
+# --- CLEANUP ---
+
+# Clean up the extra stuff:
+if [ "$1" = "--cleanup" ]; then
+ rm -rf $TMP/tmp-$PRGNAM
+ rm -rf $PKG
+ rm -rf $PKG2
+fi
diff --git a/fuse/build/slack-desc b/fuse/build/slack-desc
new file mode 100644
index 00000000..f6b73126
--- /dev/null
+++ b/fuse/build/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+fuse: fuse (Filesystem in Userspace)
+fuse:
+fuse: With FUSE it is possible to implement a fully functional filesystem
+fuse: in a userspace program.
+fuse:
+fuse:
+fuse:
+fuse:
+fuse:
+fuse: fuse lives at http://fuse.sourceforge.net/
+fuse: