slackbuilds_ponce/system/zfs-fuse/zfs-fuse.SlackBuild
Robby Workman c9f7eacf1d system/zfs-fuse: Updated for version 0.7.0.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
2011-04-03 09:59:50 -05:00

65 lines
1.5 KiB
Bash

#!/bin/sh
# Slackware build script for ZFS-Fuse
# Steven King revision date 2010/01/17
# Updated for 0.7.0 by rworkman on 20110403
PRGNAM=zfs-fuse
VERSION=0.7.0
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
rm -rf $TMP/$PRGNAM-$VERSION
cd $TMP
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
cd src
scons
scons install install_dir=$PKG/usr/sbin
cd ..
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
# Install init script and zfsrc sample
mkdir -p $PKG/etc/rc.d
cat $CWD/rc.zfs-fuse > $PKG/etc/rc.d/rc.zfs-fuse.new
cat contrib/zfsrc > $PKG/etc/zfsrc.sample
mkdir -p $PKG/usr/man/man8
cp doc/*.8 $PKG/usr/man/man8
gzip -9 $PKG/usr/man/man8/*.8
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
BUGS CHANGES HACKING INSTALL LICENSE README* STATUS TESTING TODO \
$PKG/usr/doc/$PRGNAM-$VERSION
find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \;
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}