mirror of the now-defunct rocklinux.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.

119 lines
3.4 KiB

  1. #!/bin/bash
  2. comment ' '
  3. menu_begin MENU_DEFAULTS 'Package Defaults'
  4. comment 'Default Linux headers'
  5. block_begin 3
  6. choice ROCKCFG_PKG_LINUX_DEFAULT_HEADERS linux26-headers \
  7. $CFGTEMP_LINUX_HEADERS
  8. block_end
  9. if [ "$ROCKCFG_PKG_LINUX_DEFAULT_HEADERS" == linux24-headers ] ; then
  10. pkgenable linux24-headers
  11. pkgremove linux26-headers
  12. pkgremove linux-libc-headers
  13. elif [ "$ROCKCFG_PKG_LINUX_DEFAULT_HEADERS" == linux26-headers ] ; then
  14. pkgremove linux24-headers
  15. pkgenable linux26-headers
  16. pkgremove linux-libc-headers
  17. elif [ "$ROCKCFG_PKG_LINUX_DEFAULT_HEADERS" == linux-libc-headers ] ; then
  18. pkgremove linux24-headers
  19. pkgremove linux26-headers
  20. pkgenable linux-libc-headers
  21. fi
  22. comment ' '
  23. comment "Default compilers"
  24. block_begin 3
  25. choice ROCKCFG_DEFAULT_CC gcc42 $CFGTEMP_DEFAULT_CC
  26. choice ROCKCFG_DEFAULT_KCC gcc42 $CFGTEMP_DEFAULT_KCC
  27. choice ROCKCFG_DEFAULT_CXX gcc42 $CFGTEMP_DEFAULT_CXX \
  28. 'none' 'No_default_C++_compiler'
  29. choice ROCKCFG_DEFAULT_F77 gcc42 $CFGTEMP_DEFAULT_F77 \
  30. 'none' 'No_default_Fortran_77_compiler'
  31. choice ROCKCFG_DEFAULT_F95 gcc42 $CFGTEMP_DEFAULT_F95 \
  32. 'none' 'No_default_Fortran_95_compiler'
  33. pkgenable $ROCKCFG_DEFAULT_CC
  34. pkgenable $ROCKCFG_DEFAULT_KCC
  35. pkgenable $ROCKCFG_DEFAULT_CXX
  36. pkgenable $ROCKCFG_DEFAULT_F77
  37. pkgenable $ROCKCFG_DEFAULT_F95
  38. block_end
  39. # Build non-default CCs in stages 5 and 9
  40. # and dedicated C++ and Fortran77 compilers in stages 4 and 9.
  41. # Also remove CORE flag from non-default compilers.
  42. k=""; for x in $CFGTEMP_DEFAULT_CC $CFGTEMP_DEFAULT_CXX $CFGTEMP_DEFAULT_F77 ; do
  43. if [ "$ROCKCFG_DEFAULT_CC" != "$x" ] ; then
  44. if [[ "$ROCKCFG_DEFAULT_CXX" != "$x" && \
  45. "$ROCKCFG_DEFAULT_F77" != "$x" ]]; then
  46. k="$k /[ =]$x / s/^\(.\) [0-9-]*/\1 -----5---9/;"
  47. if [[ "$ROCKCFG_DEFAULT_KCC" != "$x" && \
  48. "$ROCKCFG_DEFAULT_F95" != "$x" ]] ; then
  49. k="$k /[ =]$x / s/\(.*\) CORE \(.*\)/\1 \2/;"
  50. fi
  51. else
  52. k="$k /[ =]$x / s/^\(.\) [0-9-]*/\1 ----4----9/;"
  53. fi
  54. fi
  55. done
  56. pkgfilter sed -e "$k"
  57. comment ' '
  58. comment "Default X server"
  59. block_begin 3
  60. choice ROCKCFG_DEFAULT_X11 xorg $CFGTEMP_DEFAULT_X11
  61. block_end
  62. # comment ' '
  63. # comment "Default shell"
  64. # block_begin 3
  65. # choice ROCKCFG_DEFAULT_SH bash3 $CFGTEMP_DEFAULT_SH
  66. # block_end
  67. #
  68. # comment ' '
  69. # comment "Default C library"
  70. # block_begin 3
  71. # choice ROCKCFG_DEFAULT_LIBC glibc26 $CFGTEMP_DEFAULT_LIBC
  72. # block_end
  73. # the options below read the packages file
  74. pkgout
  75. comment ' '
  76. comment "Default Printer Package"
  77. block_begin 3
  78. default='none'; list=' '
  79. while read pkg ver ; do
  80. default=${default:-$pkg}
  81. [ $pkg = cups ] && default=$pkg
  82. list="$list $pkg Use_${pkg}_($ver)_as_standard_print_system"
  83. done < <(grep " PRINTER " $swpdir/packages | cut -f5,6 -d' ')
  84. list="$list none Do_not_configure_a_default_print_system"
  85. choice ROCKCFG_DEFAULT_PRINTER $default $list
  86. if [ "$ROCKCFG_DEFAULT_PRINTER" != none ] ; then
  87. pkgenable $ROCKCFG_DEFAULT_PRINTER
  88. fi
  89. block_end
  90. comment ' '
  91. comment "Default MTA"
  92. block_begin 3
  93. default='none'; list=' '
  94. while read pkg ver ; do
  95. default=${default:-$pkg}
  96. [ $pkg = postfix ] && default=$pkg
  97. list="$list $pkg Use_${pkg}_($ver)_as_standard_MTA"
  98. done < <(grep " MTA " $swpdir/packages | cut -f5,6 -d' ')
  99. list="$list none Do_not_configure_a_default_MTA"
  100. choice ROCKCFG_DEFAULT_MTA $default $list
  101. if [ "$ROCKCFG_DEFAULT_MTA" != none ] ; then
  102. pkgenable $ROCKCFG_DEFAULT_MTA
  103. fi
  104. block_end
  105. menu_end