pkgname=intltool
pkgver=0.51.0
pkgdesc="The internationalization tool collection"
homepage="https://launchpad.net/intltool"
license=('GPL')
sources=("${pkgname}-${pkgver}.tar.gz")
urls=("https://launchpad.net/intltool/trunk/${pkgver}/+download/${sources[0]}")
md5sums=("12e517cac2b57a0121cda351570f1e63")

src_prepare() {
  tar -xf ${distdir}/${sources[0]} --strip-components=1
  sed -i 's:\\\${:\\\$\\{:' intltool-update.in
}

src_build() {
  ./configure --prefix=/usr
  make
}

src_check() {
  make check
}

src_install() {
  make DESTDIR="${pkgdir}" install
  install -v -Dm644 doc/I18N-HOWTO "${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/I18N-HOWTO"
}

