musl_root/pkgs/musl-libc/build.sh

33 lines
614 B
Bash
Raw Normal View History

2018-11-10 00:42:27 +02:00
#!/bin/bash
pkgname="musl-libc"
pkgver="1.1.20"
src="https://www.musl-libc.org/releases/musl-${pkgver}.tar.gz"
prepare () {
[ -f "${pkgname}-src.tar.gz" ] || curl -o "${pkgname}-src.tar.gz" "${src}"
tar -C "${srcdir}" -xvf "${pkgname}-src.tar.gz"
}
build () {
cd "${srcdir}/musl-${pkgver}"
mkdir build && cd build
../configure \
--prefix=/usr
make
}
package () {
cd "${srcdir}/musl-${pkgver}/build"
make DESTDIR="${pkgdir}" install
# Fix mislocated ld-musl-*.so
mv "${pkgdir}"/lib/ld-musl*.so* "${pkgdir}"/usr/lib
rmdir "${pkgdir}"/lib
}
. ../common.sh