aboutsummaryrefslogtreecommitdiff
path: root/graphics/xcalib/xcalib.SlackBuild
diff options
context:
space:
mode:
authorklaatu <klaatu@straightedgelinux.com>2014-09-06 18:49:34 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-09-06 18:51:33 +0700
commitde31d778afaad7193155c802d369c20de155635a (patch)
treea709c937172fd093c1d766ff070324802b55fb7b /graphics/xcalib/xcalib.SlackBuild
parent53963669f2d3052458d9eaddcf59ffc48966f3d5 (diff)
graphics/xcalib: Added (color profile manager).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'graphics/xcalib/xcalib.SlackBuild')
-rw-r--r--graphics/xcalib/xcalib.SlackBuild86
1 files changed, 86 insertions, 0 deletions
diff --git a/graphics/xcalib/xcalib.SlackBuild b/graphics/xcalib/xcalib.SlackBuild
new file mode 100644
index 000000000000..390e121df358
--- /dev/null
+++ b/graphics/xcalib/xcalib.SlackBuild
@@ -0,0 +1,86 @@
+#!/bin/sh
+# Slackware build script for xcalib
+# Copyright 2014 klaatu @member.fsf.org
+
+# GNU All-Permissive License
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved. This file is offered as-is,
+# without any warranty.
+
+PRGNAM=xcalib
+VERSION=${VERSION:-0.8}
+BUILD=${BUILD:-1}
+GPU=${GPU:-xcalib}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG/usr/local/bin $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-source-$VERSION.tar.gz
+cd $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 {} \;
+
+sed -i "s|usr/local/bin|usr/bin|" Makefile
+mkdir -p $PKG/usr/bin
+rm -rf $PKG/usr/local
+
+if [ "${GPU}" != "xcalib" ]; then
+ make $GPU_xcalib
+else
+ make $GPU
+fi
+
+# patch out a bizarre permission line
+# in makefile that renders this application
+# non executable
+sed -i '/chmod/d' ./Makefile
+
+make install DESTDIR=$PKG
+
+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
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a README README.profilers COPYING $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/usr/share/color/icc
+cp -a gamma*icc AdobeGammaTest.icm $PKG/usr/share/color/icc/
+
+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}