diff options
-rw-r--r-- | graphics/zgv/90-svga.rules | 3 | ||||
-rw-r--r-- | graphics/zgv/README | 13 | ||||
-rw-r--r-- | graphics/zgv/doinst.sh | 17 | ||||
-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 | 84 | ||||
-rw-r--r-- | graphics/zgv/zgv.info | 8 |
9 files changed, 230 insertions, 0 deletions
diff --git a/graphics/zgv/90-svga.rules b/graphics/zgv/90-svga.rules new file mode 100644 index 0000000000000..28d882cab100e --- /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 0000000000000..e4da8c44bae1b --- /dev/null +++ b/graphics/zgv/README @@ -0,0 +1,13 @@ +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 further information see zgvs manpage, info files and +/usr/doc/zgv-5.9/SECURITY. diff --git a/graphics/zgv/doinst.sh b/graphics/zgv/doinst.sh new file mode 100644 index 0000000000000..5a43d6fd5225f --- /dev/null +++ b/graphics/zgv/doinst.sh @@ -0,0 +1,17 @@ +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 0000000000000..6188e6ebc1e79 --- /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 0000000000000..075c8c851091c --- /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 0000000000000..5f55f4a6a69ad --- /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=-O2 -Wall -fomit-frame-pointer -finline-functions $(SLKCFLAGS) + # + # 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 0000000000000..9ff97178bea3c --- /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 0000000000000..7b3ec701c1f49 --- /dev/null +++ b/graphics/zgv/zgv.SlackBuild @@ -0,0 +1,84 @@ +#!/bin/sh + +# Slackware build script for zgv + +# (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 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +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" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +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 . +chmod -R u+w,go+r-w,a-s . + +# 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/etc/udev/rules.d +cat $CWD/90-svga.rules > $PKG/etc/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.tgz diff --git a/graphics/zgv/zgv.info b/graphics/zgv/zgv.info new file mode 100644 index 0000000000000..581244d0f35fa --- /dev/null +++ b/graphics/zgv/zgv.info @@ -0,0 +1,8 @@ +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" +MAINTAINER="Michael Wagner" +EMAIL="lapinours@web.de" +APPROVED="rworkman" |