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}"
|
2018-11-10 22:36:42 +02:00
|
|
|
|
|
|
|
for p in "${wd}"/patches/*.patch; do
|
|
|
|
patch -u -p0 < "${p}"
|
|
|
|
done
|
|
|
|
|
2018-11-10 00:42:27 +02:00
|
|
|
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
|