mirror of
https://github.com/pygos/build.git
synced 2024-11-22 19:19:46 +01:00
7204b9dd75
Automagically strip all executables (recursively for subdirectories in lib and bin) inside the mk.sh build loop. This removes the necessity in the build scripts to strip the files. This also allows us to remove the error prone install-strip target from the build scripts. Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
40 lines
1 KiB
Text
Executable file
40 lines
1 KiB
Text
Executable file
VERSION="1.1.19"
|
|
SRCDIR="musl-$VERSION"
|
|
TARBALL="$SRCDIR.tar.gz"
|
|
URL="https://www.musl-libc.org/releases"
|
|
SHA256SUM="db59a8578226b98373f5b27e61f0dd29ad2456f4aa9cec587ba8c24508e4c1d9"
|
|
DEPENDS="tc-gcc1 linux_headers"
|
|
|
|
prepare() {
|
|
return
|
|
}
|
|
|
|
build() {
|
|
CC="${TARGET}-gcc" $1/configure --prefix=/ --target="$TARGET"
|
|
CC="${TARGET}-gcc" 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"
|
|
}
|