Last active
December 27, 2023 19:02
-
-
Save nickovs/f097c577df90bdeb98ea0127c60e3462 to your computer and use it in GitHub Desktop.
A script for building a version of the Zbar library suitable for running in an AWS Lambda instance
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
#!/bin/bash | |
# Clear out old images | |
[ -d "lib" ] && rm -r lib | |
cat <<EOF > tmp_recipe.sh | |
# This is the actual container-side recipe | |
yum groupinstall -y "Development Tools" | |
cd /root | |
git clone https://github.com/mchehab/zbar.git | |
cd zbar | |
autoreconf -vfi | |
./configure --prefix=/usr --without-xshm --without-xv --without-jpeg --without-imagemagick --without-gtk --without-python --without-qt --disable-video | |
make | |
mkdir -p /build/lib | |
cp -a zbar/.libs/libzbar.so* /build/lib | |
EOF | |
# Run the recipe in an Amazon Linux 2 container | |
docker run --rm -it -v $(pwd):/build amazonlinux:2 bash /build/tmp_recipe.sh | |
rm tmp_recipe.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks very much!!!