Music production session manager https://www.laborejo.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
2.2KB

  1. program=agordejo
  2. version=0.1
  3. #debugsym=true
  4. prefix=/usr/local
  5. required_version_python=3.6
  6. required_version_pyqt=5.0
  7. required_version_nuitka=0.6
  8. for arg in "$@"; do
  9. case "$arg" in
  10. --prefix=*)
  11. prefix=`echo $arg | sed 's/--prefix=//'`
  12. ;;
  13. #--enable-debug)
  14. # debugsym=true;;
  15. #--disable-debug)
  16. # debugsym=false;;
  17. --help)
  18. echo 'usage: ./configure [options]'
  19. echo 'options:'
  20. echo ' --prefix=<path>: installation prefix'
  21. #echo ' --enable-debug: include debug symbols'
  22. #echo ' --disable-debug: do not include debug symbols'
  23. echo 'all invalid options are silently ignored'
  24. exit 0
  25. ;;
  26. esac
  27. done
  28. echo "PREFIX=$prefix"
  29. echo "Checking Dependencies. No output is good"
  30. function version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; }
  31. command -v python3 >/dev/null 2>&1 || { echo >&2 "Python3 >= $required_version_python is required but it's not installed. Aborting."; exit 1; }
  32. PY3VERSION=$(python3 -c 'import platform; print(platform.python_version())')
  33. if version_gt $required_version_python $PY3VERSION; then echo "Python3 must be version >= $required_version_python but is $PY3VERSION. Aborting."; exit 1; fi
  34. python3 -c 'import PyQt5' >/dev/null 2>&1 || { echo >&2 "PyQt for Python3 >= $required_version_pyqt is required but it's not installed. Aborting."; exit 1; }
  35. PYQTVERSION=$(python3 -c 'from PyQt5.QtCore import QT_VERSION_STR; print(QT_VERSION_STR)')
  36. if version_gt $required_version_pyqt $PYQTVERSION; then echo "PyQt must be version >= $required_version_pyqt but is $PYQTVERSION. Aborting."; exit 1; fi
  37. command -v nuitka3 >/dev/null 2>&1 || { echo >&2 "Nuitka3 is required but it's not installed. Aborting."; exit 1; }
  38. NUITKAVERSION=$(python3 -c 'import nuitka.Version; print(nuitka.Version.getNuitkaVersion())')
  39. if version_gt $required_version_nuitka $NUITKAVERSION; then echo "Nuitka3 must be version >= $required_version_nuitka but is $NUITKAVERSION. Aborting."; exit 1; fi
  40. echo "generating makefile"
  41. printf "PREFIX=$prefix\nPROGRAM=$program\nVERSION=$version\n" >Makefile
  42. #if $debugsym; then
  43. # echo 'dbg = -g' >>Makefile
  44. #fi
  45. cat Makefile.in >>Makefile
  46. echo 'configuration complete, type make to build.'