aboutsummaryrefslogtreecommitdiff
path: root/system/testdisk/testdisk.SlackBuild
diff options
context:
space:
mode:
authorGrigorios Bouzakis <grbzks@xsmail.com>2011-05-19 14:14:38 -0500
committerRobby Workman <rworkman@slackbuilds.org>2011-05-19 14:14:38 -0500
commita4020b18411cd15a3ecedabb5211f123e68ea089 (patch)
tree7bf8230fa7cd063e8322adf63b561acfb6762176 /system/testdisk/testdisk.SlackBuild
parente1c9415ec4675a06de15dbf9b89b32f721134425 (diff)
system/testdisk: Updated for version 6.12.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'system/testdisk/testdisk.SlackBuild')
-rw-r--r--system/testdisk/testdisk.SlackBuild61
1 files changed, 42 insertions, 19 deletions
diff --git a/system/testdisk/testdisk.SlackBuild b/system/testdisk/testdisk.SlackBuild
index 39a677c8f5119..556ea2cd4fd68 100644
--- a/system/testdisk/testdisk.SlackBuild
+++ b/system/testdisk/testdisk.SlackBuild
@@ -1,21 +1,35 @@
#!/bin/sh
-# Slackware build script for <testdisk>
-# Written by Michales Michaloudes korgie@gmail.com
-# Modified by Robby Workman <rworkman@slackbuilds.org>
+
+# Slackware build script for testdisk
+# Originally Written by Michales Michaloudes korgie@gmail.com
+
+# Copyright 2011 Grigorios Bouzakis <grbzks@xsmail.com>
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for any purpose
+# with or without fee is hereby granted, provided that the above copyright
+# notice and this permission notice appear in all copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# AUTHORS AND COPYRIGHT HOLDERS AND THEIR CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=testdisk
-VERSION=6.12_WIP
+VERSION=${VERSION:-6.12}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-SRC_VERSION="$(printf $VERSION | tr _ -)"
-
-# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
@@ -39,40 +53,49 @@ else
LIBDIRSUFFIX=""
fi
+DOCS="COPYING INFO"
+
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$SRC_VERSION
-tar xvf $CWD/$PRGNAM-$SRC_VERSION.tar.bz2
-cd $PRGNAM-$SRC_VERSION
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+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 {} \;
+
+[ "$SUDO" = "true" ] && ENABLE_SUDO="--enable-sudo"
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
- --libdir=/usr/lib$LIBDIRSUFFIX \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$SRC-VERSION \
- --build=$ARCH-slackware-linux
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux \
+ ${ENABLE_SUDO}
make
make install DESTDIR=$PKG
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $(find $PKG/usr/man -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-# Thanks for ignoring the --docdir setting
mv $PKG/usr/share/doc $PKG/usr ; rmdir $PKG/usr/share
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$SRC_VERSION/$PRGNAM.SlackBuild
+cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc