aboutsummaryrefslogtreecommitdiff
path: root/audio/ocp/ocp.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'audio/ocp/ocp.SlackBuild')
-rw-r--r--audio/ocp/ocp.SlackBuild65
1 files changed, 65 insertions, 0 deletions
diff --git a/audio/ocp/ocp.SlackBuild b/audio/ocp/ocp.SlackBuild
new file mode 100644
index 0000000000000..1cff1865a5468
--- /dev/null
+++ b/audio/ocp/ocp.SlackBuild
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+# Slackware build script for Open Cubic Player
+# Written by Erik Hanson erik@slackbuilds.org
+
+PRGNAM=ocp
+VERSION=0.1.16
+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"
+fi
+
+set -eu
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var/lib \
+ --infodir=/usr/info \
+ --disable-static \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG
+
+find $PKG | xargs file | egrep "ELF.*executable" | cut -f 1 -d : \
+ | xargs strip --strip-unneeded 2> /dev/null || true
+find $PKG | xargs file | egrep "ELF.*shared object" | cut -f 1 -d : \
+ | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/etc
+mv $PKG/usr/share/$PRGNAM-$VERSION/etc/ocp.ini $PKG/etc/ocp.ini.new
+rmdir $PKG/usr/share/$PRGNAM-$VERSION/etc/
+
+rm -f $PKG/usr/info/dir
+
+mv $PKG/usr/share/doc $PKG/usr/doc
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz