# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Michael Pusterhofer <pusterhofer(at)student(dot)tugraz(dot)at>

pkgname=itstool
pkgver=2.0.2
pkgrel=1
pkgdesc="XML to PO and back again"
arch=(any)
url="http://itstool.org/"
license=(GPL3)
depends=(python2 libxml2)
source=(http://files.itstool.org/itstool/$pkgname-$pkgver.tar.bz2)
sha256sums=('bf909fb59b11a646681a8534d5700fec99be83bb2c57badf8c1844512227033a')

prepare() {
  cd $pkgname-$pkgver
  sed -i 's/| python/&2/' configure.ac
  autoreconf -fi
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr PYTHON=/usr/bin/python2
  make
}

check() {
  cd $pkgname-$pkgver
  make -k check
}

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