# Contributor: William Pitcock # Maintainer: William Pitcock 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"