1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-22 13:00:08 +00:00
pdf2htmlEX/buildScripts/createAlpineTarFile

82 lines
1.9 KiB
Plaintext
Raw Normal View History

2020-06-21 11:00:27 +00:00
#!/bin/sh
# 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
#
# This is the part which can run *inside* an OCI container.
2020-06-21 11:00:27 +00:00
echo ""
echo "-------------------------------------------------------------------"
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
cd ../imageBuild/alpineTarDir
2020-06-21 11:00:27 +00:00
tar czvf ../$ALPINE_NAME.tar.gz --owner=root --group=root *
2020-06-21 11:00:27 +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.
#
tar xvf $ALPINE_NAME.tar.gz -C /
2020-06-21 11:00:27 +00:00
ALPINE_INSTALL
chmod a+r $ALPINE_NAME.tar.gz