diff options
author | B. Watson <yalhcru@gmail.com> | 2020-01-26 19:33:18 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2020-02-01 09:00:29 +0700 |
commit | e25f38763ae612417b26c47d06e1539a93d92d76 (patch) | |
tree | afc23bcd06542ae537b295406e36b1b75abd306f /office/coolreader | |
parent | 5c6cc94a480443696061fc9f47b8c89d3e6b879a (diff) | |
download | slackbuilds-e25f38763ae612417b26c47d06e1539a93d92d76.tar.gz |
office/coolreader: New maintainer.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'office/coolreader')
-rw-r--r-- | office/coolreader/README | 7 | ||||
-rw-r--r-- | office/coolreader/coolreader.SlackBuild | 30 | ||||
-rw-r--r-- | office/coolreader/coolreader.info | 4 | ||||
-rw-r--r-- | office/coolreader/inifile.diff | 21 | ||||
-rw-r--r-- | office/coolreader/slack-desc | 6 |
5 files changed, 56 insertions, 12 deletions
diff --git a/office/coolreader/README b/office/coolreader/README index 1eb527ec91..e12c827494 100644 --- a/office/coolreader/README +++ b/office/coolreader/README @@ -1 +1,8 @@ +coolreader (e-book reader) + CoolReader is an e-book reader for various platforms. + +Supported file formats include plain text, HTML, RTF, Microsoft Word +(.doc), Palm Pilot (.prc, .pdb, .pml, .mobi), FB2, and EPUB. + +Note: the executable and man page are called "cr3", not "coolreader". diff --git a/office/coolreader/coolreader.SlackBuild b/office/coolreader/coolreader.SlackBuild index d4cd5b4820..ce30ee6681 100644 --- a/office/coolreader/coolreader.SlackBuild +++ b/office/coolreader/coolreader.SlackBuild @@ -2,7 +2,8 @@ # Slackware build script for CoolReader -# Copyright 2011-2012 Fridrich von Stauffenberg <cancellor2@gmail.com> +# Copyright 2011-2012 Fridrich von Stauffenberg <email removed> +# Copyright 2020 B. Watson <yalhcru@gmail.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,9 +23,17 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20200126 bkw, BUILD=2: +# - take over maintenance +# - i486 => i586 +# - make .desktop file validate +# - fix documetn => document typo +# - add supported filetypes to README and slack-desc +# - save/load settings (.ini file) to ~/.cr3, not /usr/share/cr3. + PRGNAM=coolreader VERSION=${VERSION:-3.0.56} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} ORIG_PRGNAM=cr3 @@ -34,7 +43,7 @@ ORIG_FILENAME=${ORIG_PRGNAM}_$VERSION.orig.tar.gz if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -45,8 +54,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -69,6 +78,12 @@ tar xvf $CWD/$ORIG_FILENAME cd $ORIG_DIRNAME chown -R root:root . +# Fix upstream typo +sed -i 's,documetn,document,g' cr3qt/src/*.ui cr3qt/src/i18n/*.ts + +# Don't try to load/save .ini file from /usr/share +patch -p1 < $CWD/inifile.diff + mkdir -p build cd build cmake \ @@ -85,13 +100,14 @@ make VERBOSE=1 make install DESTDIR=$PKG cd .. -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 +strip $PKG/usr/bin/$ORIG_PRGNAM mkdir -p $PKG/usr/man mv $PKG/usr/share/man/* $PKG/usr/man rm -rf $PKG/usr/share/man +sed -i '/Icon/s|\.png||' $PKG/usr/share/applications/$ORIG_PRGNAM.desktop + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION mv $PKG/usr/share/doc/$ORIG_PRGNAM/* $PKG/usr/doc/$PRGNAM-$VERSION rm -rf $PKG/usr/share/doc diff --git a/office/coolreader/coolreader.info b/office/coolreader/coolreader.info index c5b6d8c40f..2a462222f6 100644 --- a/office/coolreader/coolreader.info +++ b/office/coolreader/coolreader.info @@ -6,5 +6,5 @@ MD5SUM="cc221a608a1b5fea2db5a519c14eeb39" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" -MAINTAINER="orphaned - no maintainer" -EMAIL="nobody@nowhere.com" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" diff --git a/office/coolreader/inifile.diff b/office/coolreader/inifile.diff new file mode 100644 index 0000000000..9290599e69 --- /dev/null +++ b/office/coolreader/inifile.diff @@ -0,0 +1,21 @@ +diff -Naur cr3.0.56-7/cr3qt/src/mainwindow.cpp cr3.0.56-7.patched/cr3qt/src/mainwindow.cpp +--- cr3.0.56-7/cr3qt/src/mainwindow.cpp 2012-03-21 01:39:19.000000000 -0400 ++++ cr3.0.56-7.patched/cr3qt/src/mainwindow.cpp 2020-01-26 19:26:09.590595122 -0500 +@@ -79,7 +79,6 @@ + QString bookmarksDir = homeDir + "bookmarks"; + QString histFile = exeDir + "cr3hist.bmk"; + QString histFile2 = homeDir + "cr3hist.bmk"; +- QString iniFile2 = exeDir + "cr3.ini"; + QString iniFile = homeDir + "cr3.ini"; + QString cssFile = homeDir + "fb2.css"; + QString cssFile2 = exeDir + "fb2.css"; +@@ -91,8 +90,7 @@ + + ldomDocCache::init( qt2cr( cacheDir ), DOC_CACHE_SIZE ); + ui->view->setPropsChangeCallback( this ); +- if ( !ui->view->loadSettings( iniFile ) ) +- ui->view->loadSettings( iniFile2 ); ++ ui->view->loadSettings( iniFile ); + if ( !ui->view->loadHistory( histFile ) ) + ui->view->loadHistory( histFile2 ); + if ( !ui->view->loadCSS( cssFile ) ) diff --git a/office/coolreader/slack-desc b/office/coolreader/slack-desc index 0983516646..ed6f84a707 100644 --- a/office/coolreader/slack-desc +++ b/office/coolreader/slack-desc @@ -10,10 +10,10 @@ coolreader: coolreader (e-book reader) coolreader: coolreader: CoolReader is an e-book reader for various platforms. coolreader: -coolreader: Homepage: https://sourceforge.net/projects/crengine/ -coolreader: -coolreader: +coolreader: Supported file formats include plain text, HTML, RTF, Microsoft Word +coolreader: (.doc), Palm Pilot (.prc, .pdb, .pml, .mobi), FB2, and EPUB. coolreader: +coolreader: Homepage: https://sourceforge.net/projects/crengine/ coolreader: coolreader: coolreader: |