Created
September 21, 2012 01:14
-
-
Save csquared/3759243 to your computer and use it in GitHub Desktop.
Anvil Build Recipe for psql 9.2.0
This file contains hidden or 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/sh | |
root=$(pwd) | |
cd $root/postgresql-* | |
./configure --prefix=/app/vendor --with-openssl | |
make && make install | |
rm -rf $root/* | |
mv /app/vendor/* $root/ | |
# Here's the script I use from my local machine to build the psql binary and libpq | |
# | |
# #!/bin/sh | |
# | |
# # Usage: build_psql <raw_url_of_this_gist> | |
# | |
# psql_url=http://ftp.postgresql.org/pub/source/v9.2.0/postgresql-9.2.0.tar.bz2 | |
# build_script=$1 | |
# slug=$(heroku build -p $psql_url -b $build_script ) | |
# curl -s $slug | tar zx bin/psql lib/libpq.so.5.5 | |
# # psql looks for libpq.so.5, not libpq.so | |
# mv lib/libpq.so.5.5 lib/libpq.so.5 | |
# Here's how to set up your Heroku app: | |
# (using the build script in the comments and the heroku push plugin) | |
# | |
# > ./build_psql <raw_url_of_this_gist> | |
# > heroku config:add LD_LIBRARY_PATH=/app/lib | |
# > heroku push | |
# > heroku run 'psql $DATABASE_URL' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment