Commandfile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #
  2. # Vagrant Commandfile
  3. # (use with vagrant-devcommands plugin)
  4. #
  5. command 'phpize',
  6. description: 'executes "phpize" to configure source tree for installed PHP version',
  7. script: 'cd /data/v8js && phpize'
  8. command 'configure',
  9. description: 'executes "configure" to prepare build',
  10. parameters: {
  11. cxxflags: { default: "-ggdb -Wall -Wno-write-strings" },
  12. ldflags: { default: "-ggdb" },
  13. },
  14. script: <<-eof
  15. bash -c 'cd /data/build; ../v8js/configure `bash -c "if test -d /opt/libv8-*; then echo -n --with-v8js=; echo /opt/libv8-*; fi"` `test -d "/usr/lib64" && echo --with-libdir=lib64` CXXFLAGS="%{cxxflags}" LDFLAGS="%{ldflags}"'
  16. eof
  17. command 'clean',
  18. description: 'executes "make clean"',
  19. script: <<-eof
  20. cd /data/build; `which gmake || which make` clean
  21. eof
  22. command 'build',
  23. description: 'executes "make"',
  24. script: <<-eof
  25. cd /data/build; `which gmake || which make`
  26. eof
  27. command 'test',
  28. description: 'executes "make test"',
  29. script: <<-eof
  30. cd /data/build; `which gmake || which make` test NO_INTERACTION=1 REPORT_EXIT_STATUS=1
  31. eof
  32. command 'shell',
  33. description: 'execute a PHP CLI interactive shell with V8Js loaded',
  34. script: <<-eof
  35. cd /data/build; php -a -d extension=modules/v8js.so
  36. eof
  37. chain 'all',
  38. commands: [
  39. { command: 'phpize' },
  40. { command: 'configure' },
  41. { command: 'clean' },
  42. { command: 'build' },
  43. { command: 'test' }
  44. ]