musl_root/pkgs/musl-libc/build.sh

35 lines
610 B
Bash
Executable File

#!/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}"
for p in "${wd}"/patches/*.patch; do
patch -u -p0 < "${p}"
done
mkdir build && cd build
../configure \
--prefix=/usr \
--syslibdir=/usr/lib
make
}
package () {
cd "${srcdir}/musl-${pkgver}/build"
make DESTDIR="${pkgdir}" install
}
. ../common.sh