From 5504ba506e99941e5199449b09519783eac630ba Mon Sep 17 00:00:00 2001 From: j8xixo12 Date: Sun, 7 Nov 2021 10:37:39 +0800 Subject: [PATCH] enhance: refurbished bzip2 build script --- scripts/build.d/bzip2 | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/scripts/build.d/bzip2 b/scripts/build.d/bzip2 index bfd4e30..204ea30 100644 --- a/scripts/build.d/bzip2 +++ b/scripts/build.d/bzip2 @@ -3,17 +3,22 @@ set -e pkgname=bzip2 +pkgbranch=${VERSION:-master} +pkgfull=$pkgname-$pkgbranch -git clone git://sourceware.org/git/bzip2.git ${DEVENVFLAVORROOT}/${DEVENVFLAVOR}/src/${pkgname} +syncgit https://gitlab.com/bzip2 ${pkgname} ${pkgbranch} ${pkgfull} -pushd ${DEVENVFLAVORROOT}/${DEVENVFLAVOR}/src/${pkgname} > /dev/null - - INSTALL_PREFIX=${DEVENVPREFIX} - buildcmd make.log make -f Makefile-libbz2_so - buildcmd make.log make clean - buildcmd make.log make install PREFIX=${INSTALL_PREFIX} -j ${NP} - cp libbz2.so.1.0.8 ${DEVENVPREFIX}/lib - ln -s ${DEVENVPREFIX}/lib/libbz2.so.1.0.8 ${DEVENVPREFIX}/lib/libbz2.so +pushd ${DEVENVFLAVORROOT}/${DEVENVFLAVOR}/src/${pkgfull} > /dev/null + mkdir -p build + pushd build > /dev/null + cmakecmd=("cmake") + cmakecmd+=("-DCMAKE_INSTALL_PREFIX=${DEVENVPREFIX}") + cmakecmd+=("-DENABLE_SHARED_LIB=ON") + cmakecmd+=("../") + buildcmd cmake.log "${cmakecmd[@]}" + buildcmd make.log make -j ${NP} + buildcmd install.log make install + popd > /dev/null popd > /dev/null # vim: set et nobomb ft=bash ff=unix fenc=utf8: