aboutsummaryrefslogtreecommitdiffstats
path: root/testing/crosstool-ng/APKBUILD
blob: 4d9914900eb7b18e1f7bd356e83490ae796dd83d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=crosstool-ng
pkgver=1.24.0
pkgrel=0
pkgdesc="tool for building toolchains"
url="http://crosstool-ng.org/"
license="LGPL-2.1-or-later GPL-2.0-or-later CC-BY-SA-2.5"
arch="x86 x86_64 ppc64le"
depends="bash gawk bison flex automake autoconf libtool cvs sed texinfo gperf"
makedepends="ncurses-dev help2man xz gettext-dev"
subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp:noarch"
source="http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-$pkgver.tar.xz"

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
}

bashcomp() {
	depends=""
	pkgdesc="Bash completion for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"

	# bash completion has it's own package
	mkdir -p "$subpkgdir"/usr/share/bash-completion/completions/
	mv "$pkgdir"/usr/share/bash-completion/completions/ct-ng \
		"$subpkgdir"/usr/share/bash-completion/completions/$pkgname
}

sha512sums="89b8794a4184ad4928750e29712ed4f194aa1d0b93768d67ff64f30c30f1b1e165647cafc6de94d68d3ef70e50446e544dad65aa36137511a32ee7a667dddfb4  crosstool-ng-1.24.0.tar.xz"