Skip to content

Instantly share code, notes, and snippets.

@raedatoui
Last active October 30, 2019 21:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raedatoui/a0b06c1b239a7ca35b9df29245a82a6f to your computer and use it in GitHub Desktop.
Save raedatoui/a0b06c1b239a7ca35b9df29245a82a6f to your computer and use it in GitHub Desktop.
Audiowaveform binary for AWS Lambda
#!/bin/bash
# this will require exporting the LD_LIBRARY_PATH
# you can export this to /usr/lib but I just moved libmad.s0.0.2.1 into the same directory
# as the audiowaveform binary and exported LD_LIBRARY_PATH to the current path
# export LD_LIBRARY_PATH=$(pwd)
wget http://downloads.sourceforge.net/mad/libmad-0.15.1b.tar.gz
tar -xvf libmad-0.15.1b.tar.gz
rm libmad-0.15.1b.tar.gz
cd libmad-0.15.1b
sed -i '/-fforce-mem/d' configure
./configure --prefix=/usr
make
make install
git clone https://github.com/bbc/audiowaveform.git
cd audiowaveform
wget https://github.com/google/googletest/archive/release-1.8.0.tar.gz
tar xzf release-1.8.0.tar.gz
ln -s googletest-release-1.8.0/googletest googletest
ln -s googletest-release-1.8.0/googlemock googlemock
mkdir build
cd build
cmake ..
make
FROM amazonlinux:latest
RUN yum -y install wget tar git make cmake gcc-c++ libmad-devel libid3tag-devel libsndfile-devel gd-devel boost-devel
# Add compile script
ADD compile.sh /
RUN chmod +x /compile.sh
CMD tail -f /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment