2020-09-02 13:04:37 +08:00
|
|
|
# Maintainer: Allen Wild <allenwild93@gmail.com>
|
|
|
|
# Contributor: Riley Trautman <asonix.dev@gmail.com>
|
2017-12-09 02:14:13 +08:00
|
|
|
|
|
|
|
pkgname=aarch64-linux-musl
|
2020-09-02 13:04:37 +08:00
|
|
|
pkgver=1.2.1
|
2017-12-09 02:14:13 +08:00
|
|
|
pkgrel=1
|
|
|
|
pkgdesc='Lightweight implementation of C standard library'
|
|
|
|
arch=('i686' 'x86_64')
|
2020-09-02 13:04:37 +08:00
|
|
|
url='https://musl.libc.org'
|
2017-12-09 02:14:13 +08:00
|
|
|
license=('MIT')
|
|
|
|
options=('staticlibs' '!buildflags' '!strip')
|
|
|
|
makedepends=('aarch64-linux-gnu-binutils' 'aarch64-linux-gnu-gcc')
|
|
|
|
validpgpkeys=('836489290BB6B70F99FFDA0556BCDB593020450F')
|
2020-09-02 13:04:37 +08:00
|
|
|
source=(https://musl.libc.org/releases/musl-1.2.1.tar.gz{,.asc})
|
|
|
|
sha256sums=('68af6e18539f646f9c41a3a2bb25be4a5cfa5a8f65f0bb647fd2bbfdf877e84b'
|
2017-12-09 02:14:13 +08:00
|
|
|
'SKIP')
|
2020-09-02 13:04:37 +08:00
|
|
|
|
|
|
|
_target=aarch64-linux-gnu
|
2017-12-09 02:14:13 +08:00
|
|
|
_sysroot=/usr/$_target/lib/musl
|
|
|
|
|
|
|
|
build() {
|
2020-09-02 13:04:37 +08:00
|
|
|
cd musl-$pkgver
|
|
|
|
./configure --prefix=$_sysroot \
|
|
|
|
--exec-prefix=/usr \
|
|
|
|
--target=$_target \
|
|
|
|
--enable-wrapper=all
|
2017-12-09 02:14:13 +08:00
|
|
|
make
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2020-09-02 13:04:37 +08:00
|
|
|
cd musl-$pkgver
|
2017-12-09 02:14:13 +08:00
|
|
|
make DESTDIR="$pkgdir" install
|
|
|
|
|
2020-09-02 13:04:37 +08:00
|
|
|
# configure syslibdir with /lib for PT_INTERP compat, but install to /usr/lib
|
|
|
|
mv "$pkgdir"/lib/ld-musl*.so* "$pkgdir$_sysroot"/lib/
|
2017-12-09 02:14:13 +08:00
|
|
|
rmdir "$pkgdir"/lib
|
|
|
|
|
|
|
|
pushd "$pkgdir"/usr/bin
|
2020-09-02 13:04:37 +08:00
|
|
|
local _bin
|
2017-12-09 02:14:13 +08:00
|
|
|
for _bin in *; do
|
2020-09-02 13:04:37 +08:00
|
|
|
mv "$_bin" "${_target%-gnu}-$_bin"
|
2017-12-09 02:14:13 +08:00
|
|
|
done
|
|
|
|
popd
|
|
|
|
|
|
|
|
install -Dm0644 README "$pkgdir"/usr/share/doc/$pkgname/README
|
|
|
|
install -Dm0644 COPYRIGHT "$pkgdir"/usr/share/licenses/$pkgname/COPYRIGHT
|
|
|
|
}
|
2020-09-02 13:04:37 +08:00
|
|
|
|
|
|
|
# vim: et ts=2 sts=2 sw=2
|