Files
lfs-script_s/files/pkgmk.bootstrap
2023-10-07 23:22:47 +08:00

23 lines
511 B
Plaintext

build() {
# detect extracted source directory name
for s in ${source[@]}; do
case $s in
*.tar.*|*.tgz) srcdir=$(tar -tf $PKGMK_SOURCE_DIR/${s##*/} | cut -d / -f1 | head -n1);;
esac
break
done
# cd into extracted source directory
if [ "$srcdir" ] && [ -d "$srcdir" ]; then
cd $srcdir
fi
if [ "$(command -v bootstrap_build)" ]; then
bootstrap_build
else
./configure --prefix=$TOOLS $bootstrap_opt $@ || return $?
make || return $?
make install || return $?
fi
touch $PKG/dummyfile
}