diff options
author | Eugene Suter <easuter@gmail.com> | 2010-10-10 20:23:18 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-10-10 20:23:18 -0500 |
commit | 644ba9389a38fb13e617d765268c29224af7db21 (patch) | |
tree | 9f9974aaefc60b9c7304a7e1f2622ae7b0d685c2 | |
parent | cb4c0c65e2a495829a705b01907f3c6c89a7f813 (diff) |
desktop/i3status: Added (status line generator for dzen2 / xmobar)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
-rw-r--r-- | desktop/i3status/README | 11 | ||||
-rw-r--r-- | desktop/i3status/doinst.sh | 15 | ||||
-rw-r--r-- | desktop/i3status/i3status.SlackBuild | 79 | ||||
-rw-r--r-- | desktop/i3status/i3status.info | 10 | ||||
-rw-r--r-- | desktop/i3status/slack-desc | 19 |
5 files changed, 134 insertions, 0 deletions
diff --git a/desktop/i3status/README b/desktop/i3status/README new file mode 100644 index 000000000000..4504c6dbbd13 --- /dev/null +++ b/desktop/i3status/README @@ -0,0 +1,11 @@ +i3status - status line generator (for dzen2 and xmobar) + +i3status is a small program (less than 1000 SLOC) for generating a +status bar for dzen2, xmobar, or similar programs. It is designed +to be very efficient by issuing a very small number of system calls, +as one generally wants to update such a status line every second. +This ensures that even under high load, your status bar is updated +correctly. Also, it saves a bit of energy by not hogging your CPU +as much as spawning the corresponding amount of shell commands would. + +This requires confuse and dzen2. diff --git a/desktop/i3status/doinst.sh b/desktop/i3status/doinst.sh new file mode 100644 index 000000000000..04630cd0a7d0 --- /dev/null +++ b/desktop/i3status/doinst.sh @@ -0,0 +1,15 @@ +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/i3status.conf.new + diff --git a/desktop/i3status/i3status.SlackBuild b/desktop/i3status/i3status.SlackBuild new file mode 100644 index 000000000000..dffbf384003b --- /dev/null +++ b/desktop/i3status/i3status.SlackBuild @@ -0,0 +1,79 @@ +#!/bin/sh + +# Slackware build script for i3status + +# Written by Eugene Suter (easuter@gmail.com) + +PRGNAM=i3status +VERSION=${VERSION:-2.1} +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 -e # Exit on most errors + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +CFLAGS="$SLKCFLAGS" \ +LDFLAGS="-lm" \ +make +make install DESTDIR=$PKG + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +# Don't clobber the config file +mv $PKG/etc/i3status.conf $PKG/etc/i3status.conf.new + +mv $PKG/usr/share/man $PKG/usr/ +rmdir $PKG/usr/share +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 LICENSE $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/desktop/i3status/i3status.info b/desktop/i3status/i3status.info new file mode 100644 index 000000000000..acf0218acec1 --- /dev/null +++ b/desktop/i3status/i3status.info @@ -0,0 +1,10 @@ +PRGNAM="i3status" +VERSION="2.1" +HOMEPAGE="http://i3.zekjur.net/i3status/" +DOWNLOAD="http://i3.zekjur.net/i3status/i3status-2.1.tar.bz2" +MD5SUM="712aba3f5e9f235b65bff51129d8eb04" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Eugene Suter" +EMAIL="easuter@gmail.com" +APPROVED="rworkman" diff --git a/desktop/i3status/slack-desc b/desktop/i3status/slack-desc new file mode 100644 index 000000000000..7e6094cb8204 --- /dev/null +++ b/desktop/i3status/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 ':'. + + |-----handy-ruler------------------------------------------------------| +i3status: i3status (status line generator for dzen2 and xmobar) +i3status: +i3status: i3status is a small program (less than 1000 SLOC) for generating a +i3status: status bar for dzen2, xmobar, or similar programs. It is designed +i3status: to be very efficient by issuing a very small number of system calls, +i3status: as one generally wants to update such a status line every second. +i3status: This ensures that even under high load, your status bar is updated +i3status: correctly. Also, it saves a bit of energy by not hogging your CPU +i3status: as much as spawning the corresponding amount of shell commands would. +i3status: +i3status: Website: http://i3.zekjur.net/i3status/ |