# $Id: PKGBUILD 135772 2015-06-24 00:48:50Z anatolik $
# Maintainer: Anatol Pomozov <anatol@google.com>
# Contributor: Lucas De Marchi <lucas.de.marchi@gmail.com>

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

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
}
