office/kchmviewer-qt: Added (a CHM viewer)

Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
This commit is contained in:
Fridrich von Stauffenberg 2012-04-29 20:57:32 -04:00 committed by Erik Hanson
parent b9710bbd32
commit aa5807e381
5 changed files with 130 additions and 0 deletions

View file

@ -0,0 +1,16 @@
KchmViewer is a CHM (MS HTML help file format) viewer written in
C++. Unlike most existing CHM viewers for Unix, it uses the
Trolltech Qt widget library and does not depend on KDE or Gnome.
However, it may be compiled with full KDE support including KDE
widgets and KIO/KHTML. This script builds Qt-only version.
The main advantage of KchmViewer is extra support for non-English
languages. Unlike other viewers, KchmViewer in most cases is able
to detect help file encoding, correctly shows tables of contents of
Russian, Korean, Chinese and Japanese help files, and does correct
search in non-English help files (search for MBCS languages -
ja/ko/ch is still in progress).
KchmViewer is written by George Yunaev (see the contacts page
for details), and is licensed under the GNU GPL license. It uses
chmlib and some ideas and code from xhcm.

View file

@ -0,0 +1,4 @@
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi

View file

@ -0,0 +1,81 @@
#!/bin/bash
# Slackware build script for KchmViewer (Qt-only version)
# Copyright 2012 Fridrich von Stauffenberg <cancellor2@gmail.com>
# 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=kchmviewer-qt
VERSION=${VERSION:-6.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
ORIG_PRGNAM=${PRGNAM%-qt}
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}
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $ORIG_PRGNAM-$VERSION
tar xvf $CWD/$ORIG_PRGNAM-$VERSION.tar.gz
cd $ORIG_PRGNAM-$VERSION
chown -R root:root .
sed -i "s/$ORIG_PRGNAM/$PRGNAM/g;
/^Categories/s/KDE;//;
/^Name/s/$/ (Qt-only)/" packages/$ORIG_PRGNAM.desktop
qmake $ORIG_PRGNAM.pro
make
mkdir -p $PKG/usr/bin
cp -a bin/$ORIG_PRGNAM $PKG/usr/bin/$PRGNAM
mkdir -p $PKG/usr/share/{applications,pixmaps}
cp -a packages/$ORIG_PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM.desktop
cp -a packages/$ORIG_PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
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
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a COPYING ChangeLog DBUS-bindings FAQ 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
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

View file

@ -0,0 +1,10 @@
PRGNAM="kchmviewer-qt"
VERSION="6.0"
HOMEPAGE="http://www.kchmviewer.net"
DOWNLOAD="http://downloads.sourceforge.net/kchmviewer/kchmviewer-6.0.tar.gz"
MD5SUM="940fdeeb5f50cdd0d0611f7a13e003f9"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="Fridrich von Stauffenberg"
EMAIL="cancellor2@gmail.com"
APPROVED="dsomero"

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------------------------------------------------------|
kchmviewer-qt: KchmViewer (a CHM viewer)
kchmviewer-qt:
kchmviewer-qt: KchmViewer is a CHM (MS HTML help file format) viewer written in
kchmviewer-qt: C++. Unlike most existing CHM viewers for Unix, it uses the
kchmviewer-qt: Trolltech Qt widget library and does not depend on KDE or Gnome.
kchmviewer-qt: However, it may be compiled with full KDE support, including KDE
kchmviewer-qt: widgets and KIO/KHTML. This is Qt-only version.
kchmviewer-qt:
kchmviewer-qt: Homepage: http://kchmviewer.sourceforge.net
kchmviewer-qt:
kchmviewer-qt: