mongrel2.sh 960 B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/bash
  2. RETCODE=$(fw_exists ${IROOT}/mongrel2.installed)
  3. [ ! "$RETCODE" == 0 ] || { return 0; }
  4. fw_depends zeromq
  5. # Dependencies
  6. sudo apt-get install -y sqlite3 libsqlite3-dev uuid uuid-runtime uuid-dev
  7. # Update linker cache
  8. sudo ldconfig -v
  9. fw_get https://github.com/zedshaw/mongrel2/tarball/v1.8.1 -O mongrel2.tar.gz
  10. fw_untar mongrel2.tar.gz
  11. # mongrel2 untars into this folder
  12. mv zedshaw-mongrel2-aa2ecf8 mongrel2-install
  13. # for zmq4, we update the following file manually (not in v1.8.1)
  14. fw_get https://raw.github.com/zedshaw/mongrel2/9b565eeea003783c47502c2d350b99c9684ce97c/src/zmq_compat.h
  15. mv -f zmq_compat.h mongrel2-install/src/
  16. cd mongrel2-install
  17. # Do this in a subshell to avoid leaking env variables
  18. (
  19. export PREFIX=${IROOT}/mongrel2
  20. export OPTFLAGS="-I$IROOT/zeromq-4.0.3/include"
  21. export OPTLIBS="-Wl,-rpath,$IROOT/zeromq-4.0.3/lib -L$IROOT/zeromq-4.0.3/lib"
  22. make clean all
  23. make install
  24. )
  25. touch ${IROOT}/mongrel2.installed