summaryrefslogtreecommitdiff
path: root/system/twin/twin.SlackBuild
diff options
context:
space:
mode:
authorchopp <nix4me@gmail.com>2010-05-11 22:55:33 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-11 22:55:33 +0200
commit6793381e1df00053d81ff41f1999dff4148db37d (patch)
treed99a51a5d182ac5203fa7d3a46391f341fb9a60b /system/twin/twin.SlackBuild
parent4d7772792bf3e2eb27a6ba0fc60f4506f41ae4dd (diff)
downloadslackbuilds-6793381e1df00053d81ff41f1999dff4148db37d.tar.gz
system/twin: Added to 12.1 repository
Diffstat (limited to 'system/twin/twin.SlackBuild')
-rw-r--r--system/twin/twin.SlackBuild76
1 files changed, 76 insertions, 0 deletions
diff --git a/system/twin/twin.SlackBuild b/system/twin/twin.SlackBuild
new file mode 100644
index 0000000000..e11a61778d
--- /dev/null
+++ b/system/twin/twin.SlackBuild
@@ -0,0 +1,76 @@
+#!/bin/sh
+
+# Slackware build script for twin
+# Written by chopp (nix4me@gmail.com)
+# Some portions, methods and/or ideas obtained from:
+# http://slackbuilds.org/template.SlackBuild
+
+# Slightly modified by Robby Workman <rworkman@slackbuilds.org>
+
+PRGNAM=twin
+VERSION=${VERSION:-0.6.0}
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG
+
+( cd $PKG
+ strip -g usr/lib/*.a
+ 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
+)
+
+mv $PKG/usr/share/man $PKG/usr/
+( 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
+( cd $PKG/usr/doc/$PRGNAM-$VERSION
+ for i in \
+ BUGS COPYING COPYING.LIB Changelog.txt INSTALL README README.porting docs ;
+ do ln -s /usr/share/twin/$i . ; done
+)
+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