summaryrefslogtreecommitdiff
path: root/graphics/viewnior/viewnior.SlackBuild
diff options
context:
space:
mode:
authorŠime Ramov <s@ramov.com>2010-04-22 18:46:09 -0500
committerErik Hanson <erik@slackbuilds.org>2010-05-15 10:50:22 +0200
commitf637e44de4687f7cc23cad4657530295fb3c26f2 (patch)
tree6a4d660d0ae82b86b8216c45bf3aa102e1a8c785 /graphics/viewnior/viewnior.SlackBuild
parent33917ef466f708aa005d32615ce1efff5ea1921a (diff)
downloadslackbuilds-f637e44de4687f7cc23cad4657530295fb3c26f2.tar.gz
graphics/viewnior: Added.
Viewnior is an image viewer program. Created to be simple, fast and elegant. Thanks to Šime Ramov
Diffstat (limited to 'graphics/viewnior/viewnior.SlackBuild')
-rwxr-xr-xgraphics/viewnior/viewnior.SlackBuild70
1 files changed, 70 insertions, 0 deletions
diff --git a/graphics/viewnior/viewnior.SlackBuild b/graphics/viewnior/viewnior.SlackBuild
new file mode 100755
index 0000000000..98421e8f8e
--- /dev/null
+++ b/graphics/viewnior/viewnior.SlackBuild
@@ -0,0 +1,70 @@
+#!/bin/sh
+
+# Slackware build script for Viewnior
+# Written by Šime Ramov <s@ramov.com>
+
+PRGNAM=viewnior
+VERSION=${VERSION:-1.0}
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+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"
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xzvf $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 {} \;
+
+# Add '--enable-wallpaper' to the list of configure options if you
+# want the ability to set an image as wallpaper. Please note this only
+# works in GNOME environment and requires GConf, which in turn
+# requires ORBit2.
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG
+
+find $PKG | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+
+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
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}