# Maintainer(AUR): Sebastian Bøe <sebastianbooe@gmail.com>
# parabola changes and rationale:
# - Added armv7h and i686 architectures support
# - Modified to use a fixed git revision
pkgname=arachne-pnr-git
_commit=c40fb2289952f4f120cc10a5a4c82a6fb88442dc
pkgrel=1
pkgver=r328.c40fb22
pkgdesc=" Place and route tool for FPGAs"
arch=('armv7h' 'i686' 'x86_64')
url="https://github.com/cseed/arachne-pnr"
license=('GPL2')
depends=('icestorm-git')
makedepends=('git')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("git+https://github.com/cseed/arachne-pnr.git#commit=${_commit}")
md5sums=('SKIP')

pkgver() {
	cd "$srcdir/${pkgname%-git}"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "$srcdir/${pkgname%-git}"
  make ICEBOX=/usr/share/icebox PREFIX=/usr
}

package() {
	cd "$srcdir/${pkgname%-git}"
	make ICEBOX=/usr/share/icebox PREFIX=$pkgdir/usr install
}
