main.aap 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. # Aap recipe for German Vim spell files.
  2. #
  3. # Since there is a big discussion about whether to use the old or the new
  4. # spelling rules, both have been included.
  5. # "de": new German spelling
  6. # "de_de": old and new German spelling
  7. # "de_19": old German spelling
  8. # "de_20": new German spelling
  9. # "de_AT": Austrian spelling
  10. # "de_CH": Swiss spelling
  11. # Use a freshly compiled Vim if it exists.
  12. @if os.path.exists('../../../src/vim'):
  13. VIM = ../../../src/vim
  14. @else:
  15. :progsearch VIM vim
  16. REGIONS = DE 19 20 AT CH
  17. DE_REGIONS = de_$*REGIONS
  18. SPELLDIR = ..
  19. FILES = de_$*(REGIONS).aff de_$*(REGIONS).dic
  20. # The de_20 is the same as de_DE dictionary and only uses the
  21. # new revised orthography
  22. FILE_DE_AFF = de_DE_frami.aff
  23. FILE_DE_DIC = de_DE_frami.dic
  24. FILE_20_AFF = de_DE_frami.aff
  25. FILE_20_DIC = de_DE_frami.dic
  26. FILE_AT_AFF = de_AT_frami.aff
  27. FILE_AT_DIC = de_AT_frami.dic
  28. FILE_CH_AFF = de_CH_frami.aff
  29. FILE_CH_DIC = de_CH_frami.dic
  30. #ZIPFILES = $ZIPFILE_DE $ZIPFILE_20 $ZIPFILE_AT $ZIPFILE_CH
  31. ZIPFILE_19 = de_OLDSPELL.zip # unmaintained
  32. DICT_FILES = $FILE_20_AFF $FILE_20_DIC $FILE_AT_AFF $FILE_AT_DIC $FILE_CH_AFF $FILE_CH_DIC
  33. # frami files adjusted for Vim are found here
  34. YAMAGIDIR = https://raw.githubusercontent.com/Yamagi/vim-german-dictionaries/master
  35. READMES = README.md
  36. :attr {fetch = $YAMAGIDIR/%file%} $READMES
  37. all: $SPELLDIR/de.latin1.spl $SPELLDIR/de.utf-8.spl ../README_de.txt
  38. $SPELLDIR/de.latin1.spl : $FILES
  39. :sys env LANG=de_DE.ISO-8859-1
  40. $VIM -u NONE -e -c "mkspell! $SPELLDIR/de $DE_REGIONS" -c q
  41. $SPELLDIR/de.utf-8.spl : $FILES
  42. :sys env LANG=de_DE.UTF-8
  43. $VIM -u NONE -e -c "mkspell! $SPELLDIR/de $DE_REGIONS" -c q
  44. ../README_de.txt: $READMES
  45. :fetch $READMES
  46. :print README.md >! $target
  47. :cat README.md >> $target
  48. #
  49. # Fetching the files from the LibreOffices github repository.
  50. # The OLDSPELL file comes from elsewhere
  51. #
  52. DEDIR = http://www.j3e.de/myspell
  53. :attr {fetch = $YAMAGIDIR/src/%file%} $DICT_FILES
  54. :attr {fetch = $DEDIR/%file%} $ZIPFILE_19
  55. de_DE.aff de_DE.dic de_20.aff de_20.dic: {buildcheck=}
  56. :fetch $FILE_DE_AFF
  57. :fetch $FILE_DE_DIC
  58. :move de_DE_frami.aff de_DE.aff
  59. :move de_DE_frami.dic de_DE.dic
  60. :copy de_DE.aff de_20.aff
  61. :copy de_DE.dic de_20.dic
  62. de_19.aff de_19.dic: {buildcheck=}
  63. :assertpkg unzip patch
  64. :fetch $ZIPFILE_19
  65. :sys $UNZIP $ZIPFILE_19
  66. :delete $ZIPFILE_19
  67. :move de_OLDSPELL.aff de_19.aff
  68. :move de_OLDSPELL.dic de_19.dic
  69. @if not os.path.exists('de_19.orig.aff'):
  70. :copy de_19.aff de_19.orig.aff
  71. @if not os.path.exists('de_19.orig.dic'):
  72. :copy de_19.dic de_19.orig.dic
  73. @if os.path.exists('de_19.diff'):
  74. :sys patch <de_19.diff
  75. de_AT.aff de_AT.dic: {buildcheck=}
  76. :fetch $FILE_AT_AFF
  77. :fetch $FILE_AT_DIC
  78. :move $FILE_AT_AFF de_AT.aff
  79. :move $FILE_AT_DIC de_AT.dic
  80. de_CH.aff de_CH.dic: {buildcheck=}
  81. :fetch $FILE_CH_AFF
  82. :fetch $FILE_CH_DIC
  83. :move $FILE_CH_AFF de_CH.aff
  84. :move $FILE_CH_DIC de_CH.dic
  85. # vim: set sts=4 sw=4 :