1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-23 03:29:46 +01:00
build/pkg/musl/build

41 lines
1 KiB
Text
Raw Normal View History

VERSION="1.1.20"
SRCDIR="musl-$VERSION"
TARBALL="$SRCDIR.tar.gz"
URL="https://www.musl-libc.org/releases"
SHA256SUM="44be8771d0e6c6b5f82dd15662eb2957c9a3173a19a8b49966ac0542bbd40d61"
DEPENDS="tc-gcc1 linux_headers"
prepare() {
return
}
build() {
CROSS_COMPILE="${TARGET}-" $1/configure --prefix=/ --target="$TARGET"
CROSS_COMPILE="${TARGET}-" make -j $NUMJOBS
}
deploy() {
local INPUT="$1"
local DEPLOY="$2"
DESTDIR="$DEPLOY" make install-headers
DESTDIR="$DEPLOY" make install-libs
mkdir -p "$DEPLOY/etc"
cat_file_merge "LDPATH" > "$DEPLOY/etc/ld-musl-${MUSL_CPU}.path"
find ${DEPLOY}/lib/*.so* -exec stat {} --printf="%n m %a 0 0\\n" \; | \
sed "s#^$DEPLOY/##g" | sed "s/644/444/g" | \
sed "s/755/555/g" > "$DEPLOY/rootfs_files.txt"
find "$DEPLOY/etc" -exec stat {} --printf="%n m %a 0 0\\n" \; | \
sed "s#^$DEPLOY/##g" | tail -n +2 >> "$DEPLOY/rootfs_files.txt"
}
check_update() {
curl --silent -L "$URL" | grep -o ">musl-[0-9.]*tar.gz<" | \
sed 's/>musl-//g' | sed 's/.tar.gz<//g' | \
verson_find_greatest "$VERSION"
}