diff options
Diffstat (limited to 'office/coolreader/coolreader.SlackBuild')
-rw-r--r-- | office/coolreader/coolreader.SlackBuild | 30 |
1 files changed, 23 insertions, 7 deletions
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 |