vim

Fork of vim, an acceptable text editor
git clone git://git.laack.co/vim.git
Log | Files | Refs | README | LICENSE

main.aap (3163B)


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