summaryrefslogtreecommitdiffstats
path: root/extra/source/brltty/brltty.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'extra/source/brltty/brltty.SlackBuild')
-rwxr-xr-xextra/source/brltty/brltty.SlackBuild44
1 files changed, 41 insertions, 3 deletions
diff --git a/extra/source/brltty/brltty.SlackBuild b/extra/source/brltty/brltty.SlackBuild
index c58959746..31d6fc1fb 100755
--- a/extra/source/brltty/brltty.SlackBuild
+++ b/extra/source/brltty/brltty.SlackBuild
@@ -1,4 +1,25 @@
#!/bin/sh
+#
+# Copyright 2010 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 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 AUTHOR 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.
+
# Set initial variables:
CWD=`pwd`
if [ "$TMP" = "" ]; then
@@ -9,10 +30,19 @@ if [ ! -d $TMP ]; then
fi
PKG=/tmp/package-brltty
-VERSION=4.0
-ARCH=${ARCH:-x86_64}
+VERSION=4.2
BUILD=${BUILD:-1}
+# 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" = "x86_64" ]; then
LIBDIRSUFFIX="64"
else
@@ -23,7 +53,7 @@ rm -rf $PKG
mkdir -p $PKG
cd $TMP
rm -rf brltty-$VERSION
-tar xf $CWD/brltty-$VERSION.tar.?z* || exit 1
+tar xvf $CWD/brltty-$VERSION.tar.?z* || exit 1
cd brltty-$VERSION
sh autogen
@@ -64,6 +94,14 @@ cat Documents/ChangeLog | head -n 150 > $PKG/usr/doc/brltty-$VERSION/ChangeLog
find . -size 0 -type f -exec rm -f {} \;
)
+# 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 Documents/ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat Documents/ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r Documents/ChangeLog $DOCSDIR/ChangeLog
+fi
+
gzip -9 $PKG/usr/man/man?/*.?
mkdir -p $PKG/etc