summaryrefslogtreecommitdiff
path: root/system/plan9port/plan9port.SlackBuild
diff options
context:
space:
mode:
authorAntonio Hernández Blas <hba.nihilismus@gmail.com>2010-05-11 22:26:58 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-11 22:26:58 +0200
commit2b303a0c62440e0fc7f54aa8afd21a94900cd5f7 (patch)
treef4f15b3ecead3085cfea8ecdb8491f11d0b2e029 /system/plan9port/plan9port.SlackBuild
parentf0c1b572e8c60206916a8d9f52c5c783fa08d033 (diff)
downloadslackbuilds-2b303a0c62440e0fc7f54aa8afd21a94900cd5f7.tar.gz
system/plan9port: Updated for version 20080416
Diffstat (limited to 'system/plan9port/plan9port.SlackBuild')
-rw-r--r--system/plan9port/plan9port.SlackBuild45
1 files changed, 30 insertions, 15 deletions
diff --git a/system/plan9port/plan9port.SlackBuild b/system/plan9port/plan9port.SlackBuild
index b5b691697a..91f94bdd95 100644
--- a/system/plan9port/plan9port.SlackBuild
+++ b/system/plan9port/plan9port.SlackBuild
@@ -2,13 +2,31 @@
# Slackware build script for plan9port
-# Written by core (eroc@linuxmail.org)
+# Copyright (c) 2008, Antonio Hernández Blas <hba.nihilismus@gmail.com>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# 1.- Redistributions of source code 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.
PRGNAM=plan9port
-VERSION=20070917
-ARCH=${ARCH:-i586} # There's no use of cflags.
+VERSION=20080416
+ARCH=${ARCH:-i586} # There's no use of cflags.
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -17,17 +35,21 @@ OUTPUT=${OUTPUT:-/tmp}
set -e
rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
+mkdir -p $TMP $PKG/opt $OUTPUT
cd $TMP
tar xvf $CWD/$PRGNAM-$VERSION.tgz 2>/dev/null || true # 4 harmless errors
cd plan9
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 {} \;
# All plan9 programs are going to be installed in "/opt/plan9"
# The default prefix for plan9 is "/usr/local/plan9" and some files (that are
-# listed in /tmp/SBo/plan9/lib/moveplan9.files) are going to end up with that
+# listed in $TMP/plan9/lib/moveplan9.files) are going to end up with that
# prefix hardcoded. There's a script that resolves this problem, and the
# compilation runs it by default, but we'll have to edit it because it uses
# the current build directory as the path. I've tried passing /opt/plan9
@@ -37,25 +59,18 @@ sed -i 's:^new=`cleanname $PLAN9`$:new=`cleanname /opt/plan9`:' \
lib/moveplan9.sh
./INSTALL
-cd ..
-mkdir -p $PKG/opt
+cd $TMP
mv plan9 $PKG/opt
( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ 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
)
-# All these "CVS" directories should not be needed.
-# If I'm wrong, let me know. --rworkman
-# We'll do this in a subshell, because it will generate errors
-( find $PKG -type d -name "CVS" -exec rm -rf {} \; 2>/dev/null )
-
# man(1) from plan9port dislikes man pages compressed :)
# To setup some environment variables:
-mkdir -p $PKG/etc/profile.d/
install -D -m 0755 $CWD/$PRGNAM.sh $PKG/etc/profile.d/$PRGNAM.sh
install -m 0755 $CWD/$PRGNAM.csh $PKG/etc/profile.d/$PRGNAM.csh