1 # Aap recipe for Zulu Vim spell files.
3 # Use a freshly compiled Vim if it exists.
4 @if os.path.exists('../../../src/vim'):
10 FILES = zu_ZA.aff zu_ZA.dic
12 # There is no Zulu locale, use the Dutch one instead.
13 all: $SPELLDIR/zu.latin1.spl $SPELLDIR/zu.utf-8.spl \
14 $SPELLDIR/zu.ascii.spl ../README_zu.txt
16 $SPELLDIR/zu.latin1.spl : $FILES
17 :sys env LANG=nl_NL.ISO8859-1
18 $VIM -u NONE -e -c "mkspell! $SPELLDIR/zu zu_ZA" -c q
20 $SPELLDIR/zu.utf-8.spl : $FILES
21 :sys env LANG=nl_NL.UTF-8
22 $VIM -u NONE -e -c "mkspell! $SPELLDIR/zu zu_ZA" -c q
24 $SPELLDIR/zu.ascii.spl : $FILES
25 :sys $VIM -u NONE -e -c "mkspell! -ascii $SPELLDIR/zu zu_ZA" -c q
27 ../README_zu.txt : README_zu_ZA.txt
31 # Fetching the files from OpenOffice.org.
33 OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
34 :attr {fetch = $OODIR/%file%} zu_ZA.zip
36 # The files don't depend on the .zip file so that we can delete it.
37 # Only download the zip file if the targets don't exist.
38 zu_ZA.aff zu_ZA.dic: {buildcheck=}
39 :assertpkg unzip patch
43 @if not os.path.exists('zu_ZA.orig.aff'):
44 :copy zu_ZA.aff zu_ZA.orig.aff
45 @if not os.path.exists('zu_ZA.orig.dic'):
46 :copy zu_ZA.dic zu_ZA.orig.dic
47 @if os.path.exists('zu_ZA.diff'):
48 :sys patch <zu_ZA.diff
51 # Generate diff files, so that others can get the OpenOffice files and apply
52 # the diffs to get the Vim versions.
56 :sys {force} diff -a -C 1 zu_ZA.orig.aff zu_ZA.aff >zu_ZA.diff
57 :sys {force} diff -a -C 1 zu_ZA.orig.dic zu_ZA.dic >>zu_ZA.diff
60 # Check for updated OpenOffice spell files. When there are changes the
61 # ".new.aff" and ".new.dic" files are left behind for manual inspection.
70 :sys $UNZIP ../zu_ZA.zip
71 :sys {force} diff ../zu_ZA.orig.aff zu_ZA.aff >d
72 @if os.stat('d')[stat.ST_SIZE] > 0:
73 :copy zu_ZA.aff ../zu_ZA.new.aff
74 :sys {force} diff ../zu_ZA.orig.dic zu_ZA.dic >d
75 @if os.stat('d')[stat.ST_SIZE] > 0:
76 :copy zu_ZA.dic ../zu_ZA.new.dic
83 # vim: set sts=4 sw=4 :