1 # Aap recipe for Tagalog Vim spell files.
3 # Use a freshly compiled Vim if it exists.
4 @if os.path.exists('../../../src/vim'):
10 FILES = tl_PH.aff tl_PH.dic
12 all: $SPELLDIR/tl.latin1.spl $SPELLDIR/tl.utf-8.spl ../README_tl.txt
14 $SPELLDIR/tl.latin1.spl : $FILES
15 :sys env LANG=tl_PH.ISO8859-1
16 $VIM -u NONE -e -c "mkspell! $SPELLDIR/tl tl_PH" -c q
18 $SPELLDIR/tl.utf-8.spl : $FILES
19 :sys $VIM -u NONE -e -c "set enc=utf-8" -c "mkspell! $SPELLDIR/tl tl_PH" -c q
21 ../README_tl.txt : README_tl_PH.txt
25 # Fetching the files from OpenOffice.org.
27 OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
28 :attr {fetch = $OODIR/%file%} tl_PH.zip
30 # The files don't depend on the .zip file so that we can delete it.
31 # Only download the zip file if the targets don't exist.
32 tl_PH.aff tl_PH.dic: {buildcheck=}
33 :assertpkg unzip patch
37 @if not os.path.exists('tl_PH.orig.aff'):
38 :copy tl_PH.aff tl_PH.orig.aff
39 @if not os.path.exists('tl_PH.orig.dic'):
40 :copy tl_PH.dic tl_PH.orig.dic
41 @if os.path.exists('tl_PH.diff'):
42 :sys patch <tl_PH.diff
45 # Generate diff files, so that others can get the OpenOffice files and apply
46 # the diffs to get the Vim versions.
50 :sys {force} diff -a -C 1 tl_PH.orig.aff tl_PH.aff >tl_PH.diff
51 :sys {force} diff -a -C 1 tl_PH.orig.dic tl_PH.dic >>tl_PH.diff
54 # Check for updated OpenOffice spell files. When there are changes the
55 # ".new.aff" and ".new.dic" files are left behind for manual inspection.
64 :sys $UNZIP ../tl_PH.zip
65 :sys {force} diff ../tl_PH.orig.aff tl_PH.aff >d
66 @if os.stat('d')[stat.ST_SIZE] > 0:
67 :copy tl_PH.aff ../tl_PH.new.aff
68 :sys {force} diff ../tl_PH.orig.dic tl_PH.dic >d
69 @if os.stat('d')[stat.ST_SIZE] > 0:
70 :copy tl_PH.dic ../tl_PH.new.dic
77 # vim: set sts=4 sw=4 :