# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=crosstool-ng
pkgver=1.23.0
pkgrel=1
pkgdesc="tool for building toolchains"
url="http://crosstool-ng.org/"
license="GPL"
arch="x86 x86_64 ppc64le"
depends="bash gawk bison flex automake autoconf libtool cvs sed texinfo gperf"
makedepends="ncurses-dev help2man xz"
subpackages="$pkgname-doc"
source="http://ymorin.is-a-geek.org/download/crosstool-ng/crosstool-ng-$pkgver.tar.bz2"

builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="1842d140b1c4f76783751eab60722e8077f356dfc9e9cc941d3c991a7e9bb23cb19e6bd7cd5c630cc87967853c55e0c16e415b222e546b5baaffb264ca799b69  crosstool-ng-1.23.0.tar.bz2"
