summaryrefslogtreecommitdiffstats
path: root/source/a/dosfstools
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/dosfstools')
-rw-r--r--source/a/dosfstools/dosfstools-3.0.11.tar.bz2.sign7
-rwxr-xr-xsource/a/dosfstools/dosfstools.SlackBuild125
-rw-r--r--source/a/dosfstools/dosfstools.paths.diff17
3 files changed, 117 insertions, 32 deletions
diff --git a/source/a/dosfstools/dosfstools-3.0.11.tar.bz2.sign b/source/a/dosfstools/dosfstools-3.0.11.tar.bz2.sign
new file mode 100644
index 000000000..ca1fec559
--- /dev/null
+++ b/source/a/dosfstools/dosfstools-3.0.11.tar.bz2.sign
@@ -0,0 +1,7 @@
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.10 (GNU/Linux)
+
+iEYEABECAAYFAk0U0YcACgkQ+C5cwEsrK54SwACg2GdKFHonvr+sJx9d6wA+OTwT
+pbUAoK/eDyuvkyfQygxW07g6URh5Adg+
+=eKdA
+-----END PGP SIGNATURE-----
diff --git a/source/a/dosfstools/dosfstools.SlackBuild b/source/a/dosfstools/dosfstools.SlackBuild
index ebe99c68b..abb2d85ba 100755
--- a/source/a/dosfstools/dosfstools.SlackBuild
+++ b/source/a/dosfstools/dosfstools.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2007-2009 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2011 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,55 +20,116 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-VERSION=2.11
-ARCH=${ARCH:-x86_64}
-BUILD=${BUILD:-1}
+
+PKGNAM=dosfstools
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.bz2 | rev | cut -f 3- -d . | rev | cut -f 2- -d -)}
+BUILD=${BUILD:-2}
+
+# 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
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
CWD=$(pwd)
TMP=${TMP:-/tmp}
-PKG=$TMP/package-dosfstools
+PKG=$TMP/package-$PKGNAM
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
-rm -rf dosfstools-$VERSION
-tar xzvf $CWD/dosfstools-$VERSION.src.tar.gz
-cd dosfstools-$VERSION
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.bz2 || exit 1
+cd $PKGNAM-$VERSION
+
chown -R root:root .
-make -j4 || exit 1
-
-( cd mkdosfs
- mkdir -p $PKG/sbin
- cat mkdosfs > $PKG/sbin/mkdosfs
- chmod 755 $PKG/sbin/mkdosfs
- mkdir -p $PKG/usr/man/man8
- cat mkdosfs.8 | gzip -9c > $PKG/usr/man/man8/mkdosfs.8.gz
-)
-( cd $PKG/sbin ; rm -f mkfs.msdos ; ln -sf mkdosfs mkfs.msdos )
-( cd dosfsck
- cat dosfsck > $PKG/sbin/dosfsck
- chmod 755 $PKG/sbin/dosfsck
- cat dosfsck.8 | gzip -9c > $PKG/usr/man/man8/dosfsck.8.gz
-)
-mkdir -p $PKG/usr/doc/dosfstools-$VERSION
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+zcat $CWD/dosfstools.paths.diff.gz | patch -p1 --verbose || exit 1
+
+# Build and install:
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+## I do not believe we want these, or it may cause autofscking fat volumes at boot:
+## NOTE: only if it is set in fstab, which is not default. Some other things need
+## to see fsck.vfat, so allowing it again.
+#rm -f $PKG/sbin/fsck.* $PKG/usr/man/man?/fsck.*
+
+# We can handle this:
+rm -r $PKG/usr/doc
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
cp -a \
- CHANGES README.Atari TODO \
- $PKG/usr/doc/dosfstools-$VERSION
-mkdir -p $PKG/usr/doc/dosfstools-$VERSION/mkdosfs
-( cd mkdosfs ; cp -a ANNOUNCE COPYING README mkdosfs-ygg-0.3b.lsm $PKG/usr/doc/dosfstools-$VERSION/mkdosfs )
-mkdir -p $PKG/usr/doc/dosfstools-$VERSION/dosfsck
-( cd dosfsck ; cp -a CHANGES COPYING README $PKG/usr/doc/dosfstools-$VERSION/dosfsck )
+ COPYING* README* \
+ doc/ANNOUNCE* doc/README* doc/TODO* \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+# Strip binaries:
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)
+# Compress and if needed symlink the man pages:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# Compress info files, if any:
+if [ -d $PKG/usr/info ]; then
+ ( cd $PKG/usr/info
+ rm -f dir
+ gzip -9 *
+ )
+fi
+
+# 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
-# Build the package:
cd $PKG
-makepkg -l y -c n $TMP/dosfstools-$VERSION-$ARCH-$BUILD.txz
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$(echo $VERSION | tr - _)-$ARCH-$BUILD.txz
diff --git a/source/a/dosfstools/dosfstools.paths.diff b/source/a/dosfstools/dosfstools.paths.diff
new file mode 100644
index 000000000..cdd473df7
--- /dev/null
+++ b/source/a/dosfstools/dosfstools.paths.diff
@@ -0,0 +1,17 @@
+--- ./Makefile.orig 2010-04-04 02:36:49.000000000 -0500
++++ ./Makefile 2011-02-25 13:45:41.443999917 -0600
+@@ -19,10 +19,10 @@
+ # can be found in /usr/share/common-licenses/GPL-3 file.
+
+ DESTDIR =
+-PREFIX = /usr/local
+-SBINDIR = $(PREFIX)/sbin
+-DOCDIR = $(PREFIX)/share/doc
+-MANDIR = $(PREFIX)/share/man
++PREFIX = /usr
++SBINDIR = /sbin
++DOCDIR = $(PREFIX)/doc
++MANDIR = $(PREFIX)/man
+
+ #OPTFLAGS = -O2 -fomit-frame-pointer -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+ OPTFLAGS = -O2 -fomit-frame-pointer $(shell getconf LFS_CFLAGS)