1 # Aap recipe for Indonesian Vim spell files.
3 # Use a freshly compiled Vim if it exists.
4 @if os.path.exists('../../../src/vim'):
10 FILES = id_ID.aff id_ID.dic
12 all: $SPELLDIR/id.latin1.spl $SPELLDIR/id.utf-8.spl ../README_id.txt
14 # I don't have an Indonesian locale, use the Dutch one instead.
15 $SPELLDIR/id.latin1.spl : $FILES
16 :sys env LANG=nl_NL.ISO8859-1
17 $VIM -u NONE -e -c "mkspell! $SPELLDIR/id id_ID" -c q
19 $SPELLDIR/id.utf-8.spl : $FILES
20 :sys env LANG=nl_NL.UTF-8
21 $VIM -u NONE -e -c "mkspell! $SPELLDIR/id id_ID" -c q
23 ../README_id.txt : README_id_ID.txt
27 # Fetching the files from OpenOffice.org.
29 OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
30 :attr {fetch = $OODIR/%file%} id_ID.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 id_ID.aff id_ID.dic: {buildcheck=}
35 :assertpkg unzip patch
39 @if not os.path.exists('id_ID.orig.aff'):
40 :copy id_ID.aff id_ID.orig.aff
41 @if not os.path.exists('id_ID.orig.dic'):
42 :copy id_ID.dic id_ID.orig.dic
43 @if os.path.exists('id_ID.diff'):
44 :sys patch <id_ID.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 id_ID.orig.aff id_ID.aff >id_ID.diff
53 :sys {force} diff -a -C 1 id_ID.orig.dic id_ID.dic >>id_ID.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 ../id_ID.zip
67 :sys {force} diff ../id_ID.orig.aff id_ID.aff >d
68 @if os.stat('d')[stat.ST_SIZE] > 0:
69 :copy id_ID.aff ../id_ID.new.aff
70 :sys {force} diff ../id_ID.orig.dic id_ID.dic >d
71 @if os.stat('d')[stat.ST_SIZE] > 0:
72 :copy id_ID.dic ../id_ID.new.dic
79 # vim: set sts=4 sw=4 :