summaryrefslogtreecommitdiff
path: root/source/a/ntfs-3g/ntfs-3g.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/ntfs-3g/ntfs-3g.SlackBuild')
-rwxr-xr-xsource/a/ntfs-3g/ntfs-3g.SlackBuild47
1 files changed, 34 insertions, 13 deletions
diff --git a/source/a/ntfs-3g/ntfs-3g.SlackBuild b/source/a/ntfs-3g/ntfs-3g.SlackBuild
index 2883d4fb..93612e0c 100755
--- a/source/a/ntfs-3g/ntfs-3g.SlackBuild
+++ b/source/a/ntfs-3g/ntfs-3g.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for ntfs-3g
-# Copyright (c) 2008, Antonio Hernandez Blas <hba.nihilismus@gmail.com>
+# Copyright 2008 Antonio Hernandez Blas <hba.nihilismus@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -25,13 +25,22 @@
# Modified by Patrick Volkerding <volkerdi@slackware.com>
# Modified by Eric Hameleers <alien@slackware.com>
-PRGNAM=ntfs-3g
-VERSION=${VERSION:-2009.4.4}
-ARCH=${ARCH:-x86_64}
+PKGNAM=ntfs-3g
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j7 "}
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
@@ -41,18 +50,21 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
CWD=$(pwd)
TMP=${TMP:-/tmp}
-PKG=$TMP/package-$PRGNAM
+PKG=$TMP/package-$PKGNAM
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP || exit 1
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 || exit 1
-cd $PRGNAM-$VERSION || exit 1
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+cd $PKGNAM-$VERSION || exit 1
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -68,7 +80,7 @@ CXXFLAGS="$SLKCFLAGS" \
--mandir=/usr/man \
--bindir=/bin \
--sbindir=/sbin \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
--with-fuse=internal \
--disable-ldconfig \
--enable-static=no \
@@ -78,7 +90,8 @@ CXXFLAGS="$SLKCFLAGS" \
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-# Add the HAL fdi file so that automount uses "ntfs-3g" as filesystem type
+# Add the HAL fdi file so that automount uses ntfs-3g for mounting
+# This should work with the "volume.fstype.alternative.*" in hal-0.5.12+
mkdir -p $PKG/usr/share/hal/fdi/policy/10osvendor
cat $CWD/10-ntfs-3g-policy.fdi \
> $PKG/usr/share/hal/fdi/policy/10osvendor/10-ntfs-3g-policy.fdi
@@ -92,14 +105,22 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
)
rm -rf $PKG/usr/share/doc
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
cp -a \
AUTHORS COPYING* CREDITS INSTALL NEWS README* \
- $PKG/usr/doc/$PRGNAM-$VERSION
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $TMP/$PRGNAM-$VERSION-$ARCH-$BUILD.txz
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz