pkgname=cuneiform pkgver=1.1.0 _dpkgver=1.1 pkgrel=6 pkgdesc="Linux port of an OCR system developed in Russia. Supports more than 20 languages." arch=('x86_64') url="https://launchpad.net/cuneiform-linux" screenshot=("http://i1-win.softpedia-static.com/screenshots/CuneiForm_3.png") license=('BSD') depends=('imagemagick' 'fftw') makedepends=('cmake') source=(http://launchpad.net/cuneiform-linux/${_dpkgver}/${_dpkgver}/+download/cuneiform-linux-${pkgver}.tar.bz2 build-fix.patch) md5sums=('09fd160cdfc512f26442a7e91246598d' '844062a2954e82b6543da449c5495a07') prepare() { cd $pkgname-linux-$pkgver patch -Np1 -i ../build-fix.patch sed -i 's/lib64/lib/' install_files.cmake } build() { cd "${pkgname}-linux-${pkgver}" mkdir -p builddir && cd builddir LMAGICK=`ls -1 /usr/lib/libMagick++*.so.?` cmake -DCMAKE_BUILD_TYPE=release \ -DCMAKE_INSTALL_PREFIX=/usr \ -DImageMagick_Magick++_LIBRARY=$LMAGICK \ -DImageMagick_Magick++_INCLUDE_DIR=/usr/include/ImageMagick-7 \ .. make } package() { cd "${pkgname}-linux-${pkgver}"/builddir make DESTDIR="${pkgdir}" install mkdir -p "${pkgdir}/usr/share/licenses/cuneiform" cp "${srcdir}/${pkgname}-linux-${pkgver}/cuneiform_src/Kern/license.txt" \ "${pkgdir}/usr/share/licenses/cuneiform" }