summaryrefslogtreecommitdiff
path: root/libre/cuneiform/PKGBUILD
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-08-30 00:35:05 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-09-04 19:22:23 -0300
commit9cdecfa6d86591c752cc2c23b1920ac1598b8cc2 (patch)
treeb8171ce8d494707de4afa1b6b1325fb2d25cf715 /libre/cuneiform/PKGBUILD
parentc00410ae2885ebf7cbbbc8ee2c566491379ffed5 (diff)
downloadabslibre-9cdecfa6d86591c752cc2c23b1920ac1598b8cc2.tar.gz
abslibre-9cdecfa6d86591c752cc2c23b1920ac1598b8cc2.tar.bz2
abslibre-9cdecfa6d86591c752cc2c23b1920ac1598b8cc2.zip
cuneiform: add new package to [libre] - Freedom issue #1054 -> https://labs.parabola.nu/issues/1054
Diffstat (limited to 'libre/cuneiform/PKGBUILD')
-rw-r--r--libre/cuneiform/PKGBUILD61
1 files changed, 61 insertions, 0 deletions
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 <pupykin.s+arch@gmail.com>
+# Contributor (Arch): Maxim Vuets <maxim.vuets@gmail.com>
+# Maintainer: André Silva <emulatorman@parabola.nu>
+
+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"
+}