pkgmaker 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. export TOPDIR=$(realpath ..)
  2. if gmake --help >/dev/null 2>&1; then
  3. export GMAKE=gmake
  4. else
  5. export GMAKE=make
  6. fi
  7. for subdir in bash bc mksh; do
  8. cd $subdir
  9. pn=$($GMAKE show=PKG_NAME)
  10. pa=$($GMAKE show=ALL_PKGOPTS)
  11. pfl=$($GMAKE show=PKG_FLAVOURS)
  12. typeset -u pnu=$pn
  13. pd=$($GMAKE show=PKG_DESCR)
  14. ph=$($GMAKE show=PKG_URL)
  15. (
  16. print "config ADK_COMPILE_$pnu"
  17. print \\ttristate
  18. print -n \\tdepends on
  19. sp=' '
  20. for xu in $pa; do
  21. print -n "${sp}ADK_PACKAGE_$xu"
  22. sp=' || '
  23. done
  24. print
  25. print \\tdefault n
  26. for xu in $pa; do
  27. x=$($GMAKE show=PKGNAME_$xu)
  28. print \\nconfig ADK_PACKAGE_$xu
  29. xf=$x
  30. while (( ${#xf} < 34 )); do
  31. xf=$xf.
  32. done
  33. print "\tprompt \"$xf ${pd:-$pn}\""
  34. print \\ttristate
  35. print \\tdefault n
  36. print \\tselect ADK_COMPILE_$pnu
  37. if [[ -n $pd$ph ]]; then
  38. print \\thelp
  39. [[ -n $pd ]] && print "\t $pd"
  40. [[ -n $pd && -n $ph ]] && print '\t '
  41. [[ -n $ph ]] && print "\t $ph"
  42. fi
  43. done
  44. for pf in $pfl; do
  45. pfd=$($GMAKE show=PKGFD_$pf)
  46. print
  47. print config ADK_PACKAGE_${pnu}_$pf
  48. print "\tbool \"${pfd:-flavour ADK_PACKAGE_${pnu}_$pf}\""
  49. print \\tdefault n
  50. print \\tdepends on ADK_COMPILE_$pnu
  51. print \\thelp
  52. print "\t flavour ADK_PACKAGE_${pnu}_$pf"
  53. done
  54. ) >Config.in
  55. cd ..
  56. done