mirror of
https://github.com/pygos/build.git
synced 2024-11-22 19:19:46 +01:00
ffacb26218
Instead of having a "depends" file with a list of packages, add a "DEPENDS" variable to the build script. Generate the rootfs dependencies from a config file stored in the cfg directory. Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
37 lines
765 B
Bash
37 lines
765 B
Bash
save_toolchain() {
|
|
if [ ! -e "${TCDIR}/${TARGET}.tar.gz" ]; then
|
|
pushd "$TCDIR/$TARGET" > /dev/null
|
|
tar czf "${TCDIR}/${TARGET}.tar.gz" include lib
|
|
popd > /dev/null
|
|
fi
|
|
}
|
|
|
|
restore_toolchain() {
|
|
pushd "$TCDIR/$TARGET" > /dev/null
|
|
rm -r include lib
|
|
tar zxf "${TCDIR}/${TARGET}.tar.gz"
|
|
popd > /dev/null
|
|
}
|
|
|
|
install_build_deps() {
|
|
local NAME="$1"
|
|
|
|
unset -f build deploy prepare
|
|
unset -v VERSION TARBALL URL SRCDIR SHA256SUM DEPENDS
|
|
source "$SCRIPTDIR/pkg/$NAME/build"
|
|
|
|
if [ -z "$DEPENDS" ]; then
|
|
return
|
|
fi
|
|
|
|
for deppkg in $DEPENDS; do
|
|
local devdir="$PKGDEPLOYDIR/${deppkg}-dev"
|
|
|
|
if [ -d "$devdir/include" ]; then
|
|
cp -R "$devdir/include" "$TCDIR/$TARGET"
|
|
fi
|
|
if [ -d "$devdir/lib" ]; then
|
|
cp -R "$devdir/lib" "$TCDIR/$TARGET"
|
|
fi
|
|
done
|
|
}
|