diff options
author | Eric Fernandes Ferreira <candelabrus@gmail.com> | 2015-07-15 07:51:39 +0700 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2015-07-16 10:57:23 -0500 |
commit | 126592b2bb278dd47814faa4929d04a10bf58cd1 (patch) | |
tree | aebcbb924f772d1c257cbeb4800422afca7a158b | |
parent | 961891a34f6ccae46000b3f4fae7bdcadfa336bd (diff) |
games/glxosd: Added (on-screen display).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | games/glxosd/README | 5 | ||||
-rw-r--r-- | games/glxosd/doinst.sh | 26 | ||||
-rw-r--r-- | games/glxosd/glxosd.SlackBuild | 99 | ||||
-rw-r--r-- | games/glxosd/glxosd.info | 10 | ||||
-rw-r--r-- | games/glxosd/slack-desc | 19 |
5 files changed, 159 insertions, 0 deletions
diff --git a/games/glxosd/README b/games/glxosd/README new file mode 100644 index 0000000000000..9808fdf275257 --- /dev/null +++ b/games/glxosd/README @@ -0,0 +1,5 @@ +GLXOSD, an OSD and benchmarking tool for Linux + +GLXOSD is an on-screen display (OSD)/overlay for OpenGL applications running on Linux with X11. +It can show FPS, the temperature of your CPU, and if you have an NVIDIA graphics card (with proprietary drivers) +it will also show the temperature of the GPU. Also, it can log frame timings, which is useful for benchmarking. diff --git a/games/glxosd/doinst.sh b/games/glxosd/doinst.sh new file mode 100644 index 0000000000000..b91c4ec6c3f67 --- /dev/null +++ b/games/glxosd/doinst.sh @@ -0,0 +1,26 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +config etc/glxosd.new + +# Update the X font indexes: +if [ -x /usr/bin/mkfontdir ]; then + ( cd /usr/share/fonts/TTF + mkfontscale . + mkfontdir . + ) +fi + +if [ -x /usr/bin/fc-cache ]; then + /usr/bin/fc-cache -f +fi diff --git a/games/glxosd/glxosd.SlackBuild b/games/glxosd/glxosd.SlackBuild new file mode 100644 index 0000000000000..647079cf645ef --- /dev/null +++ b/games/glxosd/glxosd.SlackBuild @@ -0,0 +1,99 @@ +#!/bin/sh + +# Slackware build script for glxosd +# Written by Eric Fernandes Ferreira <candelabrus@gmail.com> +# Copyright 2015 Eric Fernandes Ferreira, Ponta Grossa - PR, Brazil +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "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 COPYRIGHT +# OWNER OR CONTRIBUTORS 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=glxosd +SRCNAM=GLXOSD +VERSION=${VERSION:-2.3.3} +BUILD=${BUILD:-1} +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 + SLKCFLAGS="-O2 -march=i486 -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 -eu + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $SRCNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tar.gz || tar xvf $CWD/$VERSION.tar.gz +cd $SRCNAM-$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 {} \; + +cmake \ + -DCMAKE_C_FLAGS="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr + +make +make install/strip DESTDIR=$PKG + +sed -i 's+/usr//lib/x86_64-linux-gnu//glxosd/+/usr/lib${LIBDIRSUFFIX}/glxosd+g' $PKG/usr/bin/glxosd +sed -i 's+/usr//lib/i386-linux-gnu//glxosd+/usr/lib${LIBDIRSUFFIX}/glxosd+g' $PKG/usr/bin/glxosd + +if [ "$ARCH" = "x86_64" ]; then + mv $PKG/usr/lib $PKG/usr/lib${LIBDIRSUFFIX} +fi + +mv $PKG/etc/$PRGNAM.conf $PKG/etc/$PRGNAM.conf.new +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a README* LICENSE AUTHORS $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 +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/games/glxosd/glxosd.info b/games/glxosd/glxosd.info new file mode 100644 index 0000000000000..dadfc497ae0db --- /dev/null +++ b/games/glxosd/glxosd.info @@ -0,0 +1,10 @@ +PRGNAM="glxosd" +VERSION="2.3.3" +HOMEPAGE="http://glxosd.nickguletskii.com/" +DOWNLOAD="https://github.com/nickguletskii/GLXOSD/archive/2.3.3.tar.gz" +MD5SUM="f8171c4d4e8d26c5b755109cfde21876" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Eric Fernandes Ferreira" +EMAIL="candelabrus@gmail.com"
\ No newline at end of file diff --git a/games/glxosd/slack-desc b/games/glxosd/slack-desc new file mode 100644 index 0000000000000..594a417158957 --- /dev/null +++ b/games/glxosd/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------------------------------------------------------| +glxosd: glxosd (on-screen display) +glxosd: +glxosd: GLXOSD is an on-screen display (OSD)/overlay for OpenGL applications +glxosd: running on Linux with X11. It can show FPS, the temperature of your +glxosd: CPU, and if you have an NVIDIA graphics card (with proprietary +glxosd: drivers), it will also show the temperature of the GPU. Also, it can +glxosd: log frame timings, which is useful for benchmarking. +glxosd: +glxosd: +glxosd: Homepage : http://glxosd.nickguletskii.com/ +glxosd: |