diff options
Diffstat (limited to 'source/a/ntfs-3g')
-rw-r--r-- | source/a/ntfs-3g/10-ntfs-3g-policy.fdi | 35 | ||||
-rwxr-xr-x | source/a/ntfs-3g/ntfs-3g.SlackBuild | 47 |
2 files changed, 64 insertions, 18 deletions
diff --git a/source/a/ntfs-3g/10-ntfs-3g-policy.fdi b/source/a/ntfs-3g/10-ntfs-3g-policy.fdi index baaf8159..8b837d10 100644 --- a/source/a/ntfs-3g/10-ntfs-3g-policy.fdi +++ b/source/a/ntfs-3g/10-ntfs-3g-policy.fdi @@ -1,13 +1,38 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Theoretically, this file should ship with ntfs-3g --> + <deviceinfo version="0.2"> <device> - <match key="volume.fstype" string="ntfs"> - <match key="@block.storage_device:storage.hotpluggable" bool="true"> - <merge key="volume.fstype" type="string">ntfs-3g</merge> - <merge key="volume.policy.mount_filesystem" type="string">ntfs-3g</merge> - <append key="volume.mount.valid_options" type="strlist">locale=</append> + <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="Linux"> + <match key="volume.fstype" string="ntfs"> + + <!-- "Register" ntfs-3g as a valid alternative handler --> + <append key="volume.fstype.alternative" type="strlist">ntfs-3g</append> + + <!-- "Register" ntfs-3g as the preferred alternative handler --> + <merge key="volume.fstype.alternative.preferred" type="string">ntfs-3g</merge> + + <!-- Set valid mount options --> + <append key="volume.mount.ntfs-3g.valid_options" type="strlist">ro</append> + <append key="volume.mount.ntfs-3g.valid_options" type="strlist">sync</append> + <append key="volume.mount.ntfs-3g.valid_options" type="strlist">dirsync</append> + <append key="volume.mount.ntfs-3g.valid_options" type="strlist">noatime</append> + <append key="volume.mount.ntfs-3g.valid_options" type="strlist">nodiratime</append> + <append key="volume.mount.ntfs-3g.valid_options" type="strlist">noexec</append> + <append key="volume.mount.ntfs-3g.valid_options" type="strlist">quiet</append> + <append key="volume.mount.ntfs-3g.valid_options" type="strlist">remount</append> + <append key="volume.mount.ntfs-3g.valid_options" type="strlist">exec</append> + <append key="volume.mount.ntfs-3g.valid_options" type="strlist">locale=</append> + <append key="volume.mount.ntfs-3g.valid_options" type="strlist">uid=</append> + <append key="volume.mount.ntfs-3g.valid_options" type="strlist">gid=</append> + <append key="volume.mount.ntfs-3g.valid_options" type="strlist">umask=</append> + <append key="volume.mount.ntfs-3g.valid_options" type="strlist">dmask=</append> + <append key="volume.mount.ntfs-3g.valid_options" type="strlist">fmask=</append> + <append key="volume.mount.ntfs-3g.valid_options" type="strlist">utf8</append> + </match> </match> </device> </deviceinfo> + 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 |