summaryrefslogtreecommitdiff
path: root/system/tarsnap/tarsnap.SlackBuild
diff options
context:
space:
mode:
authorJustin H Haynes <justin at justinhaynes dot com>2010-05-12 23:33:48 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-12 23:33:48 +0200
commit90296322611dda8bb38087707106c0640616785f (patch)
tree50596e20d6d0b98eeb60c1f2c90b445b5b6a3692 /system/tarsnap/tarsnap.SlackBuild
parent511306c9752bd8a43481e8cc9399c38899fc9006 (diff)
downloadslackbuilds-90296322611dda8bb38087707106c0640616785f.tar.gz
system/tarsnap: Added to 12.2 repository
Diffstat (limited to 'system/tarsnap/tarsnap.SlackBuild')
-rw-r--r--system/tarsnap/tarsnap.SlackBuild84
1 files changed, 84 insertions, 0 deletions
diff --git a/system/tarsnap/tarsnap.SlackBuild b/system/tarsnap/tarsnap.SlackBuild
new file mode 100644
index 0000000000..93ff05269d
--- /dev/null
+++ b/system/tarsnap/tarsnap.SlackBuild
@@ -0,0 +1,84 @@
+#!/bin/sh
+
+# Slackware build script for tarsnap
+
+# Written by Justin H Haynes <justin@justinhaynes.com>
+# as a series of careful modifications to the excellent
+# http://slackbuilds.org/template.SlackBuild
+
+# Permission to use, copy, modify, and/or 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.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+# Modified by the SlackBuilds.org project
+
+PRGNAM=tarsnap
+VERSION=${VERSION:-1.0.17}
+#ARCH=${ARCH:-i486} # Do not set or edit this - we get it from the Makefile.
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+# Normally we'd have this if block here for setting ARCH and
+# feeding same to the configure script, but the tarsnap configure script
+# figures out the architecture itself.
+
+set -e # Exit on most errors
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-at-$VERSION
+tar xvf $CWD/$PRGNAM-at-$VERSION.tgz
+cd $PRGNAM-at-$VERSION
+chown -R root:root .
+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 {} \;
+
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION
+
+make
+make install DESTDIR=$PKG
+
+# We don't set ARCH. we let Colin Percival's configure do it.
+ARCH=$(grep build_cpu Makefile | cut -d= -f 2 | sed s/^\ //)
+
+# We'll leave stuff unstripped for now, since we're dealing with a beta
+#( cd $PKG
+# find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+# find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+#)
+
+( cd $PKG/usr/man || exit 1
+ find . -type f -exec gzip -9 {} \;
+ for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+)
+
+
+mkdir -p $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
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz