diff options
Diffstat (limited to 'office/minidjvu')
-rw-r--r-- | office/minidjvu/README | 9 | ||||
-rw-r--r-- | office/minidjvu/minidjvu.SlackBuild | 99 | ||||
-rw-r--r-- | office/minidjvu/minidjvu.info | 10 | ||||
-rw-r--r-- | office/minidjvu/minidjvu.patch | 66 | ||||
-rw-r--r-- | office/minidjvu/slack-desc | 19 |
5 files changed, 203 insertions, 0 deletions
diff --git a/office/minidjvu/README b/office/minidjvu/README new file mode 100644 index 0000000000..c61205d059 --- /dev/null +++ b/office/minidjvu/README @@ -0,0 +1,9 @@ +Minidjvu is a command line utility which encodes and decodes single page +black-and-white DjVu files, and can compress multiple pages, taking advantage +from similarities between pages. + +Supported bitmap formats are PBM, Windows BMP, and TIFF (through libtiff). + +Minidjvu is based on DjVuLibre, which is the primary DjVu support library. +Minidjvu is not going to support all DjVu functionality; the idea is rather to +take the black-and-white part (also called JB2) and experiment with it. diff --git a/office/minidjvu/minidjvu.SlackBuild b/office/minidjvu/minidjvu.SlackBuild new file mode 100644 index 0000000000..47ccb4982c --- /dev/null +++ b/office/minidjvu/minidjvu.SlackBuild @@ -0,0 +1,99 @@ +#!/bin/sh + +# Slackware build script for minidjvu + +# Copyright 2015, Alexander Verbovetsky, Moscow, Russia +# 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=minidjvu +VERSION=${VERSION:-0.8.svn.2010.05.06} +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 -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM\_$VERSION.orig.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +patch -p1 < $CWD/minidjvu.patch + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --enable-static=no \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a COPYING INSTALL NEWS README $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/office/minidjvu/minidjvu.info b/office/minidjvu/minidjvu.info new file mode 100644 index 0000000000..e611279858 --- /dev/null +++ b/office/minidjvu/minidjvu.info @@ -0,0 +1,10 @@ +PRGNAM="minidjvu" +VERSION="0.8.svn.2010.05.06" +HOMEPAGE="http://minidjvu.sourceforge.net" +DOWNLOAD="http://ftp.ubuntu.com/ubuntu/pool/universe/m/minidjvu/minidjvu_0.8.svn.2010.05.06.orig.tar.gz" +MD5SUM="c29f5c86267824f6c9047f2759a4ad5f" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Alexander Verbovetsky" +EMAIL="alik@ejik.org" diff --git a/office/minidjvu/minidjvu.patch b/office/minidjvu/minidjvu.patch new file mode 100644 index 0000000000..fc3111422b --- /dev/null +++ b/office/minidjvu/minidjvu.patch @@ -0,0 +1,66 @@ +diff -Naur minidjvu-0.8.svn.2010.05.06.orig/include/minidjvu/alg/smooth.h minidjvu-0.8.svn.2010.05.06/include/minidjvu/alg/smooth.h +--- minidjvu-0.8.svn.2010.05.06.orig/include/minidjvu/alg/smooth.h 2010-08-02 17:15:58.000000000 +0400 ++++ minidjvu-0.8.svn.2010.05.06/include/minidjvu/alg/smooth.h 2015-12-02 03:12:43.000000000 +0300 +@@ -4,7 +4,7 @@ + + + /* +- * `smooth' is applied to a bitmap even before it's splitted. ++ * `smooth' is applied to a bitmap even before it's split. + * + * Right now, the algorithm flips pixels which are surrounded + * by at least 3 of 4 neighboring pixels of another color. +diff -Naur minidjvu-0.8.svn.2010.05.06.orig/Makefile.in minidjvu-0.8.svn.2010.05.06/Makefile.in +--- minidjvu-0.8.svn.2010.05.06.orig/Makefile.in 2010-08-02 17:15:58.000000000 +0400 ++++ minidjvu-0.8.svn.2010.05.06/Makefile.in 2015-12-02 02:18:36.000000000 +0300 +@@ -8,7 +8,7 @@ + manpage:=@PACKAGE_NAME@ + + DOCDIR:=doc +-MANDIR:=$(prefix)/share/man/man1 ++MANDIR:=$(prefix)/man/man1 + INCLUDEDIR:=$(prefix)/include + SUBDIRS:=src \ + po \ +@@ -71,7 +71,7 @@ + ${GZIP} -nf -9 ${DESTDIR}$(MANDIR)/$(manpage).1 + for dir in $(DOCDIR)/*/; do \ + if [ -f $${dir}$(manpage).1 ]; then \ +- LOCMANDIR=${DESTDIR}$(prefix)/share/man$${dir#$(DOCDIR)}/man1 &&\ ++ LOCMANDIR=${DESTDIR}$(prefix)/man$${dir#$(DOCDIR)}/man1 &&\ + ${INSTALL} -d $${LOCMANDIR} &&\ + ${INSTALL_DATA} $${dir}$(manpage).1 $${LOCMANDIR} && \ + ${GZIP} -nf -9 $${LOCMANDIR}/$(manpage).1; \ +@@ -91,7 +91,7 @@ + ${RM} ${DESTDIR}$(MANDIR)/$(manpage).1.gz + for dir in $(DOCDIR)/*/; do \ + if [ -f $${dir}$(manpage).1 ]; then \ +- LOCMANDIR=${DESTDIR}$(prefix)/share/man$${dir#$(DOCDIR)}/man1 &&\ ++ LOCMANDIR=${DESTDIR}$(prefix)/man$${dir#$(DOCDIR)}/man1 &&\ + ${RM} $${LOCMANDIR}/$(manpage).1.gz; \ + fi; \ + done +diff -Naur minidjvu-0.8.svn.2010.05.06.orig/po/ru.po minidjvu-0.8.svn.2010.05.06/po/ru.po +--- minidjvu-0.8.svn.2010.05.06.orig/po/ru.po 2010-08-02 17:15:58.000000000 +0400 ++++ minidjvu-0.8.svn.2010.05.06/po/ru.po 2015-12-02 03:12:43.000000000 +0300 +@@ -239,7 +239,7 @@ + + #: minidjvu.c:361 + #, c-format +-msgid "the splitted image has %d pieces\n" ++msgid "the split image has %d pieces\n" + msgstr "после разбиения картинка состоит из %d участков\n" + + #: minidjvu.c:366 +diff -Naur minidjvu-0.8.svn.2010.05.06.orig/tools/minidjvu.c minidjvu-0.8.svn.2010.05.06/tools/minidjvu.c +--- minidjvu-0.8.svn.2010.05.06.orig/tools/minidjvu.c 2010-08-02 17:15:58.000000000 +0400 ++++ minidjvu-0.8.svn.2010.05.06/tools/minidjvu.c 2015-12-02 03:12:43.000000000 +0300 +@@ -360,7 +360,7 @@ + mdjvu_bitmap_destroy(bitmap); + if (verbose) + { +- printf(_("the splitted image has %d pieces\n"), ++ printf(_("the split image has %d pieces\n"), + mdjvu_image_get_blit_count(image)); + } + if (clean) diff --git a/office/minidjvu/slack-desc b/office/minidjvu/slack-desc new file mode 100644 index 0000000000..0cfa52cc0d --- /dev/null +++ b/office/minidjvu/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 ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +minidjvu: minidjvu (bitonal DjVu encoder/decoder) +minidjvu: +minidjvu: Minidjvu is a command line utility which encodes and decodes single +minidjvu: page black-and-white DjVu files, and can compress multiple pages, +minidjvu: taking advantage from similarities between pages. Supported bitmap +minidjvu: formats are PBM, Windows BMP, and TIFF (through libtiff). Minidjvu +minidjvu: is based on DjVuLibre, which is the primary DjVu support library. +minidjvu: Minidjvu is not going to support all DjVu functionality; the idea is +minidjvu: rather to take the black-and-white part (also called JB2) and +minidjvu: experiment with it. +minidjvu: Homepage: http://minidjvu.sourceforge.net |