slackbuilds_ponce/system/zfs-fuse/zfs-fuse.SlackBuild

63 lines
1.4 KiB
Text
Raw Normal View History

#!/bin/sh
# Slackware build script for ZFS-Fuse
# Steven King revision date 2010/01/17
PRGNAM=zfs-fuse
VERSION=0.6.9
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
mkdir -p $PKG/etc/rc.d
cat $CWD/rc.zfs-fuse > $PKG/etc/rc.d/rc.zfs-fuse.new
mkdir -p $PKG/usr/man/man8
cp doc/*.8.gz $PKG/usr/man/man8
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
BUGS HACKING LICENSE TESTING CHANGES INSTALL README* STATUS 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}