aboutsummaryrefslogtreecommitdiff
path: root/office/gocr/gocr.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'office/gocr/gocr.SlackBuild')
-rw-r--r--office/gocr/gocr.SlackBuild32
1 files changed, 15 insertions, 17 deletions
diff --git a/office/gocr/gocr.SlackBuild b/office/gocr/gocr.SlackBuild
index 866cae21ef051..7cbed302474a6 100644
--- a/office/gocr/gocr.SlackBuild
+++ b/office/gocr/gocr.SlackBuild
@@ -1,10 +1,9 @@
#!/bin/bash
-# Slackware Package Build Script for GOCR
-# Home Page http://jocr.sourceforge.net/index.html
+# Slackware build script for gocr
# Copyright (c) 2008-2013, Nishant Limbachia, Hoffman Estates, IL, USA
-# <nishant _AT_ mnspace _DOT_ net>
+# Copyright 2023 Johannes Schoepfer, Germany
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -28,7 +27,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM="gocr"
-VERSION=${VERSION:-0.50}
+VERSION=${VERSION:-0.52}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -41,9 +40,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# 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
@@ -77,10 +73,10 @@ tar xvf $CWD/$PRGNAM-$VERSION.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 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+ \( -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 {} +
CFLAGS="$SLKCFLAGS" \
./configure \
@@ -96,17 +92,19 @@ CFLAGS="$SLKCFLAGS" \
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
+
+chmod 644 $PKG/usr/man/man1/$PRGNAM.1
+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 \
- AUTHORS BUGS CREDITS INSTALL README* HISTORY TODO \
+ AUTHORS BUGS CREDITS README* HISTORY TODO \
doc/*.txt doc/*.html $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-
-gzip -9 $PKG/usr/man/man1/$PRGNAM.1
-
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc