summaryrefslogtreecommitdiff
path: root/community
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2012-06-07 15:36:02 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2012-06-07 15:36:02 -0300
commitf8a4c93c94e6da2a2f59971a3db4dd84f99b272a (patch)
treec2e4fdeb69bb3cd34640cb77a8a8ffe9401febe0 /community
parentd81d6e7c961e071599cd593bdbfdd0e70cd50d89 (diff)
make a split pkgbuild
Diffstat (limited to 'community')
-rw-r--r--community/leptonica/PKGBUILD2
-rw-r--r--community/tesseract/PKGBUILD70
2 files changed, 33 insertions, 39 deletions
diff --git a/community/leptonica/PKGBUILD b/community/leptonica/PKGBUILD
index 9aaa55a76..f632d2d27 100644
--- a/community/leptonica/PKGBUILD
+++ b/community/leptonica/PKGBUILD
@@ -6,7 +6,7 @@ pkgname=leptonica
pkgver=1.68
pkgrel=3
pkgdesc="Software that is broadly useful for image processing and image analysis applications"
-arch=('i686' 'x86_64')
+arch=('i686' 'x86_64' 'mips64el')
url="http://www.leptonica.com/"
license=('custom')
depends=('glibc')
diff --git a/community/tesseract/PKGBUILD b/community/tesseract/PKGBUILD
index 66fd9e8f8..8a7c565f1 100644
--- a/community/tesseract/PKGBUILD
+++ b/community/tesseract/PKGBUILD
@@ -2,7 +2,12 @@
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Andreas Hauser <andy-aur@splashground.de>
-pkgname=tesseract
+# chinese requires two files
+_langs=(ind swe ron slv srp tgl tur hun fin ita nld jpn vie spa ukr fra slk
+kor ell rus por bul lav lit pol dan-frak deu dan ces cat eng chi_tra chi_sim)
+
+pkgbase=tesseract
+pkgname=(tesseract $(for l in ${_langs[@]}; do echo tesseract-data-${l}; done))
pkgver=3.01
pkgrel=1
pkgdesc="An OCR programm"
@@ -11,42 +16,14 @@ url="http://code.google.com/p/tesseract-ocr"
license=("APACHE")
depends=(libpng libtiff libjpeg zlib giflib gcc-libs leptonica)
source=(http://tesseract-ocr.googlecode.com/files/$pkgname-$pkgver.tar.gz
- http://tesseract-ocr.googlecode.com/files/chi_tra.traineddata.gz
http://tesseract-ocr.googlecode.com/files/chi_sim.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/ind.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/swe.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/ron.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/slv.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/srp.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/tgl.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/tur.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/hun.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/fin.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/ita.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/nld.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/jpn.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/vie.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/spa.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/ukr.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/fra.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/slk.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/kor.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/ell.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/rus.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/por.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/bul.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/lav.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/lit.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/pol.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/dan-frak.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/deu.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/dan.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/ces.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/cat.traineddata.gz
- http://tesseract-ocr.googlecode.com/files/eng.traineddata.gz)
+ http://tesseract-ocr.googlecode.com/files/chi_tra.traineddata.gz
+ $(for l in ${_langs[@]}; do
+ echo http://tesseract-ocr.googlecode.com/files/${l}.traineddata.gz
+ done))
md5sums=('1ba496e51a42358fb9d3ffe781b2d20a'
- '06fce5f5c0221286eab591819406d91e'
'127e0b742b615d81c3b97a555acd8285'
+ '06fce5f5c0221286eab591819406d91e'
'f4ae2e5668f693cc51c6e3c3f57a8f1d'
'3787ff0fc1a07517203466830f6f868e'
'7b50075692e7a07ac8f59e0cde51cfb9'
@@ -77,7 +54,9 @@ md5sums=('1ba496e51a42358fb9d3ffe781b2d20a'
'7aaeb321dbf069d14d2601dc36d3dddc'
'2e97c952075064834f1cad6a133970fa'
'308099b2b95834916ec410191c86cd48'
- 'd91041ad156cf2db36664e91ef799451')
+ 'd91041ad156cf2db36664e91ef799451'
+ '06fce5f5c0221286eab591819406d91e'
+ '127e0b742b615d81c3b97a555acd8285')
build() {
cd $srcdir/$pkgname-$pkgver
@@ -86,10 +65,25 @@ build() {
make
}
-package() {
+package_tesseract() {
cd $srcdir/$pkgname-$pkgver
+
make DESTDIR=$pkgdir install
+
mkdir -p $pkgdir/usr/share/tessdata
- cp $srcdir/*.traineddata $pkgdir/usr/share/tessdata/
- find $pkgdir/usr/share/tessdata -type f -exec chmod 0644 {} \;
}
+
+# Declare the package functions for data
+for l in ${_langs[@]}; do
+ eval "
+package_tesseract-data-${l}(){
+ pkgdesc=\"Tesseract OCR data ($l)\"
+ depends=('tesseract')
+ groups=('tesseract-data')
+
+ mkdir -p \$pkgdir/usr/share/tessdata
+ cp \$srcdir/${l}.traineddata \$pkgdir/usr/share/tessdata/
+ find \$pkgdir/usr/share/tessdata -type f -exec chmod 0644 {} \;
+}
+ "
+done