53 lines
1.2 KiB
Bash
53 lines
1.2 KiB
Bash
# Maintainer: Allen Wild <allenwild93@gmail.com>
|
|
# Contributor: Riley Trautman <asonix.dev@gmail.com>
|
|
|
|
pkgname=aarch64-linux-musl
|
|
pkgver=1.2.5
|
|
pkgrel=1
|
|
pkgdesc='Lightweight implementation of C standard library'
|
|
arch=('i686' 'x86_64')
|
|
url='https://musl.libc.org'
|
|
license=('MIT')
|
|
options=('staticlibs' '!buildflags' '!strip')
|
|
depends=('aarch64-linux-gnu-gcc')
|
|
source=(git+https://gitea.classfun.cn:4443/mirrors/musl.git)
|
|
sha512sums=('SKIP')
|
|
|
|
_target=aarch64-linux-gnu
|
|
_sysroot=/usr/$_target/lib/musl
|
|
|
|
pkgver() {
|
|
cd "$srcdir/musl"
|
|
git describe --tags --abbrev=0 | sed 's,^v,,'
|
|
}
|
|
|
|
prepare() {
|
|
cd "$srcdir/musl"
|
|
git checkout "$(git describe --tags --abbrev=0)"
|
|
}
|
|
|
|
build() {
|
|
cd "$srcdir/musl"
|
|
./configure \
|
|
--prefix=$_sysroot \
|
|
--exec-prefix=/usr \
|
|
--target=$_target \
|
|
--enable-wrapper=all
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd "$srcdir/musl"
|
|
make DESTDIR="$pkgdir" install
|
|
mv "$pkgdir"/lib/ld-musl*.so* "$pkgdir$_sysroot"/lib/
|
|
rmdir "$pkgdir"/lib
|
|
pushd "$pkgdir"/usr/bin
|
|
local _bin
|
|
for _bin in *; do
|
|
mv "$_bin" "${_target%-gnu}-$_bin"
|
|
done
|
|
popd
|
|
install -Dm0644 README "$pkgdir"/usr/share/doc/$pkgname/README
|
|
install -Dm0644 COPYRIGHT "$pkgdir"/usr/share/licenses/$pkgname/COPYRIGHT
|
|
}
|