Skip to content

Commit

Permalink
Merge pull request #93 from j8xixo12/bzip2_enhance
Browse files Browse the repository at this point in the history
enhance: refurbished bzip2 build script
  • Loading branch information
tai271828 authored Nov 7, 2021
2 parents dc68fff + 5504ba5 commit 33e69af
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions scripts/build.d/bzip2
Original file line number Diff line number Diff line change
Expand Up @@ -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:

0 comments on commit 33e69af

Please sign in to comment.