adkprepare.sh 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. #!/bin/sh
  2. # This file is part of the OpenADK project. OpenADK is copyrighted
  3. # material, please see the LICENCE file in the top-level directory.
  4. os=$(uname)
  5. ver=$(uname -r)
  6. arch=$(uname -m)
  7. ext=0
  8. while getopts "e" option
  9. do
  10. case $option in
  11. e) ext=1 ;;
  12. *) printf "Option not recognized\n";exit 1 ;;
  13. esac
  14. done
  15. shift $(($OPTIND - 1))
  16. linux() {
  17. echo "Preparing Linux for OpenADK"
  18. }
  19. darwin() {
  20. echo "Preparing MacOS X for OpenADK"
  21. }
  22. openbsd() {
  23. echo "Preparing OpenBSD for OpenADK"
  24. PKG_PATH="ftp://ftp.openbsd.org/pub/OpenBSD/${ver}/packages/${arch}/"
  25. export PKG_PATH
  26. pkg_add -v gmake
  27. pkg_add -v git
  28. pkg_add -v bash
  29. pkg_add -v unzip
  30. pkg_add -v wget
  31. pkg_add -v gtar--
  32. pkg_add -v gawk
  33. pkg_add -v gsed
  34. pkg_add -v xz
  35. }
  36. openbsd_full() {
  37. PKG_PATH="ftp://ftp.openbsd.org/pub/OpenBSD/${ver}/packages/${arch}/"
  38. export PKG_PATH
  39. pkg_add -v bison
  40. pkg_add -v zip
  41. pkg_add -v intltool
  42. pkg_add -v libIDL
  43. pkg_add -v m4
  44. pkg_add -v autoconf-2.62p0
  45. pkg_add -v gperf
  46. pkg_add -v python-2.6.3p1
  47. }
  48. netbsd() {
  49. echo "Preparing NetBSD for OpenADK"
  50. PKG_PATH="ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/${arch}/5.0/All/"
  51. export PKG_PATH
  52. pkg_add -vu xz
  53. pkg_add -vu scmgit
  54. pkg_add -vu gmake
  55. pkg_add -vu bash
  56. pkg_add -vu wget
  57. pkg_add -vu pkg-config
  58. pkg_add -vu unzip
  59. pkg_add -vu gtar
  60. pkg_add -vu gsed
  61. pkg_add -vu gawk
  62. pkg_add -vu gperf
  63. }
  64. netbsd_full() {
  65. echo "Preparing NetBSD for full OpenADK package builds"
  66. PKG_PATH="ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/${arch}/5.0/All/"
  67. export PKG_PATH
  68. pkg_add -vu intltool
  69. pkg_add -vu lynx
  70. pkg_add -vu zip
  71. pkg_add -vu bison
  72. pkg_add -vu libIDL
  73. pkg_add -vu xkbcomp
  74. pkg_add -vu python26
  75. }
  76. freebsd() {
  77. echo "Preparing FreeBSD for OpenADK"
  78. pkg_add -r git gmake bash wget unzip gtar gsed gawk gperf
  79. }
  80. freebsd_full() {
  81. echo "Preparing FreeBSD for full OpenADK package builds"
  82. pkg_add -r intltool lynx bison zip xkbcomp glib20 libIDL autoconf262
  83. }
  84. case $os in
  85. Linux)
  86. linux
  87. [ $ext -eq 1 ] && linux_full
  88. ;;
  89. FreeBSD)
  90. freebsd
  91. [ $ext -eq 1 ] && freebsd_full
  92. ;;
  93. OpenBSD)
  94. openbsd
  95. [ $ext -eq 1 ] && openbsd_full
  96. ;;
  97. NetBSD)
  98. netbsd
  99. [ $ext -eq 1 ] && netbsd_full
  100. ;;
  101. Darwin)
  102. darwin
  103. [ $ext -eq 1 ] && darwin_full
  104. ;;
  105. *)
  106. echo "OS not supported"
  107. ;;
  108. esac