Skip to content

Instantly share code, notes, and snippets.

@mcolyer
Forked from stomita/build.sh
Last active December 16, 2015 03:59
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 mcolyer/5374122 to your computer and use it in GitHub Desktop.
Save mcolyer/5374122 to your computer and use it in GitHub Desktop.
Build PhantomJS
#!/bin/bash
BUILDPACK_PREFIX=/home/ubuntu/phantomjs
PHANTOMJS_VERSION="1.9.0"
PHANTOMJS_DIR="phantomjs-${PHANTOMJS_VERSION}"
INCREMENT=v2
mkdir -p ${BUILDPACK_PREFIX}
sudo apt-get update
sudo apt-get install build-essential chrpath git-core libssl-dev libfontconfig1-dev -y
curl -L "https://github.com/mcolyer/phantomjs/tarball/fix-woff-1.9" | tar zxf -
mv mcolyer-phantomjs-* ${PHANTOMJS_DIR}
cd ${PHANTOMJS_DIR}
#./build.sh --qt-config "-I${BUILDPACK_PREFIX}/include -L${BUILDPACK_PREFIX}/lib" --confirm
./deploy/build-and-package.sh
cd ./deploy/phantomjs-*; tar cf - . | (cd ${BUILDPACK_PREFIX}; tar xpf -)
cd ${BUILDPACK_PREFIX} && tar zcf ~/buildpack-phantomjs-${PHANTOMJS_VERSION}-${INCREMENT}.tar.gz .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment