summaryrefslogtreecommitdiffstats
path: root/main/musl/APKBUILD
blob: ab1a0b2ee442e89e4a05af16924d1b20bae68693 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=musl
pkgver=0.9.10
pkgrel=0
pkgdesc="the musl c library (libc) implementation"
url="http://www.musl-libc.org/"
arch="x86 x86_64 arm"
license="MIT"
depends=""
depends_dev=""
makedepends="$depends_dev"
install=""
subpackages="$pkgname-dev musl-gcc:crosstool"
source="http://www.musl-libc.org/releases/musl-$pkgver.tar.gz"

_builddir="$srcdir"/musl-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	LDFLAGS="-Wl,-soname,libc-musl-${CARCH}.so" \
	./configure --prefix=/usr \
		--libdir=/lib \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	rm -f "$pkgdir"/usr/lib/*.la
}

crosstool() {
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/musl-gcc "$subpkgdir"/usr/bin
}

md5sums="8998be253b6f0880a1ce00d85dbae9c5  musl-0.9.10.tar.gz"
sha256sums="71fc00733a3ee45fab342870ccd84d33d079e64f2d6fdcfb8b463a769c3ff391  musl-0.9.10.tar.gz"
sha512sums="a31b4dc367672dd3056476b4e7a5c7affd81d33ead2427e043b94da8251167d93178af5ef43ad962354d18eb260435bb3968a3a8f2f684c89d0bc74a32304936  musl-0.9.10.tar.gz"