graphics/djvulibre: Added to 12.1 repository

This commit is contained in:
Murat D. Kadirov 2010-05-11 22:53:51 +02:00 committed by David Somero
parent 78c547fcc5
commit d4f52d07a6
5 changed files with 132 additions and 0 deletions

15
graphics/djvulibre/README Normal file
View File

@ -0,0 +1,15 @@
DjVu is a web-centric format and software platform for distributing
documents and images. DjVu can advantageously replace PDF, PS, TIFF,
JPEG, and GIF for distributing scanned documents, digital documents,
or high-resolution pictures. DjVu content downloads faster, displays
and renders faster, looks nicer on a screen, and consume less client
resources than competing formats. DjVu images display instantly and can
be smoothly zoomed and panned with no lengthy re-rendering. DjVu is used
by hundreds of academic, commercial, governmental, and non-commercial
web sites around the world.
DjVuLibre includes a standalone viewer, a browser plug-in (for Mozilla,
Firefox, Konqueror, Netscape, Galeon, and Opera), and command line tools
(decoders, encoders, utilities). DjVuLibre works under Unix with X11.
Requires xdg-utils (also available from SlackBuilds.org).

View File

@ -0,0 +1,86 @@
#!/bin/sh
# Slackware build script for djvulibre
# Written by Murat D. Kadirov <banderols@gmail.com>
PRGNAM=djvulibre
VERSION=${VERSION:-3.5.20}
SUBVERSION=${SUBVERSION:-5}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-2}
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"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION-$SUBVERSION.tar.gz || exit 1
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" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--build=$ARCH-slackware-linux
make || MAKEFLAGS="" make -j1 # djvu doesn't like parallel building :)
make install DESTDIR=$PKG
# This plugin *should* work with Mozilla-based browsers
mv $PKG/usr/lib/netscape $PKG/usr/lib/mozilla
mkdir -p $PKG/usr/share/{applications,pixmaps,mime/packages}
cp $PKG/usr/share/djvu/osi/desktop/djvulibre-mime.xml \
$PKG/usr/share/mime/packages
cp $PKG/usr/share/djvu/djview3/desktop/*.desktop \
$PKG/usr/share/applications
cp $PKG/usr/share/djvu/djview3/desktop/hi32-djview3.png \
$PKG/usr/share/pixmaps/djvulibre-djview3.png
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)
( cd $PKG/usr/man
find . -type f -exec gzip -9 {} \;
for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
)
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a COPYING COPYRIGHT INSTALL NEWS README* TODO doc/ $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.$SUBVERSION-$ARCH-$BUILD$TAG.tgz

View File

@ -0,0 +1,8 @@
PRGNAM="djvulibre"
VERSION="3.5.20-5"
HOMEPAGE="http://djvu.sourceforge.net/"
DOWNLOAD="http://downloads.sourceforge.net/djvu/djvulibre-3.5.20-5.tar.gz"
MD5SUM="33cf30382c0408ac29391d7bebf781b0"
MAINTAINER="Murat D. Kadirov"
EMAIL="banderols@gmail.com"
APPROVED="David Somero,rworkman"

View File

@ -0,0 +1,4 @@
if [ -x /usr/share/djvu/osi/desktop/register-djvu-mime ]; then
/usr/share/djvu/osi/desktop/register-djvu-mime install
fi

View File

@ -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--------------------------------------------|
djvulibre: djvulibre (Open source implementation of DjVu)
djvulibre:
djvulibre: DjVuLibre includes a standalone viewer, a browser plug-in
djvulibre: (for Mozilla, Firefox, Konqueror, Netscape, Galeon, and
djvulibre: Opera), and command line tools (decoders, encoders,
djvulibre: utilities). DjVuLibre works under Unix with X11.
djvulibre:
djvulibre:
djvulibre:
djvulibre:
djvulibre: