52 lines
1.1 KiB
Bash
52 lines
1.1 KiB
Bash
|
# Maintainer: BigfootACA <bigfoot@classfun.cn>
|
||
|
|
||
|
pkgname=arm-linux-musl
|
||
|
pkgver=1.2.5
|
||
|
pkgrel=1
|
||
|
pkgdesc='Lightweight implementation of C standard library'
|
||
|
arch=('i686' 'x86_64' 'aarch64')
|
||
|
url='https://musl.libc.org'
|
||
|
license=('MIT')
|
||
|
options=('staticlibs' '!buildflags' '!strip')
|
||
|
depends=('armv7l-linux-gnueabihf-gcc')
|
||
|
source=(git+https://gitea.classfun.cn:4443/mirrors/musl.git)
|
||
|
sha512sums=('SKIP')
|
||
|
|
||
|
_target=arm-linux-gnueabihf
|
||
|
_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
|
||
|
}
|