mirror of
https://github.com/Ponce/slackbuilds
synced 2024-12-05 00:55:44 +01:00
a095ad4809
Added a patch for glibc>=2.14 Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
70 lines
1.7 KiB
Bash
70 lines
1.7 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
|
|
# Updated for 20120201_6abfdcf by ponce on 20120923
|
|
|
|
PRGNAM=zfs-fuse
|
|
VERSION=20120201_6abfdcf
|
|
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.?z*
|
|
cd $PRGNAM-$VERSION
|
|
chown -R root:root .
|
|
chmod -R u+w,go+r-w,a-s .
|
|
|
|
# Patch for glib>=2.14
|
|
# http://zfs-fuse.net/issues/137
|
|
patch -p1 < $CWD/glibc-2.14.patch
|
|
|
|
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}
|