config.termux.sh 998 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash
  2. set -xe
  3. apt update
  4. apt install -y git cmake clang pkg-config
  5. apt install -y libevent libcurl openssl pcre2 python2
  6. git clone https://github.com/jbeder/yaml-cpp --depth=1
  7. cd yaml-cpp
  8. cmake -DCMAKE_INSTALL_PREFIX=/data/data/com.termux/files/usr -DYAML_CPP_BUILD_TESTS=OFF -DYAML_CPP_BUILD_TOOLS=OFF .
  9. make install -j3
  10. cd ..
  11. git clone https://github.com/tencent/rapidjson --depth=1
  12. cd rapidjson
  13. cp -r include/* /data/data/com.termux/files/usr/include/
  14. cd ..
  15. git clone https://github.com/svaarala/duktape --depth=1
  16. cd duktape
  17. pip2 install PyYAML
  18. python2 util/dist.py
  19. cd dist/src
  20. cc -c -O3 -o duktape.o duktape.c
  21. cc -c -O3 -o duk_module_node.o -I. ../extras/module-node/duk_module_node.c
  22. ar cr libduktape.a duktape.o
  23. ar cr libduktape_module.a duk_module_node.o
  24. install -m0644 ./*.a /data/data/com.termux/files/usr/lib
  25. install -m0644 duk*.h /data/data/com.termux/files/usr/include
  26. install -m0644 ../extras/module-node/duk_module_node.h /data/data/com.termux/files/usr/include
  27. cd ../../..