2020-06-21 11:00:27 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2020-07-07 18:01:43 +00:00
|
|
|
# This shell script creates a tar file which can use used to create an OCI
|
|
|
|
# container from an existing pdf2htmlEX.
|
2020-06-21 11:00:27 +00:00
|
|
|
#
|
2020-07-07 18:01:43 +00:00
|
|
|
# This is the part which can run *inside* an OCI container.
|
2020-06-21 11:00:27 +00:00
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "-------------------------------------------------------------------"
|
2020-07-07 18:01:43 +00:00
|
|
|
echo "CREATING pdf2htmlEX Container Image (run inside an OCI container)"
|
2020-06-21 11:00:27 +00:00
|
|
|
echo " (based on Alpine linux $BUILD_DIST)"
|
|
|
|
echo "-------------------------------------------------------------------"
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
# Collect everything that will be needed...
|
|
|
|
|
|
|
|
# source buildScripts/reSourceVersionEnvs
|
|
|
|
. buildScripts/reSourceVersionEnvs
|
|
|
|
|
|
|
|
export ALPINE_NAME="pdf2htmlEX-$PDF2HTMLEX_NAME"
|
|
|
|
|
|
|
|
echo "export ALPINE_NAME=\"$ALPINE_NAME\"" >> buildScripts/reSourceVersionEnvs
|
|
|
|
|
|
|
|
set -ev
|
|
|
|
|
|
|
|
mkdir -p imageBuild/alpineTarDir
|
|
|
|
|
|
|
|
cd pdf2htmlEX/build
|
|
|
|
|
|
|
|
sudo rm -rf install_manifest.txt
|
|
|
|
|
|
|
|
make install DESTDIR=../../imageBuild/alpineTarDir
|
|
|
|
|
|
|
|
cd ../../poppler-data
|
|
|
|
|
|
|
|
make install \
|
|
|
|
prefix=$PDF2HTMLEX_PREFIX \
|
|
|
|
datadir=$PDF2HTMLEX_PREFIX/share/pdf2htmlEX \
|
|
|
|
DESTDIR=../imageBuild/alpineTarDir
|
|
|
|
|
2020-06-23 09:52:49 +00:00
|
|
|
cd ../imageBuild/alpineTarDir
|
2020-06-21 11:00:27 +00:00
|
|
|
|
2020-06-23 09:52:49 +00:00
|
|
|
tar czvf ../$ALPINE_NAME.tar.gz --owner=root --group=root *
|
2020-06-21 11:00:27 +00:00
|
|
|
|
2020-06-23 12:03:30 +00:00
|
|
|
cd ..
|
|
|
|
|
2020-06-21 11:00:27 +00:00
|
|
|
cat <<ALPINE_INSTALL > $ALPINE_NAME.install
|
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# This (alpine) shell script installs a locally existing tar.gz file of
|
|
|
|
# the pdf2htmlEX binaries compiled on Alpine $DIST.
|
|
|
|
#
|
|
|
|
# You MUST have root/sudo privileges to run this file.
|
|
|
|
#
|
|
|
|
|
|
|
|
# We start by installing all of the (known) required runtime dependencies
|
|
|
|
#
|
|
|
|
apk update
|
|
|
|
#
|
|
|
|
apk add --no-cache \
|
|
|
|
tar \
|
|
|
|
libstdc++ \
|
|
|
|
libgcc \
|
|
|
|
gnu-libiconv \
|
|
|
|
gettext \
|
|
|
|
glib \
|
|
|
|
freetype \
|
|
|
|
fontconfig \
|
|
|
|
cairo \
|
|
|
|
libpng \
|
|
|
|
libjpeg-turbo \
|
|
|
|
libxml2
|
|
|
|
|
|
|
|
# Now we install the (Alpine $DIST) compiled pdf2htmlEX binaries and
|
|
|
|
# configuration files.
|
|
|
|
#
|
2020-06-23 09:52:49 +00:00
|
|
|
tar xvf $ALPINE_NAME.tar.gz -C /
|
2020-06-21 11:00:27 +00:00
|
|
|
|
|
|
|
ALPINE_INSTALL
|
|
|
|
|
2020-06-23 04:15:28 +00:00
|
|
|
chmod a+r $ALPINE_NAME.tar.gz
|