-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from emilienlemaire/install-script
Update for demo
- Loading branch information
Showing
10 changed files
with
261 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,15 +21,17 @@ fi | |
|
||
|
||
export SUPERBOL_PACKAGING=1 | ||
INSTALLDIR=$(readlink -f "${TARGETDIR:-/home/bas/superbol}") | ||
INSTALLDIR="/home/bas/superbol" | ||
BUILDDIR=$(readlink -f "${BUILDDIR:-$(pwd)/tmp-builddir}") | ||
SWITCHNAME="${SWITCHNAME:-for-padbol}" | ||
TARGETDIR=$(readlink -f "${TARGETDIR:-INSTALL_DIR}") | ||
|
||
echo "Packaging SuperBOL into ${TARGETDIR}" | ||
|
||
export LD_LIBRARY_PATH="${TARGETDIR}/lib:${TARGETDIR}/lib64" | ||
export LIBRARY_PATH="${TARGETDIR}/lib:${TARGETDIR}/lib64" | ||
export LD_LIBRARY_PATH="${TARGETDIR}/${INSTALLDIR}/lib:${TARGETDIR}/${INSTALLDIR}/lib64" | ||
export LIBRARY_PATH="${TARGETDIR}/${INSTALLDIR}/lib:${TARGETDIR}/${INSTALLDIR}/lib64" | ||
export CFLAGS="-static-libgcc" | ||
export CXXFLAGS="-static-libgcc -static-libstdc++" | ||
|
||
DATE=$(date +%Y%m%d%H%M) | ||
|
||
|
@@ -76,7 +78,7 @@ if [ -e padbol ]; then | |
cd .. | ||
fi | ||
else | ||
git clone -b packaging-build [email protected]:emilienlemaire/padbol --depth 1 | ||
git clone -b edit-port [email protected]:emilienlemaire/padbol --depth 1 | ||
cd padbol | ||
if [ ! -e _opam ]; then | ||
opam switch link $SWITCHNAME | ||
|
@@ -109,34 +111,34 @@ fi | |
|
||
if [ ! -e ${TARGETDIR}/commits/gixsql-${GIXSQL_COMMIT} ]; then | ||
|
||
export CMAKE_PREFIX_PATH=$TARGETDIR | ||
export CMAKE_MODULE_PATH=$TARGETDIR/lib | ||
export PKG_CONFIG_PATH=${TARGETDIR}/lib64/pkgconfig:${TARGETDIR}/lib/pkgconfig | ||
export CMAKE_PREFIX_PATH=$TARGETDIR/$INSTALLDIR | ||
export CMAKE_MODULE_PATH=${TARGETDIR}/${INSTALLDIR}/lib | ||
export PKG_CONFIG_PATH=${TARGETDIR}/${INSTALLDIR}/lib64/pkgconfig:${TARGETDIR}/${INSTALLDIR}/lib/pkgconfig | ||
export CMAKE_FIND_USE_CMAKE_SYSTEM_PATH=FALSE | ||
|
||
cd fmt | ||
if [ ! -e "_build/commits/${FMT_COMMIT}" ]; then | ||
mkdir -p _build | ||
cd _build | ||
cmake -DCMAKE_INSTALL_PREFIX:PATH=${TARGETDIR} -DBUILD_SHARED_LIBS=TRUE -DFMT_TEST=OFF .. | ||
cmake -DCMAKE_INSTALL_PREFIX:PATH=${INSTALLDIR} -DBUILD_SHARED_LIBS=TRUE -DFMT_TEST=OFF .. | ||
make -j | ||
cd .. | ||
fi | ||
cd _build | ||
make install | ||
make DESTDIR=${TARGETDIR} install | ||
rm -rf commits | ||
mkdir commits | ||
touch commits/${FMT_COMMIT} | ||
cd ../.. | ||
|
||
export CXXFLAGS="$(pkg-config --cflags fmt)" | ||
export CXXFLAGS="$(pkg-config --cflags fmt) $CXXFLAGS" | ||
export LIBS="$(pkg-config --libs fmt) $LIBS" | ||
|
||
cd spdlog | ||
if [ ! -e "_build/commits/${SPDLOG_COMMIT}" ]; then | ||
mkdir -p _build | ||
cd _build | ||
cmake -DCMAKE_INSTALL_PREFIX:PATH=${TARGETDIR} \ | ||
cmake -DCMAKE_INSTALL_PREFIX:PATH=${INSTALLDIR} \ | ||
-DBUILD_SHARED_LIBS=TRUE \ | ||
-DSPDLOG_BUILD_EXAMPLE=NO \ | ||
-DSPDLOG_BUILD_TESTS=NO \ | ||
|
@@ -147,7 +149,7 @@ if [ ! -e ${TARGETDIR}/commits/gixsql-${GIXSQL_COMMIT} ]; then | |
cd .. | ||
fi | ||
cd _build | ||
make install | ||
make DESTDIR=${TARGETDIR} install | ||
rm -rf commits | ||
mkdir commits | ||
touch commits/${SPDLOG_COMMIT} | ||
|
@@ -160,10 +162,10 @@ if [ ! -e ${TARGETDIR}/commits/gixsql-${GIXSQL_COMMIT} ]; then | |
if [ ! -e "commits/${GIXSQL_COMMIT}" ]; then | ||
touch extra_files.mk | ||
autoreconf -i | ||
./configure --prefix=${TARGETDIR} | ||
./configure --prefix=${INSTALLDIR} | ||
make -j | ||
fi | ||
make install | ||
make DESTDIR=${TARGETDIR} install | ||
mkdir -p commits | ||
touch commits/${GIXSQL_COMMIT} | ||
mkdir -p ${TARGETDIR}/commits/ | ||
|
@@ -176,53 +178,46 @@ if [ ! -e ${TARGETDIR}/commits/gnucobol-${GNUCOBOL_COMMIT} ]; then | |
cd visam-2.2 | ||
if [ ! -e _build/version/2.2 ]; then | ||
echo "Not installed: building" | ||
if [ -e Makefile ]; then | ||
make distclean | ||
fi | ||
rm -rf _build | ||
mkdir -p _build | ||
cd _build | ||
../configure --prefix=${TARGETDIR} --enable-vbisamdefault | ||
../configure --prefix=${INSTALLDIR} --enable-vbisamdefault | ||
make -j | ||
cd .. | ||
else | ||
echo "Installed" | ||
fi | ||
cd _build | ||
make install | ||
ln -s ${TARGETDIR}/lib/libvisam.so ${TARGETDIR}/lib/libvbisam.so | ||
ln -s ${TARGETDIR}/include/visam.h ${TARGETDIR}/include/vbisam.h | ||
make DESTDIR=${TARGETDIR} install | ||
ln -s ${TARGETDIR}/${INSTALLDIR}/lib/libvisam.so ${TARGETDIR}/${INSTALLDIR}/lib/libvbisam.so | ||
ln -s ${TARGETDIR}/${INSTALLDIR}/include/visam.h ${TARGETDIR}/${INSTALLDIR}/include/vbisam.h | ||
mkdir -p version | ||
touch version/2.2 | ||
cd ../.. | ||
LD_LIBRARY_PATH=${TARGETDIR}/lib:${LD_LIBRARY_PATH} | ||
export LD_LIBRARY_PATH | ||
LIBRARY_PATH=${LD_LIBRARY_PATH} | ||
export LIBRARY_PATH | ||
C_INCLUDE_PATH=${TARGETDIR}/include | ||
C_INCLUDE_PATH=${TARGETDIR}/${INSTALLDIR}/include | ||
export C_INCLUDE_PATH | ||
cd gnucobol | ||
if [ ! -e _build/commits/${GNUCOBOL_COMMIT} ]; then | ||
mkdir -p _build | ||
cd _build | ||
../autogen.sh install | ||
../configure --prefix=${TARGETDIR} --with-vbisam | ||
../configure --prefix=${INSTALLDIR} --with-vbisam | ||
make -j | ||
rm -rf commits | ||
mkdir commits | ||
touch commits/${GNUCOBOL_COMMIT} | ||
cd .. | ||
fi | ||
cd _build | ||
make install | ||
make DESTDIR=${TARGETDIR} install | ||
mkdir -p ${TARGETDIR}/commits/ | ||
touch ${TARGETDIR}/commits/gnucobol-${GNUCOBOL_COMMIT} | ||
cd ../.. | ||
fi | ||
|
||
LD_LIBRARY_PATH=${TARGETDIR}/lib:${LD_LIBRARY_PATH} | ||
export LD_LIBRARY_PATH | ||
|
||
LIBRARY_PATH=${LD_LIBRARY_PATH} | ||
export LIBRARY_PATH | ||
|
||
C_INCLUDE_PATH=${TARGETDIR}/include | ||
export C_INCLUDE_PATH | ||
|
||
|
@@ -240,11 +235,12 @@ if [ ! -e ${TARGETDIR}/commits/superbol-${SUPERBOL_COMMIT} ]; then | |
mkdir -p ${TARGETDIR}/bin/ | ||
mkdir -p ${TARGETDIR}/lib/ | ||
|
||
cp -f padbol ${TARGETDIR}/bin/superbol | ||
find superkix/third-parties -name '*.so' -exec cp -f {} ${TARGETDIR}/lib \; | ||
cp -f superkix/target/release/server ${TARGETDIR}/bin/superkix | ||
cp -f superkix/target/release/libsuperkix.so ${TARGETDIR}/lib/ | ||
cp -f $(ldd ${TARGETDIR}/bin/superkix | awk '{ print $3 }' | grep -v ${TARGETDIR}) ${TARGETDIR}/lib/ | ||
cp -fv padbol ${TARGETDIR}/${INSTALLDIR}/bin/superbol | ||
find superkix/third-parties -name '*.so' -exec cp -fv {} ${TARGETDIR}/${INSTALLDIR}/lib \; | ||
cp -fv superkix/target/release/libsuperkix.so ${TARGETDIR}/${INSTALLDIR}/lib | ||
cp -fv superkix/target/release/server ${TARGETDIR}/${INSTALLDIR}/bin/superkix | ||
cp -fv $(ldd ${TARGETDIR}/${INSTALLDIR}/bin/superkix | awk '{ print $3 }' | grep -v ${TARGETDIR}) ${TARGETDIR}/${INSTALLDIR}/lib/ | ||
rm -f ${TARGETDIR}/${INSTALLDIR}/lib/libc.so.* | ||
cd .. | ||
|
||
touch ${TARGETDIR}/commits/superbol-${SUPERBOL_COMMIT} | ||
|
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 |
---|---|---|
@@ -1,5 +1,14 @@ | ||
#!/usr/bin/bash | ||
|
||
pwd | ||
|
||
export LD_LIBRARY_PATH=/home/bas/superbol/lib:/usr/host/lib | ||
export PATH=/home/bas/superbol/bin:${PATH} | ||
|
||
if [ ! -e Makefile ]; then | ||
cd ${APP_HOME}/cobol_repo | ||
fi | ||
|
||
./configure | ||
make | ||
make install |
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,23 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Install the latest release on the VM | ||
|
||
INSTALLDIR=$(readlink -f "${INSTALLDIR:-${HOME}/superbol}") | ||
|
||
mkdir -p tmp-install | ||
|
||
mkdir -p ${INSTALLDIR}/bin | ||
mkdir -p ${INSTALLDIR}/lib | ||
mkdir -p ${INSTALLDIR}/include | ||
mkdir -p ${INSTALLDIR}/share | ||
|
||
|
||
tar -xvzf superbol-install.tar.gz -C tmp-install | ||
|
||
cp -Rf tmp-install/target/home/* /home/ | ||
|
||
export PATH=${INSTALLDIR}/bin:${PATH} | ||
export LD_LIBRARY_PATH=${INSTALLDIR}/lib:${LD_LIBRARY_PATH} | ||
export C_INCLUDE_PATH=${INSTALLDIR}/include:${C_INCLUDE_PATH} |
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
Binary file not shown.
Binary file not shown.
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,95 @@ | ||
@font-face { | ||
font-family: Departure; | ||
src: url(/resources/DepartureMono-Regular.woff2); | ||
} | ||
|
||
:root { | ||
background: rgb(9,9,121); | ||
background: radial-gradient(circle, rgba(9,9,121,1) 0%, rgb(0, 70, 140) 100%); | ||
/* color: hsl(214, 100%, 60%); */ | ||
color: hsl(214, 100%, 65%); | ||
font-family: sans-serif; | ||
font-size: 110%; | ||
min-height: 100vh; | ||
} | ||
|
||
body { | ||
display: grid; | ||
justify-content: center; | ||
gap: 0.3em; | ||
|
||
grid-template-columns: fit-content(60em) fit-content(35em); | ||
grid-template-rows: auto; | ||
grid-template-areas: | ||
"header header" | ||
"sub-header sub-header" | ||
"logs connections" | ||
; | ||
} | ||
|
||
.widget { | ||
background-color: #222222; | ||
border-radius: 0.3rem; | ||
|
||
box-shadow: 0pt 0pt 0.5rem 0.1rem rgba(47, 47, 47, 0.627); | ||
|
||
h2 { | ||
background-color: #333333; | ||
color: hsl(214, 100%, 65%); | ||
margin: 0pt; | ||
border-top-left-radius: 0.3rem; | ||
border-top-right-radius: 0.3rem; | ||
} | ||
|
||
h2, | ||
.widget-content { | ||
padding: 0.5rem; | ||
} | ||
|
||
.widget-content { | ||
font-family: Departure, monospace; | ||
} | ||
} | ||
|
||
header { | ||
grid-area: header; | ||
justify-self: center; | ||
color: #ffffff; | ||
} | ||
|
||
#logs { | ||
grid-area: logs; | ||
} | ||
|
||
#last_config { | ||
grid-area: sub-header; | ||
} | ||
|
||
.console { | ||
white-space: pre-wrap; | ||
word-wrap: break-word; | ||
max-height: 30em; | ||
overflow: scroll; | ||
} | ||
|
||
#connections { | ||
grid-area: connections; | ||
} | ||
|
||
table { | ||
width: 100%; | ||
border-collapse: collapse; | ||
} | ||
|
||
table, | ||
th, | ||
td { | ||
border: 1px solid hsla(214, 100%, 65%, 0.566); | ||
; | ||
} | ||
|
||
th, | ||
td { | ||
padding: 8px; | ||
text-align: left; | ||
} |
Oops, something went wrong.