aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorBinh Nguyen <binhnguyen@fastmail.fm>2010-08-14 15:42:06 -0400
committerdsomero <xgizzmo@slackbuilds.org>2010-08-14 15:42:06 -0400
commitad71dc81c088e5d004562a4aaa1fea87c1ac58e1 (patch)
tree1319d390c15dd5c538f3bb1903dc3704be03bedc /misc
parent5b744f8e8337c8f12196405eddea5c8bf83320a2 (diff)
misc/fbdump: Added (captures the visible portion of framebuffer)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'misc')
-rw-r--r--misc/fbdump/README8
-rw-r--r--misc/fbdump/fbdump.SlackBuild97
-rw-r--r--misc/fbdump/fbdump.info10
-rw-r--r--misc/fbdump/slack-desc19
4 files changed, 134 insertions, 0 deletions
diff --git a/misc/fbdump/README b/misc/fbdump/README
new file mode 100644
index 000000000000..1840f205929a
--- /dev/null
+++ b/misc/fbdump/README
@@ -0,0 +1,8 @@
+fbdump is a simple tool that captures the contents of the visible portion of
+the Linux framebuffer device and writes it to the standard output as a PPM
+file. In other words, it takes a screenshot of anything running on the
+framebuffer. It currently has fairly complete support for packed-pixel
+framebuffer types and also works with the VGA16 framebuffer driver.
+
+To get a popular image format, issue a command like
+'fbdump | pnmtopng > shot.png'
diff --git a/misc/fbdump/fbdump.SlackBuild b/misc/fbdump/fbdump.SlackBuild
new file mode 100644
index 000000000000..da95bb607a67
--- /dev/null
+++ b/misc/fbdump/fbdump.SlackBuild
@@ -0,0 +1,97 @@
+#!/bin/sh
+
+# Copyright 2010 Binh Nguyen <binhnguyen@fastmail.fm>
+# 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=fbdump
+VERSION=${VERSION:-0.4.2}
+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 $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+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" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --localedir=/usr/share/locale \
+ --build=$ARCH-slackware-linux
+
+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
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README TODO \
+ $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/misc/fbdump/fbdump.info b/misc/fbdump/fbdump.info
new file mode 100644
index 000000000000..1b354ce61be3
--- /dev/null
+++ b/misc/fbdump/fbdump.info
@@ -0,0 +1,10 @@
+PRGNAM="fbdump"
+VERSION="0.4.2"
+HOMEPAGE="http://www.rcdrummond.net/fbdump/"
+DOWNLOAD="http://www.rcdrummond.net/fbdump/fbdump-0.4.2.tar.gz"
+MD5SUM="85ae97c0800a2caf2b04ad7764e3915b"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Binh Nguyen"
+EMAIL="binhnguyen@fastmail.fm"
+APPROVED="dsomero"
diff --git a/misc/fbdump/slack-desc b/misc/fbdump/slack-desc
new file mode 100644
index 000000000000..a1dfaba9e40b
--- /dev/null
+++ b/misc/fbdump/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------------------------------------------------------|
+fbdump: fbdump (captures the visible portion of framebuffer to stdout)
+fbdump:
+fbdump: fbdump is a simple tool that captures the contents of the visible
+fbdump: portion of the Linux framebuffer device and writes it to the standard
+fbdump: output as a PPM file. In other words, it takes a screenshot of
+fbdump: anything running on the framebuffer. It currently has fairly complete
+fbdump: support for packed-pixel framebuffer types and also works with the
+fbdump: VGA16 framebuffer driver.
+fbdump:
+fbdump: Homepage: http://www.rcdrummond.net/fbdump/
+fbdump: