aboutsummaryrefslogtreecommitdiff
path: root/multimedia/ctl/ctl.SlackBuild
diff options
context:
space:
mode:
authorKlaatu <klaatu@member.fsf.org>2016-07-27 20:37:29 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-07-30 06:03:56 +0700
commit785233d071ef477cf96d27fb2ec8c9baec0e19b1 (patch)
tree8838c235f31cb93d89f756559bd2fa2ca15d9ab8 /multimedia/ctl/ctl.SlackBuild
parentf73644a0a3ea1c6dbfdc3c610617d23b394f1f24 (diff)
multimedia/ctl: Added (colour transform language and ctlrender app).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'multimedia/ctl/ctl.SlackBuild')
-rw-r--r--multimedia/ctl/ctl.SlackBuild96
1 files changed, 96 insertions, 0 deletions
diff --git a/multimedia/ctl/ctl.SlackBuild b/multimedia/ctl/ctl.SlackBuild
new file mode 100644
index 0000000000000..2b25a82f9ee7f
--- /dev/null
+++ b/multimedia/ctl/ctl.SlackBuild
@@ -0,0 +1,96 @@
+#!/bin/sh
+
+# Slackware build script for ctl
+
+# Copyright 2016 Klaatu, Wellington NZ
+# All rights reserved.
+#
+
+PRGNAM=ctl
+VERSION=${VERSION:-1.5.2}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+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 CTL-"$PRGNAM"-"$VERSION"
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+PKG_CONFIG_PATH="$PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig:$PKG_CONFIG_PATH" \
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DINSTALL_CMAKE_DIR=/usr/lib${LIBDIRSUFFIX} \
+ -DINSTALL_LIB_DIR=/usr/lib${LIBDIRSUFFIX} \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make
+ make install DESTDIR=$PKG
+
+ #brute force to conform to LIBDIRSUFFIX post facto
+ #installer as written hardcode some files to usr/lib
+ if [ -n "$LIBDIRSUFFIX" ]; then
+ mv $PKG/usr/lib/* $PKG/usr/lib${LIBDIRSUFFIX}
+ rmdir $PKG/usr/lib || false
+ fi
+
+cd ..
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+find $PKG -name perllocal.pod \
+ -o -name ".packlist" \
+ -o -name "*.bs" \
+ | xargs rm -f
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS LICENSE CHANGELOG README.md $PKG/usr/doc/$PRGNAM-$VERSION
+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.${PKGTYPE:-tgz}