summaryrefslogtreecommitdiff
path: root/graphics/ocropus/ocropus.SlackBuild
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2012-09-24 16:47:40 +0200
committerRobby Workman <rworkman@slackbuilds.org>2012-09-24 22:53:33 -0500
commit082f2a17ce2dc138293231d5fa5c8e8ad7781460 (patch)
tree0ed71e2c84103355c3d56344d147c290a61e0892 /graphics/ocropus/ocropus.SlackBuild
parentf1b19d905d62bcb5c02dc1d501b4ab10d5e1032d (diff)
downloadslackbuilds-082f2a17ce2dc138293231d5fa5c8e8ad7781460.tar.gz
graphics/ocropus: Updated for version 0.6_20120920.
Now a python only application Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'graphics/ocropus/ocropus.SlackBuild')
-rw-r--r--graphics/ocropus/ocropus.SlackBuild52
1 files changed, 20 insertions, 32 deletions
diff --git a/graphics/ocropus/ocropus.SlackBuild b/graphics/ocropus/ocropus.SlackBuild
index e8c2ce60b0..b3aa2b7e00 100644
--- a/graphics/ocropus/ocropus.SlackBuild
+++ b/graphics/ocropus/ocropus.SlackBuild
@@ -23,12 +23,11 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=ocropus
-VERSION=${VERSION:-0.3.1}
+VERSION=${VERSION:-0.6_20120920}
+SRCVER=${SRCVER:-20120920}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-DIRVER=${DIRVER:-0.3}
-
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
@@ -61,45 +60,34 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$DIRVER
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$DIRVER
+rm -rf $PRGNAM-$SRCVER
+tar xvf $CWD/$PRGNAM-$SRCVER.tar.?z*
+cd $PRGNAM-$SRCVER
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-# Debian patch to fix hardcoded /usr/local paths in some source files
-patch -p1 < $CWD/usr-local.diff
-# Debian patch to fix behaviour of the OCRODATA environment variable
-patch -p1 < $CWD/ocrodata-env.diff
+# We don't need a DISPLAY, we're just packaging
+patch -p1 < $CWD/no_display.patch
+
+# Fix some paths
+sed -i "s|/usr/local/share|/usr/share|" \
+ ocropy/Notebooks/ocropus-steps.ipynb \
+ ocropy/ocrolib/default.py \
+ ocropy/ocrolib/common.py
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --with-tesseract=/usr \
- --with-iulib=/usr \
- --without-fst \
- --without-SDL \
- --without-leptonica \
- --build=$ARCH-slackware-linux
+( cd ocropy
+python setup.py install --root=$PKG )
-make
-make install DESTDIR=$PKG
+# move models in a subfolder
+mkdir -p $PKG/usr/share/models
+mv $PKG/usr/share/$PRGNAM/* $PKG/usr/share/models
+mv $PKG/usr/share/models $PKG/usr/share/$PRGNAM/
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-# Add Debian's manpage
-mkdir -p $PKG/usr/man/man1
-gzip -9c $CWD/ocroscript.1 > $PKG/usr/man/man1/ocroscript.1.gz
-
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a CHANGES COPYING DIRS INSTALL README $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a fraktur-boxes historic-newspaper uw3-500 $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install