Felix Singer has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/69781 )
Change subject: util/pkgbuilds: Add musl PKGBUILDs ......................................................................
util/pkgbuilds: Add musl PKGBUILDs
WIP
Signed-off-by: Felix Singer felixsinger@posteo.net Change-Id: I28f524a53897685ab763c48f8be5370b8f6488b6 --- A util/pkgbuilds/aarch64-linux-musl/PKGBUILD 1 file changed, 57 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/81/69781/1
diff --git a/util/pkgbuilds/aarch64-linux-musl/PKGBUILD b/util/pkgbuilds/aarch64-linux-musl/PKGBUILD new file mode 100644 index 0000000..a579d69 --- /dev/null +++ b/util/pkgbuilds/aarch64-linux-musl/PKGBUILD @@ -0,0 +1,45 @@ +pkgname=aarch64-linux-musl +pkgver=1.2.3 +pkgrel=1 +pkgdesc='Lightweight implementation of C standard library' +arch=('x86_64') +url='https://musl.libc.org' +license=('MIT') +options=('staticlibs' '!buildflags' '!strip') +depends=('aarch64-linux-gnu-gcc') +validpgpkeys=('836489290BB6B70F99FFDA0556BCDB593020450F') +source=(https://musl.libc.org/releases/musl-$%7Bpkgver%7D.tar.gz%7B,.asc%7D) +sha256sums=('7d5b0b6062521e4627e099e4c9dc8248d32a30285e959b7eecaa780cf8cfd4a4' + 'SKIP') + +_target=aarch64-linux-gnu +_sysroot=/usr/${_target}/lib/musl + +build() { + cd musl-${pkgver} + ./configure \ + --prefix=${_sysroot} \ + --exec-prefix=/usr \ + --target=${_target} \ + --enable-wrapper=all + make +} + +package() { + cd musl-$pkgver + make DESTDIR="$pkgdir" install + + # configure syslibdir with /lib for PT_INTERP compat, but install to /usr/lib + 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 +}