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.SlackBuild34
1 files changed, 21 insertions, 13 deletions
diff --git a/office/gocr/gocr.SlackBuild b/office/gocr/gocr.SlackBuild
index d1782ba84b9a..26d3baa48be2 100644
--- a/office/gocr/gocr.SlackBuild
+++ b/office/gocr/gocr.SlackBuild
@@ -1,9 +1,10 @@
#!/bin/sh
# Slackware Package Build Script for GOCR
+
# Home Page http://jocr.sourceforge.net/index.html
-# Copyright (c) 2008, Nishant Limbachia (nishant@mnspace.net)
+# Copyright (c) 2008-2009, Nishant Limbachia, Hoffman Est, IL, USA (nishant@mnspace.net)
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,7 +26,7 @@
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=gocr
-VERSION=0.47
+VERSION=0.48
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -37,32 +38,36 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
fi
set -e
-rm -fr $TMP/$PRGNAM-$VERSION $PKG
+rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
+rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $TMP/$PRGNAM-$VERSION
-chown -R root.root .
-find . \
- \( -perm 664 -o -perm 666 -o -perm 600 -o -perm 440 -o -perm 444 -o -perm 400 \) \
- -exec chmod 644 {} \;
+cd $PRGNAM-$VERSION
+chown -R root:root .
find . \
- \( -perm 777 -o -perm 755 -o -perm 711 -o -perm 700 -o -perm 555 -o -perm 511 -o -perm 500 \) \
- -exec chmod 755 {} \;
+ \( -perm 777 -o -perm 775 -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 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--exec-prefix=/usr \
--sysconfdir=/etc \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
--localstatedir=/var \
--mandir=/usr/man \
--build=$ARCH-slackware-linux
@@ -77,10 +82,13 @@ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
AUTHORS BUGS CREDITS INSTALL README* HISTORY TODO \
doc/*.txt doc/*.html $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
)
( cd $PKG/usr/man || exit 1
@@ -92,4 +100,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.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}