diff options
Diffstat (limited to 'graphics/tesseract/tesseract.SlackBuild')
-rw-r--r-- | graphics/tesseract/tesseract.SlackBuild | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/graphics/tesseract/tesseract.SlackBuild b/graphics/tesseract/tesseract.SlackBuild index 9c4bf01262..e822d7d170 100644 --- a/graphics/tesseract/tesseract.SlackBuild +++ b/graphics/tesseract/tesseract.SlackBuild @@ -1,9 +1,9 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for tesseract # Copyright 2009-2010 Pierre Cazenave <pwcazenave {at} gmail [dot] com> # Copyright 2013-2015 LukenShiro, Italy -# Copyright 2019 Logan Rathbone <poprocks@gmail.com> +# Copyright 2019-2024 Logan Rathbone <poprocks@gmail.com> # # All rights reserved. # @@ -32,26 +32,36 @@ # Thanks to S+*n_Pe*rm*n for a bug report from OCRopus. # Modified by Willy Sudiarto Raharjo <willysr@slackware-id.org> +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=tesseract -VERSION=${VERSION:-4.1.1} +VERSION=${VERSION:-5.3.4} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac fi -CWD=$(pwd) +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + 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" @@ -119,9 +129,8 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr 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 -# Uncomment when migrating to 15.0: -## Don't ship .la files: -#rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la +# Don't ship .la files: +rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCFILES \ @@ -133,4 +142,4 @@ 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} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |