summaryrefslogtreecommitdiffstats
path: root/system/ddcutil
diff options
context:
space:
mode:
author Thyr <thyr@airmail.cc>2018-04-20 19:56:12 +0700
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2018-04-20 19:56:36 +0700
commitfd1d52b294c91da277408df1e1ceffa42dba1a96 (patch)
tree2a555d2cb7ec7e62b8ec5bf03b45ab1d7113fd2c /system/ddcutil
parente93c2f04471827abfd59b753f0596fdddeada21e (diff)
downloadslackbuilds-fd1d52b294c91da277408df1e1ceffa42dba1a96.tar.gz
slackbuilds-fd1d52b294c91da277408df1e1ceffa42dba1a96.tar.xz
system/ddcutil: Added (change monitor setings).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/ddcutil')
-rw-r--r--system/ddcutil/README14
-rw-r--r--system/ddcutil/ddcutil.SlackBuild102
-rw-r--r--system/ddcutil/ddcutil.info10
-rw-r--r--system/ddcutil/slack-desc19
4 files changed, 145 insertions, 0 deletions
diff --git a/system/ddcutil/README b/system/ddcutil/README
new file mode 100644
index 0000000000..d1c351c8f6
--- /dev/null
+++ b/system/ddcutil/README
@@ -0,0 +1,14 @@
+ddcutil is a Linux program for querying and changing monitor settings,
+such as brightness and color levels.
+
+ddcutil primarily uses DDC/CI (Display Data Channel Command Interface)
+to communicate with monitors implementing MCCS (Monitor Control Command
+Set) over I2C. Normally, the video driver for the monitor exposes the
+I2C channel as devices named /dev/i2c-n.
+
+Use the following commands in order to be able to use ddcutil as a
+regular user:
+
+ # cp /usr/share/ddcutil/data/45-ddcutil-i2c.rules /etc/udev/rules.d
+ # groupadd -r i2c
+ # usermod -aG i2c your_username_here
diff --git a/system/ddcutil/ddcutil.SlackBuild b/system/ddcutil/ddcutil.SlackBuild
new file mode 100644
index 0000000000..9a88356804
--- /dev/null
+++ b/system/ddcutil/ddcutil.SlackBuild
@@ -0,0 +1,102 @@
+#!/bin/sh
+
+# Slackware build script for ddcutil
+
+# Copyright 2018 Thyr <thyr@airmail.cc>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=ddcutil
+VERSION=${VERSION:-0.8.6}
+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 $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 {} \;
+
+./autogen.sh
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
+
+make
+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
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS COPYING ChangeLog NEWS.md 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}
diff --git a/system/ddcutil/ddcutil.info b/system/ddcutil/ddcutil.info
new file mode 100644
index 0000000000..acd1af4c28
--- /dev/null
+++ b/system/ddcutil/ddcutil.info
@@ -0,0 +1,10 @@
+PRGNAM="ddcutil"
+VERSION="0.8.6"
+HOMEPAGE="http://ddcutil.com/"
+DOWNLOAD="https://github.com/rockowitz/ddcutil/archive/v0.8.6/ddcutil-0.8.6.tar.gz"
+MD5SUM="4cb18bb13505e1713736c35f5e8f6237"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Thyr"
+EMAIL="thyr@airmail.cc"
diff --git a/system/ddcutil/slack-desc b/system/ddcutil/slack-desc
new file mode 100644
index 0000000000..b85eed4125
--- /dev/null
+++ b/system/ddcutil/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+ddcutil: ddcutil (display data channel command interface client)
+ddcutil:
+ddcutil: ddcutil is a program for querying and changing monitor settings,
+ddcutil: such as brightness and color levels.
+ddcutil: Any settings that can be changed by pressing buttons on the monitor
+ddcutil: can be modified by ddcutil.
+ddcutil:
+ddcutil: Homepage: www.ddcutil.com
+ddcutil:
+ddcutil:
+ddcutil: