summaryrefslogtreecommitdiff
path: root/community/gocr/PKGBUILD
blob: 1bf3b3c5a7aa60a03813baaf8ec70440e15b1463 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# $Id: PKGBUILD 88468 2013-04-18 12:15:06Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: damir <damir@archlinux.org>

pkgname=gocr
pkgver=0.50
pkgrel=1
pkgdesc="Open-source character recognition (OCR)"
arch=("i686" "x86_64")
url="http://jocr.sourceforge.net/index.html"
license=('GPL')
depends=('glibc' 'netpbm')
optdepends=('tk: to use the tk frontend')
source=(http://www-e.uni-magdeburg.de/jschulen/ocr/gocr-${pkgver}.tar.gz)
md5sums=('553ea40c2b3a1a0b03a30675d0e0aba1')

build() {
  cd $srcdir/$pkgname-$pkgver
  [ $CARCH == "x86_64" ] && export CFLAGS=-fPIC
  ./configure --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib
  make -j1 all libs
}

package() {
  cd $srcdir/$pkgname-$pkgver
  mkdir -p $pkgdir/usr/lib
  make DESTDIR=$pkgdir libdir=/usr/lib/ bindir=/usr/bin install
  (cd $pkgdir/usr/lib/ && rm -f libPgm2asc.so && ln -s `echo libPgm2asc*.so` libPgm2asc.so)
  install -D -m644 doc/gocr.html $pkgdir/usr/share/doc/gocr/gocr.html
  for i in pgm2asc.h gocr.h; do
    install -D -m644 src/$i $pkgdir/usr/include/gocr/$i
  done
}