summaryrefslogtreecommitdiff
path: root/multimedia/sopcast/sopcast.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/sopcast/sopcast.SlackBuild')
-rw-r--r--multimedia/sopcast/sopcast.SlackBuild58
1 files changed, 58 insertions, 0 deletions
diff --git a/multimedia/sopcast/sopcast.SlackBuild b/multimedia/sopcast/sopcast.SlackBuild
new file mode 100644
index 0000000000..5b74ac1fec
--- /dev/null
+++ b/multimedia/sopcast/sopcast.SlackBuild
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+# Slackware build script for sopcast
+# Written by Nai (bluedbs@gmail.com)
+
+PRGNAM=sopcast
+VERSION=${VERSION:-3.0.1}
+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"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/sp-auth.tgz
+cd sp-auth
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+mkdir -p $PKG/usr/bin
+cp -f sp-sc-auth $PKG/usr/bin/sp-sc
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a Readme $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE
+
+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.${PKGTYPE:-tgz}