-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
install ODB and Thrift from source during image build
- Loading branch information
Showing
5 changed files
with
90 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/sh | ||
|
||
opt=${1:-"all"} | ||
|
||
wget https://raw.githubusercontent.com/Ericsson/CodeCompass/master/scripts/install_latest_build2.sh | ||
sh install_latest_build2.sh "/build2_install" | ||
export PATH=/build2_install/bin:$PATH | ||
# Configuring the build | ||
mkdir /odb_build | ||
cd /odb_build | ||
bpkg create --quiet --jobs $(nproc) cc \ | ||
config.cxx=g++ \ | ||
config.cc.coptions=-O3 \ | ||
config.bin.rpath=/odb_install/lib \ | ||
config.install.root=/odb_install | ||
# Getting the source | ||
bpkg add https://pkg.cppget.org/1/beta --trust-yes | ||
bpkg fetch --trust-yes | ||
# Building odb | ||
bpkg build libodb --yes | ||
case $opt in | ||
"sqlite") | ||
bpkg build libodb-sqlite --yes | ||
;; | ||
"pgsql") | ||
bpkg build libodb-pgsql --yes | ||
;; | ||
*) | ||
bpkg build odb --yes | ||
bpkg build libodb-sqlite --yes | ||
bpkg build libodb-pgsql --yes | ||
;; | ||
esac | ||
bpkg install --all --recursive | ||
# Copy to /usr | ||
cp -rn /odb_install/* /usr | ||
# Clean up | ||
cd / | ||
sh install_latest_build2.sh --uninstall | ||
rm -rf /odb_build /odb_install install_latest_build2.sh build2-toolchain-*.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/sh | ||
|
||
wget "http://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=thrift/0.13.0/thrift-0.13.0.tar.gz" \ | ||
-O thrift-0.13.0.tar.gz | ||
tar -xvf ./thrift-0.13.0.tar.gz | ||
cd thrift-0.13.0 | ||
# Configure | ||
./configure --prefix=/thrift_install --silent --without-python \ | ||
--enable-libtool-lock --enable-tutorial=no --enable-tests=no \ | ||
--with-libevent --with-zlib --without-nodejs --without-lua \ | ||
--without-ruby --without-csharp --without-erlang --without-perl \ | ||
--without-php --without-php_extension --without-dart \ | ||
--without-haskell --without-go --without-rs --without-haxe \ | ||
--without-dotnetcore --without-d --without-qt4 --without-qt5 \ | ||
--without-java | ||
make install -j $(nproc) | ||
# Copy to /usr | ||
cp -rn /thrift_install/* /usr | ||
# Clean up | ||
cd / | ||
rm -rf /thrift_install thrift-0.13.0.tar.gz thrift-0.13.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters