From 9cdecfa6d86591c752cc2c23b1920ac1598b8cc2 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Tue, 30 Aug 2016 00:35:05 -0300 Subject: cuneiform: add new package to [libre] - Freedom issue #1054 -> https://labs.parabola.nu/issues/1054 --- libre/cuneiform/PKGBUILD | 61 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 libre/cuneiform/PKGBUILD (limited to 'libre/cuneiform/PKGBUILD') diff --git a/libre/cuneiform/PKGBUILD b/libre/cuneiform/PKGBUILD new file mode 100644 index 000000000..c40bf9297 --- /dev/null +++ b/libre/cuneiform/PKGBUILD @@ -0,0 +1,61 @@ +# $Id: PKGBUILD 148996 2015-12-06 17:43:52Z bpiotrowski $ +# Maintainer (Arch): Sergej Pupykin +# Contributor (Arch): Maxim Vuets +# Maintainer: André Silva + +pkgname=cuneiform +pkgver=1.1.0 +_dpkgver=1.1 +pkgrel=14.parabola1 +pkgdesc="GNU/Linux port of an OCR system developed in Russia. Supports more than 20 languages, without nonfree data files" +arch=('i686' 'x86_64') +url="https://launchpad.net/cuneiform-linux" +license=('BSD') +depends=('imagemagick') +makedepends=('cmake') +mksource=(http://launchpad.net/cuneiform-linux/${_dpkgver}/${_dpkgver}/+download/cuneiform-linux-${pkgver}.tar.bz2) +source=("https://repo.parabola.nu/other/${pkgname}-libre/${pkgname}-libre-${pkgver}.tar.bz2" + 'libre.patch') +mkmd5sums=('09fd160cdfc512f26442a7e91246598d') +md5sums=('88416aca3998ea61cc800874bab945bd' + '6d1ad29ec454de83622b6b044f6cfb67') + +mksource() { + mv "${srcdir}/${pkgname}-linux-${pkgver}" "${srcdir}/${pkgname}-${pkgver}" + cd "${srcdir}/${pkgname}-${pkgver}" + rm -rv datafiles +} + +prepare() { + cd "${srcdir}/${pkgname}-${pkgver}" + patch -p1 -i ../libre.patch +} + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + sed -i 's#lib64#lib#' install_files.cmake + 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-6 \ + .. + make +} + +check() { + ldd "${srcdir}/${pkgname}-${pkgver}/builddir/cuneiform" | grep Magick >/dev/null +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}"/builddir + make DESTDIR="${pkgdir}" install + + install -Dm644 "${srcdir}/${pkgname}-${pkgver}/cuneiform_src/Kern/license.txt" \ + "${pkgdir}/usr/share/licenses/cuneiform/license.txt" +} -- cgit v1.2.3