diff options
author | Luis Henrique <lmello.009@gmail.com> | 2010-06-17 06:44:14 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-06-17 14:43:58 -0500 |
commit | 02fb87d8e6378588ba463f4d2ae83ae7cfe68f80 (patch) | |
tree | 16644591280dd607b28b01b6d1228dfe2c1e2ef4 | |
parent | 0b0004403cba1504a5c1c4e67837d2053d6d00eb (diff) | |
download | slackbuilds-02fb87d8e6378588ba463f4d2ae83ae7cfe68f80.tar.gz |
graphics/zgv: Added (svgalib image viewer)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
-rw-r--r-- | graphics/zgv/90-svga.rules | 3 | ||||
-rw-r--r-- | graphics/zgv/README | 12 | ||||
-rw-r--r-- | graphics/zgv/doinst.sh | 18 | ||||
-rw-r--r-- | graphics/zgv/patches/Makefile.doc.diff | 10 | ||||
-rw-r--r-- | graphics/zgv/patches/Makefile.src.diff | 19 | ||||
-rw-r--r-- | graphics/zgv/patches/config.mk.diff | 57 | ||||
-rw-r--r-- | graphics/zgv/slack-desc | 19 | ||||
-rw-r--r-- | graphics/zgv/zgv.SlackBuild | 107 | ||||
-rw-r--r-- | graphics/zgv/zgv.info | 10 |
9 files changed, 255 insertions, 0 deletions
diff --git a/graphics/zgv/90-svga.rules b/graphics/zgv/90-svga.rules new file mode 100644 index 0000000000..28d882cab1 --- /dev/null +++ b/graphics/zgv/90-svga.rules @@ -0,0 +1,3 @@ +# This file was installed by the zgv package +# Any changes will be overwritten on any upgrade to this package +KERNEL=="svga*", MODE="0660", GROUP="video" diff --git a/graphics/zgv/README b/graphics/zgv/README new file mode 100644 index 0000000000..2fb6a4e654 --- /dev/null +++ b/graphics/zgv/README @@ -0,0 +1,12 @@ +zgv (svgalib picture viewer) + +zgv is a picture viewer with a thumbnail-based file selector. +It supports most popular formats and allows panning and fit-to-screen +methods of viewing, slideshows, scaling, gamma adjustment, etc. + +By default, the zgv binary is installed suid root, but we have patched +the build to not do this. Instead, we install a udev rules file that +should allow non-root users who belong to the "video" group to use zgv. +Note that you will have to "modprobe svgalib_helper" prior to using zgv. + +For more information, see zgvs manpage, info files and /usr/doc/zgv-*/SECURITY. diff --git a/graphics/zgv/doinst.sh b/graphics/zgv/doinst.sh new file mode 100644 index 0000000000..14e052a2d5 --- /dev/null +++ b/graphics/zgv/doinst.sh @@ -0,0 +1,18 @@ +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/zgv.conf.new + +if [ -x usr/bin/install-info ]; then + chroot . /usr/bin/install-info --info-dir=/usr/info /usr/info/zgv.gz 2> /dev/null +fi + diff --git a/graphics/zgv/patches/Makefile.doc.diff b/graphics/zgv/patches/Makefile.doc.diff new file mode 100644 index 0000000000..6188e6ebc1 --- /dev/null +++ b/graphics/zgv/patches/Makefile.doc.diff @@ -0,0 +1,10 @@ +--- doc/Makefile~ 2007-10-06 08:34:47.000000000 +0200 ++++ doc/Makefile 2007-10-06 08:35:21.000000000 +0200 +@@ -43,7 +43,6 @@ + else + install: ../src/install-info + endif +- $(RM) /usr/share/man/man1/zgv.1* /usr/share/info/zgv* + install -m 644 zgv.1 $(MANDIR) + install -m 644 zgv zgv-? $(INFODIR) + # Update info `dir' file. diff --git a/graphics/zgv/patches/Makefile.src.diff b/graphics/zgv/patches/Makefile.src.diff new file mode 100644 index 0000000000..075c8c8510 --- /dev/null +++ b/graphics/zgv/patches/Makefile.src.diff @@ -0,0 +1,19 @@ +--- src/Makefile~ 2007-10-06 08:31:49.000000000 +0200 ++++ src/Makefile 2007-10-06 08:33:45.000000000 +0200 +@@ -61,14 +61,10 @@ + # + install: all + @if [ "$(BACKEND)" = SVGALIB ]; then \ +- echo $(RM) /usr/bin/zgv; \ +- $(RM) /usr/bin/zgv; \ +- echo install -m 4755 -o root -g root -s zgv $(BINDIR); \ +- install -m 4755 -o root -g root -s zgv $(BINDIR); \ ++ echo install -m 0755 -o root -g root -s zgv $(BINDIR); \ ++ install -m 0755 -o root -g root -s zgv $(BINDIR); \ + fi + @if [ "$(BACKEND)" = SDL ]; then \ +- echo $(RM) /usr/bin/zgv-sdl; \ +- $(RM) /usr/bin/zgv-sdl; \ + echo install -m 755 -s zgv $(BINDIR)/zgv-sdl; \ + install -m 755 -s zgv $(BINDIR)/zgv-sdl; \ + fi diff --git a/graphics/zgv/patches/config.mk.diff b/graphics/zgv/patches/config.mk.diff new file mode 100644 index 0000000000..575ccb5d51 --- /dev/null +++ b/graphics/zgv/patches/config.mk.diff @@ -0,0 +1,57 @@ +--- config.mk~ 2007-10-06 08:28:56.000000000 +0200 ++++ config.mk 2007-10-06 08:31:02.000000000 +0200 +@@ -8,7 +8,7 @@ + # This is likely to be what you'll want for most systems: + # + CC=gcc +-CFLAGS=-O2 -Wall -fomit-frame-pointer -finline-functions ++CFLAGS=$(SLKCFLAGS) -Wall -fomit-frame-pointer -finline-functions + # + # If you're brave enough to try compiling zgv on a non-x86 system :-), + # this might be a better bet: +@@ -37,7 +37,7 @@ + # MANDIR to directory for man page. + # Usually it will be simpler to just set PREFIX. + # +-PREFIX=/usr/local ++PREFIX=/usr + + # In theory it would be nice to put the info file and man page under + # /usr/local/share. However, it's not clear if this is widely +@@ -52,14 +52,14 @@ + # + #SHARE_INFIX=/share + +-BINDIR=$(PREFIX)/bin +-INFODIR=$(PREFIX)$(SHARE_INFIX)/info +-MANDIR=$(PREFIX)$(SHARE_INFIX)/man/man1 ++BINDIR=$(DESTDIR)/$(PREFIX)/bin ++INFODIR=$(DESTDIR)/$(PREFIX)$(SHARE_INFIX)/info ++MANDIR=$(DESTDIR)/$(PREFIX)$(SHARE_INFIX)/man/man1 + + # Set the location/filename of the system-wide configuration file. You + # may prefer to have this under /etc, for example. + # +-RCFILE=$(PREFIX)/etc/zgv.conf ++RCFILE=$(DESTDIR)/etc/zgv.conf + + + # Normally `make install' will update your `dir' file (in INFODIR), +@@ -73,7 +73,7 @@ + # + # If you don't know what to do, leave it as-is. + # +-#INFO_DIR_UPDATE=no ++INFO_DIR_UPDATE=no + + + # ------------------- Format-related options ---------------------- +@@ -91,7 +91,7 @@ + # colours will be recognised, which will mean many XPMs won't be + # readable. This setting should be ok. + # +-RGB_DB=/usr/X11R6/lib/X11/rgb.txt ++RGB_DB=/usr/share/X11/rgb.txt + + # Finally, an option for `make dvi' in the `doc' directory. You only need + # worry about what this is set to if you plan to make a printed manual. diff --git a/graphics/zgv/slack-desc b/graphics/zgv/slack-desc new file mode 100644 index 0000000000..9ff97178be --- /dev/null +++ b/graphics/zgv/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------------------------------------------------------| +zgv: zgv (svgalib picture viewer) +zgv: +zgv: zgv is a picture viewer with a thumbnail-based file selector. +zgv: It supports most popular formats and allows panning and fit-to-screen +zgv: methods of viewing, slideshows, scaling, gamma adjustment, etc. +zgv: +zgv: Homepage: http://www.svgalib.org/rus/zgv +zgv: +zgv: +zgv: +zgv: diff --git a/graphics/zgv/zgv.SlackBuild b/graphics/zgv/zgv.SlackBuild new file mode 100644 index 0000000000..90fe1f06f4 --- /dev/null +++ b/graphics/zgv/zgv.SlackBuild @@ -0,0 +1,107 @@ +#!/bin/sh + +# Slackware build script for zgv +# Modified by Luis Henrique <lmello.009@gmail.com> + +# (C) 2007 Michael Wagner <lapinours@web.de> +# 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=zgv +VERSION=5.9 +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + 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} + +DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README* SECURITY TODO" + +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 + +rm -rf $PKG +mkdir -p $TMP $PKG/{etc,usr/{bin,info,man/man1}} $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 {} \; + +# Apply patches +for i in $CWD/patches/*; do + patch -p0 < $i +done + +make SLKCFLAGS="$SLKCFLAGS" +make install DESTDIR=$PKG + +for i in $PKG/usr/man/man1/* $PKG/usr/info/*; do + gzip -9 $i 2> /dev/null +done + +# Install sample config file +cat doc/sample.zgvrc > $PKG/etc/zgv.conf.new + +# Install udev rules file to allow non-root users who are in the +# "video" group to use zgv +mkdir -p $PKG/lib/udev/rules.d +cat $CWD/90-svga.rules > $PKG/lib/udev/rules.d/90-svga.rules + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +chmod 644 $PKG/usr/doc/$PRGNAM-$VERSION/* + +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/graphics/zgv/zgv.info b/graphics/zgv/zgv.info new file mode 100644 index 0000000000..4ab13c759c --- /dev/null +++ b/graphics/zgv/zgv.info @@ -0,0 +1,10 @@ +PRGNAM="zgv" +VERSION="5.9" +HOMEPAGE="http://www.svgalib.org/rus/zgv/" +DOWNLOAD="http://www.svgalib.org/rus/zgv/zgv-5.9.tar.gz" +MD5SUM="d65a434ddeb612f0c488177f873afad2" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Luis Henrique" +EMAIL="lmello.009@gmail.com" +APPROVED="rworkman" |