aboutsummaryrefslogtreecommitdiff
path: root/libraries/libxnvctrl
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/libxnvctrl')
-rw-r--r--libraries/libxnvctrl/README5
-rw-r--r--libraries/libxnvctrl/libxnvctrl.SlackBuild95
-rw-r--r--libraries/libxnvctrl/libxnvctrl.info10
-rw-r--r--libraries/libxnvctrl/libxnvctrl_so.patch68
-rw-r--r--libraries/libxnvctrl/slack-desc19
5 files changed, 197 insertions, 0 deletions
diff --git a/libraries/libxnvctrl/README b/libraries/libxnvctrl/README
new file mode 100644
index 0000000000000..cebea14fade08
--- /dev/null
+++ b/libraries/libxnvctrl/README
@@ -0,0 +1,5 @@
+The NV-CONTROL X extension provides a mechanism for X clients to query and set
+configuration parameters of the NVIDIA X driver. State set by the NV-CONTROL X
+extension is assumed to be persistent only for the current server generation.
+This can be useful for programs such as conky, mate-sensors-applet, and
+xfce4-sensors-plugin to allow for realtime monitoring of your NVIDIA cards temperature, fan speed, memory, etc.
diff --git a/libraries/libxnvctrl/libxnvctrl.SlackBuild b/libraries/libxnvctrl/libxnvctrl.SlackBuild
new file mode 100644
index 0000000000000..f0c049d1cd779
--- /dev/null
+++ b/libraries/libxnvctrl/libxnvctrl.SlackBuild
@@ -0,0 +1,95 @@
+#!/bin/sh
+
+# Slackware build script for libxnvctrl
+
+# Copyright 2016, Matt Dinslage, Springfield, MO
+# 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=libxnvctrl
+VERSION=${VERSION:-367.44}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) 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 nvidia-settings-$VERSION
+tar xvf $CWD/nvidia-settings-$VERSION.tar.bz2
+cd nvidia-settings-$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 {} \;
+
+#patch source to build static and shared library
+patch -p1 < $CWD/libxnvctrl_so.patch
+
+cd src/libXNVCtrl
+make clean
+CFLAGS="$SLKCFLAGS" \
+make
+
+#install shared and static libraries and headers
+install -Dm 644 *.h -t $PKG/usr/include/NVCtrl
+install -Dm 644 libXNVCtrl.a -t $PKG/usr/lib$LIBDIRSUFFIX
+install -Dm 755 libXNVCtrl.so.0.0.0 -t $PKG/usr/lib$LIBDIRSUFFIX
+ln -s libXNVCtrl.so.0.0.0 $PKG/usr/lib$LIBDIRSUFFIX/libXNVCtrl.so.0
+ln -s libXNVCtrl.so.0 $PKG/usr/lib$LIBDIRSUFFIX/libXNVCtrl.so
+
+mkdir -p $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/libraries/libxnvctrl/libxnvctrl.info b/libraries/libxnvctrl/libxnvctrl.info
new file mode 100644
index 0000000000000..02a28a3431d74
--- /dev/null
+++ b/libraries/libxnvctrl/libxnvctrl.info
@@ -0,0 +1,10 @@
+PRGNAM="libxnvctrl"
+VERSION="367.44"
+HOMEPAGE="http://www.nvidia.com"
+DOWNLOAD="ftp://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-367.44.tar.bz2"
+MD5SUM="2e729b8bf966d0f7239202a3f1ddf2c1"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="nvidia-driver"
+MAINTAINER="M.Dinslage"
+EMAIL="daedra1980@gmail.com"
diff --git a/libraries/libxnvctrl/libxnvctrl_so.patch b/libraries/libxnvctrl/libxnvctrl_so.patch
new file mode 100644
index 0000000000000..c2fedda5b54fa
--- /dev/null
+++ b/libraries/libxnvctrl/libxnvctrl_so.patch
@@ -0,0 +1,68 @@
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -106,6 +106,8 @@
+ XNVCTRL_DIR ?= libXNVCtrl
+ XNVCTRL_MAKEFILE ?= Makefile
+ XNVCTRL_ARCHIVE ?= $(XNVCTRL_DIR)/libXNVCtrl.a
++XNVCTRL_SHARED ?= $(XNVCTRL_DIR)/libXNVCtrl.so.0
++XNVCTRL_LIB ?= $(XNVCTRL_SHARED)
+ XCONFIG_PARSER_DIR ?= XF86Config-parser
+ COMMON_UTILS_DIR ?= common-utils
+ COMMON_UNIX_DIR ?= common-unix
+@@ -280,15 +282,18 @@
+ $(MKDIR) $(BINDIR)
+ $(INSTALL) $(INSTALL_BIN_ARGS) $< $(BINDIR)/$(notdir $<)
+
++$(XNVCTRL_ARCHIVE) $(XNVCTRL_SHARED):
++ $(MAKE) -C $(XNVCTRL_DIR)
++
+ $(eval $(call DEBUG_INFO_RULES, $(NVIDIA_SETTINGS)))
+-$(NVIDIA_SETTINGS).unstripped: $(OBJS) $(XNVCTRL_ARCHIVE)
++$(NVIDIA_SETTINGS).unstripped: $(OBJS) $(XNVCTRL_LIB)
+ $(call quiet_cmd,LINK) $(CFLAGS) $(LDFLAGS) $(BIN_LDFLAGS) \
+- -rdynamic -o $@ $(OBJS) $(XNVCTRL_ARCHIVE) $(LIBS)
++ -rdynamic -o $@ $(OBJS) $(XNVCTRL_LIB) $(LIBS)
+
+ $(eval $(call DEBUG_INFO_RULES, $(GTK2LIB)))
+ $(GTK2LIB).unstripped: $(GTK2_OBJS) $(XCP_OBJS) $(VERSION_MK)
+ $(call quiet_cmd,LINK) -shared $(CFLAGS) $(LDFLAGS) $(BIN_LDFLAGS) \
+- $(XNVCTRL_ARCHIVE) $(LIBS) $(GTK2_LIBS) \
++ $(XNVCTRL_LIB) $(LIBS) $(GTK2_LIBS) \
+ -Wl,--unresolved-symbols=ignore-all -o $@ \
+ -Wl,-soname -Wl,$(GTK2LIB_SONAME) \
+ $(GTK2_OBJS) $(XCP_OBJS)
+@@ -297,7 +302,7 @@
+ $(eval $(call DEBUG_INFO_RULES, $(GTK3LIB)))
+ $(GTK3LIB).unstripped: $(GTK3_OBJS) $(XCP_OBJS) $(VERSION_MK)
+ $(call quiet_cmd,LINK) -shared $(CFLAGS) $(LDFLAGS) $(BIN_LDFLAGS) \
+- $(XNVCTRL_ARCHIVE) $(LIBS) $(GTK3_LIBS) \
++ $(XNVCTRL_LIB) $(LIBS) $(GTK3_LIBS) \
+ -Wl,--unresolved-symbols=ignore-all -o $@ \
+ -Wl,-soname -Wl,$(GTK3LIB_SONAME) \
+ $(GTK3_OBJS) $(XCP_OBJS)
+--- a/src/libXNVCtrl/Makefile
++++ b/src/libXNVCtrl/Makefile
+@@ -55,10 +55,17 @@
+ .PHONY: clean
+
+ all: $(LIBXNVCTRL)
++all: libXNVCtrl.so
+
+ $(LIBXNVCTRL) : $(OBJS)
+ $(AR) ru $@ $(OBJS)
+
++libXNVCtrl.so: $(OBJS)
++ $(RM) $@ $@.*
++ $(CC) -shared -Wl,-soname=$@.0 -o $@.0.0.0 $(LDFLAGS) $^ -lXext -lX11
++ ln -s $@.0.0.0 $@.0
++ ln -s $@.0 $@
++
+ # define the rule to build each object file
+ $(foreach src,$(SRC),$(eval $(call DEFINE_OBJECT_RULE,TARGET,$(src))))
+
+@@ -68,3 +75,4 @@
+ clean:
+ rm -rf $(LIBXNVCTRL) *~ $(STAMP_C) \
+ $(OUTPUTDIR)/*.o $(OUTPUTDIR)/*.d
++ rm -f libXNVCtrl.so libXNVCtrl.so.*
+
diff --git a/libraries/libxnvctrl/slack-desc b/libraries/libxnvctrl/slack-desc
new file mode 100644
index 0000000000000..74ad635b52d6a
--- /dev/null
+++ b/libraries/libxnvctrl/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------------------------------------------------------|
+libxnvctrl: libxnvctrl (NVIDIA NV-CONTROL X extension)
+libxnvctrl:
+libxnvctrl: The NV-CONTROL X extension provides a mechanism for X clients to
+libxnvctrl: query and set configuration parameters of the NVIDIA X driver. State
+libxnvctrl: set by the NV-CONTROL X extension is assumed to be persistent only
+libxnvctrl: for the current server generation. This can be useful for programs
+libxnvctrl: such as conky, mate-sensors-applet, and xfce4-sensors-plugin to
+libxnvctrl: allow for realtime monitoring of your NVIDIA cards temperature,
+libxnvctrl: fan speed, memory, etc.
+libxnvctrl:
+libxnvctrl: