summaryrefslogtreecommitdiff
path: root/extra/liblouis/PKGBUILD
blob: b6f9f226b9db37299da1a8f03344436c3dbbbf8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# $Id: PKGBUILD 176085 2013-01-27 11:24:27Z ioni $
# Maintainer: Ionut Biru <ibiru@archlinux.org>

pkgname=liblouis
pkgver=2.5.2
pkgrel=1
pkgdesc="Open-source braille translator and back-translator"
arch=(mips64el)
url="http://code.google.com/p/liblouis/"
license=('GPL3')
depends=(glibc)
makedepends=(help2man python2)
optdepends=('python2: for python bindings')
options=(!libtool)
install=liblouis.install
source=(http://liblouis.googlecode.com/files/$pkgname-$pkgver.tar.gz)
sha1sums=('   93437f3c3a9a178ad08bdf6daca2a82cf3df2cc2')

build() {
  cd "$srcdir/$pkgname-$pkgver"
  ./configure --prefix=/usr --disable-static
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  make DESTDIR="$pkgdir" install

  cd python
  LD_PRELOAD+=":$srcdir/$pkgname-$pkgver/liblouis/.libs/liblouis.so"
  python2 setup.py install --root="$pkgdir" --prefix="/usr" --optimize=1

  sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' "$pkgdir"/usr/bin/lou_harnessGenerator
}
# vim:set ts=2 sw=2 et: