[buildout] extends = jbigkit.cfg libjpeg.cfg libpng.cfg libtiff.cfg zlib.cfg parts = tesseract-eng-traineddata-unzip tesseract [tesseract-share] # XXX: tesseract seems not easy configurable on runtime about where to find # its trained data, so just move out its datadir to own controlled location recipe = plone.recipe.command location = ${buildout:parts-directory}/${:_buildout_section_name_} command = mkdir -p ${:location} && mkdir -p ${:location}/tessdata update-command = ${:command} stop-on-error = yes [tesseract] recipe = hexagonit.recipe.cmmi url = http://tesseract-ocr.googlecode.com/files/tesseract-3.00.tar.gz md5sum = cc812a261088ea0c3d2da735be35d09f configure-options = --datarootdir=${tesseract-share:location} environment = CPPFLAGS=-I${zlib:location}/include -I${jbigkit:location}/include -I${libjpeg:location}/include -I${libtiff:location}/include -I${libpng:location}/include LDFLAGS =-Wl,-rpath -L${zlib:location}/lib -Wl,${zlib:location}/lib -L${jbigkit:location}/lib -Wl,-rpath -Wl,${jbigkit:location}/lib -L${libjpeg:location}/lib -Wl,-rpath -Wl,${libjpeg:location}/lib -L${libtiff:location}/lib -Wl,-rpath -Wl,${libtiff:location}/lib -L${libpng:location}/lib -Wl,-rpath -Wl,${libpng:location}/lib [tesseract-eng-traineddata] recipe = hexagonit.recipe.download download-only = true url = http://tesseract-ocr.googlecode.com/files/eng.traineddata.gz md5sum = d91041ad156cf2db36664e91ef799451 [tesseract-eng-traineddata-unzip] location = ${buildout:parts-directory}/${:_buildout_section_name_} recipe = plone.recipe.command command = gunzip ${tesseract-eng-traineddata:location}/eng.traineddata.gz -c > ${tesseract-share:location}/tessdata/eng.traineddata update-command = ${:command} stop-on-error = yes