# $Id: PKGBUILD 120625 2014-10-13 20:00:54Z anatolik $
# Maintainer: Anatol Pomozov <anatol@google.com>
# Contributor: Lucas De Marchi <lucas.de.marchi@gmail.com>

pkgname=codespell
pkgver=1.7
pkgrel=2
pkgdesc='Fix common misspellings in source code'
url='https://github.com/lucasdemarchi/codespell'
license=(GPL)
arch=(any)
depends=(python)
source=(https://github.com/lucasdemarchi/codespell/archive/v$pkgver.tar.gz)
sha256sums=('dd82e0031df8f726202fe76ba73075fd2877ded57bba9c16152bd141261660d2')

prepare() {
  # fix build bug https://github.com/lucasdemarchi/codespell/commit/d3b1e186a692cd4c7477b4156277ce2f060c3b80
  cd codespell-$pkgver
  sed -i 's/^install:$/install: codespell/' Makefile
}

package() {
  cd codespell-$pkgver
  make install DESTDIR="$pkgdir" prefix=/usr
}
