1 # Aap recipe for Russian Vim spell files.
3 # Use a freshly compiled Vim if it exists.
4 @if os.path.exists('../../../src/vim'):
11 FILES = ru_$*(REGIONS).aff ru_$*(REGIONS).dic
13 all: $SPELLDIR/ru.koi8-r.spl $SPELLDIR/ru.utf-8.spl \
14 $SPELLDIR/ru.cp1251.spl ../README_ru.txt
16 $SPELLDIR/ru.koi8-r.spl : $FILES
17 :sys env LANG=ru_RU.KOI8-R $VIM -u NONE -e -c "mkspell! $SPELLDIR/ru ru_RU ru_YO" -c q
19 $SPELLDIR/ru.utf-8.spl : $FILES
20 :sys env LANG=ru_RU.UTF-8 $VIM -u NONE -e -c "mkspell! $SPELLDIR/ru ru_RU ru_YO" -c q
22 $SPELLDIR/ru.cp1251.spl : $FILES
23 :sys env LANG=ru_RU.CP1251 $VIM -u NONE -e -c "mkspell! $SPELLDIR/ru ru_RU ru_YO" -c q
25 ../README_ru.txt: README_ru_$*(REGIONS).txt
26 :print ru_RU >! $target
27 :cat README_ru_RU.txt >> $target
28 :print =================================================== >>$target
29 :print ru_YO >> $target
30 :cat README_ru_YO.txt >> $target
33 # Fetching the files from OpenOffice.org.
35 OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
36 :attr {fetch = $OODIR/%file%} ru_RU.zip ru_RU_yo.zip
38 # The files don't depend on the .zip file so that we can delete it.
39 # Only download the zip file if the targets don't exist.
40 # This is a bit tricky, since the file name includes the date.
41 ru_RU.aff ru_RU.dic: {buildcheck=}
46 @if not os.path.exists('ru_RU.orig.aff'):
47 :copy ru_RU.aff ru_RU.orig.aff
48 @if not os.path.exists('ru_RU.orig.dic'):
49 :copy ru_RU.dic ru_RU.orig.dic
50 @if os.path.exists('ru_RU.diff'):
51 :sys patch <ru_RU.diff
53 ru_YO.aff ru_YO.dic: {buildcheck=}
56 :sys unzip ru_RU_yo.zip
58 :move ru_RU_yo.aff ru_YO.aff
59 :move ru_RU_yo.dic ru_YO.dic
60 :move README_ru_RU_yo.txt README_ru_YO.txt
61 @if not os.path.exists('ru_YO.orig.aff'):
62 :copy ru_YO.aff ru_YO.orig.aff
63 @if not os.path.exists('ru_YO.orig.dic'):
64 :copy ru_YO.dic ru_YO.orig.dic
65 @if os.path.exists('ru_YO.diff'):
66 :sys patch <ru_YO.diff
69 # Generate diff files, so that others can get the OpenOffice files and apply
70 # the diffs to get the Vim versions.
74 :sys {force} diff -a -C 1 ru_RU.orig.aff ru_RU.aff >ru_RU.diff
75 :sys {force} diff -a -C 1 ru_RU.orig.dic ru_RU.dic >>ru_RU.diff
76 :sys {force} diff -a -C 1 ru_YO.orig.aff ru_YO.aff >ru_YO.diff
77 :sys {force} diff -a -C 1 ru_YO.orig.dic ru_YO.dic >>ru_YO.diff
80 # Check for updated spell files. When there are changes the
81 # ".new.aff" and ".new.dic" files are left behind for manual inspection.
84 :print Doesn't work yet.