1 # Aap recipe for Chichewa Vim spell files.
3 # Use a freshly compiled Vim if it exists.
4 @if os.path.exists('../../../src/vim'):
10 FILES = ny_MW.aff ny_MW.dic
12 all: $SPELLDIR/ny.iso-8859-14.spl $SPELLDIR/ny.utf-8.spl \
13 $SPELLDIR/ny.ascii.spl ../README_ny.txt
15 $SPELLDIR/ny.iso-8859-14.spl : $FILES
16 :sys $VIM -u NONE -e -c "set enc=iso-8859-14"
17 -c "mkspell! $SPELLDIR/ny ny_MW" -c q
19 $SPELLDIR/ny.utf-8.spl : $FILES
20 :sys $VIM -u NONE -e -c "set enc=utf-8"
21 -c "mkspell! $SPELLDIR/ny ny_MW" -c q
23 $SPELLDIR/ny.ascii.spl : $FILES
24 :sys $VIM -u NONE -e -c "mkspell! -ascii $SPELLDIR/ny ny_MW" -c q
26 ../README_ny.txt : README_ny_MW.txt
30 # Fetching the files from OpenOffice.org.
32 OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
33 :attr {fetch = $OODIR/%file%} ny_MW.zip
35 # The files don't depend on the .zip file so that we can delete it.
36 # Only download the zip file if the targets don't exist.
37 ny_MW.aff ny_MW.dic: {buildcheck=}
38 :assertpkg unzip patch
42 @if not os.path.exists('ny_MW.orig.aff'):
43 :copy ny_MW.aff ny_MW.orig.aff
44 @if not os.path.exists('ny_MW.orig.dic'):
45 :copy ny_MW.dic ny_MW.orig.dic
46 @if os.path.exists('ny_MW.diff'):
47 :sys patch <ny_MW.diff
50 # Generate diff files, so that others can get the OpenOffice files and apply
51 # the diffs to get the Vim versions.
55 :sys {force} diff -a -C 1 ny_MW.orig.aff ny_MW.aff >ny_MW.diff
56 :sys {force} diff -a -C 1 ny_MW.orig.dic ny_MW.dic >>ny_MW.diff
59 # Check for updated OpenOffice spell files. When there are changes the
60 # ".new.aff" and ".new.dic" files are left behind for manual inspection.
69 :sys $UNZIP ../ny_MW.zip
70 :sys {force} diff ../ny_MW.orig.aff ny_MW.aff >d
71 @if os.stat('d')[stat.ST_SIZE] > 0:
72 :copy ny_MW.aff ../ny_MW.new.aff
73 :sys {force} diff ../ny_MW.orig.dic ny_MW.dic >d
74 @if os.stat('d')[stat.ST_SIZE] > 0:
75 :copy ny_MW.dic ../ny_MW.new.dic
82 # vim: set sts=4 sw=4 :