1 # Aap recipe for Afrikaans Vim spell files.
3 # Use a freshly compiled Vim if it exists.
4 @if os.path.exists('../../../src/vim'):
10 FILES = af_ZA.aff af_ZA.dic
12 all: $SPELLDIR/af.latin1.spl $SPELLDIR/af.utf-8.spl ../README_af.txt
14 $SPELLDIR/af.latin1.spl : $FILES
15 :sys env LANG=af_ZA.ISO8859-1
16 $VIM -u NONE -e -c "mkspell! $SPELLDIR/af af_ZA" -c q
18 $SPELLDIR/af.utf-8.spl : $FILES
19 :sys env LANG=af_ZA.UTF-8
20 $VIM -u NONE -e -c "mkspell! $SPELLDIR/af af_ZA" -c q
22 ../README_af.txt : README_af_ZA.txt
26 # Fetching the file from SourceForge. The archive at OpenOffice is broken!
28 FILE = http://surfnet.dl.sourceforge.net/sourceforge/translate/myspell-af_ZA-20040727.zip
30 :attr {fetch = $FILE} af_ZA.zip
32 # The files don't depend on the .zip file so that we can delete it.
33 # Only download the zip file if the targets don't exist.
34 af_ZA.aff af_ZA.dic: {buildcheck=}
35 :assertpkg unzip patch
39 @if not os.path.exists('af_ZA.orig.aff'):
40 :copy af_ZA.aff af_ZA.orig.aff
41 @if not os.path.exists('af_ZA.orig.dic'):
42 :copy af_ZA.dic af_ZA.orig.dic
43 @if os.path.exists('af_ZA.diff'):
44 :sys patch <af_ZA.diff
47 # Generate diff files, so that others can get the OpenOffice files and apply
48 # the diffs to get the Vim versions.
52 :sys {force} diff -a -C 1 af_ZA.orig.aff af_ZA.aff >af_ZA.diff
53 :sys {force} diff -a -C 1 af_ZA.orig.dic af_ZA.dic >>af_ZA.diff
56 # Check for updated OpenOffice spell files. When there are changes the
57 # ".new.aff" and ".new.dic" files are left behind for manual inspection.
66 :sys $UNZIP ../af_ZA.zip
67 :sys {force} diff ../af_ZA.orig.aff af_ZA.aff >d
68 @if os.stat('d')[stat.ST_SIZE] > 0:
69 :copy af_ZA.aff ../af_ZA.new.aff
70 :sys {force} diff ../af_ZA.orig.dic af_ZA.dic >d
71 @if os.stat('d')[stat.ST_SIZE] > 0:
72 :copy af_ZA.dic ../af_ZA.new.dic
79 # vim: set sts=4 sw=4 :