Advertisement
IssyPutchy

Ham gear for Termux

Apr 18th, 2021 (edited)
708
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.95 KB | None | 0 0
  1. pkg up
  2. pkg i curl
  3. curl https://its-pointless.github.io/setup-pointless-repo.sh |bash
  4. pkg i build-essential cmake make git libusb pulseaudio portaudio fftw gcc-10 libgfortran5 openblas
  5. setupclang-gfort-10
  6. mkdir -p ~/git_ham
  7. cd ~/git_ham
  8. git clone https://github.com/libusb/libusb.git
  9. git clone https://github.com/librtlsdr/librtlsdr.git
  10. git clone https://github.com/LouisErigHerve/dsd.git
  11. git clone https://github.com/LouisErigHerve/mbelib.git
  12. git clone https://github.com/kumanna/itpp.git
  13. cd itpp
  14. mkdir build
  15. cd build
  16. if cmake -DCMAKE_INSTALL_PREFIX=$PREFIX ..; then
  17.  echo "Building ITPP..."
  18.  if make; then
  19.   make install
  20.   echo "Built. Now doing librtlsdr..."
  21.    else
  22.   echo "Oops, something borked!"
  23.   exit 0
  24.  fi
  25.   else
  26.  echo "Setup failed"
  27.  exit 0
  28. fi
  29. cd ~/git_ham/librtlsdr
  30. mkdir build
  31. cd build
  32. ## Patch pthread badly
  33. sed -i 's/pthread_cancel/pthread_exit/g' /data/data/com.termux/files/home/git_ham/librtlsdr/src/rtl_adsb.c
  34. if cmake -DCMAKE_INSTALL_PREFIX=$PREFIX ..; then
  35.  echo "Building..."
  36.  if make; then
  37.   make install
  38.   echo "Done. Now doing mbelib..."
  39.    else
  40.   echo "Bork!"
  41.   exit 0
  42.  fi
  43.   else
  44.  echo "Borked!"
  45.  exit 0
  46. fi
  47. cd ~/git_ham/mbelib
  48. mkdir build
  49. cd build
  50. if cmake -DCMAKE_INSTALL_PREFIX=$PREFIX ..; then
  51.  echo "Building..."
  52.  if make; then
  53.   make install
  54.   echo "Done. Now doing dsd.."
  55.    else
  56.   echo "Bork!"
  57.   exit 0
  58.  fi
  59.   else
  60.  echo "Borked!"
  61.  exit 0
  62. fi
  63. cd ~/ham_git/dsd
  64. ## Patch dsd for Android
  65. echo "Patching DSD.."
  66. sed -i 's/sys\/soundcard.h/linux\/soundcard.h/g' /data/data/com.termux/files/home/git_ham/dsd/include/dsd.h
  67. mkdir build
  68. if cmake -DMBE_INCLUDE_DIR=$PREFIX/local/include -D ITPP_INCLUDE_DIR=$PREFIX/include/itpp -D ITPP_LIBRARY=$PREFIX/lib/libitpp_debug.so -DCMAKE_INSTALL_PREFIX=$PREFIX ..; then
  69.  echo "Building..."
  70.  if make; then
  71.   make install
  72.   echo "Done!"
  73.    else
  74.   echo "Bork!"
  75.   exit 0
  76.  fi
  77.   else
  78.  echo "Borked!"
  79.  exit 0
  80. fi
  81. echo "librtlsdr and dsd successfully installed!"
  82.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement