1 # Aap recipe for Lithuanian Vim spell files.
3 # Use a freshly compiled Vim if it exists.
4 @if os.path.exists('../../../src/vim'):
10 FILES = lt_LT.aff lt_LT.dic
12 all: $SPELLDIR/lt.iso-8859-13.spl $SPELLDIR/lt.utf-8.spl \
15 $SPELLDIR/lt.iso-8859-13.spl : $FILES
16 :sys env LANG=lt_LT.ISO8859-13 $VIM -u NONE -e -c "mkspell! $SPELLDIR/lt lt_LT" -c q
18 $SPELLDIR/lt.utf-8.spl : $FILES
19 :sys env LANG=lt_LT.UTF-8 $VIM -u NONE -e -c "mkspell! $SPELLDIR/lt lt_LT" -c q
21 ../README_lt.txt: README_lt_LT.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%} lt_LT.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 # This is a bit tricky, since the file name includes the date.
33 lt_LT.aff lt_LT.dic: {buildcheck=}
34 :assertpkg unzip patch
38 @if not os.path.exists('lt_LT.orig.aff'):
39 :copy lt_LT.aff lt_LT.orig.aff
40 @if not os.path.exists('lt_LT.orig.dic'):
41 :copy lt_LT.dic lt_LT.orig.dic
42 @if os.path.exists('lt_LT.diff'):
43 :sys patch <lt_LT.diff
46 # Generate diff files, so that others can get the OpenOffice files and apply
47 # the diffs to get the Vim versions.
51 :sys {force} diff -a -C 1 lt_LT.orig.aff lt_LT.aff >lt_LT.diff
52 :sys {force} diff -a -C 1 lt_LT.orig.dic lt_LT.dic >>lt_LT.diff
55 # Check for updated spell files. When there are changes the
56 # ".new.aff" and ".new.dic" files are left behind for manual inspection.
65 :sys $UNZIP ../lt_LT.zip
66 :sys {force} diff ../lt_LT.orig.aff lt_LT.aff >d
67 @if os.stat('d')[stat.ST_SIZE] > 0:
68 :copy lt_LT.aff ../lt_LT.new.aff
69 :sys {force} diff ../lt_LT.orig.dic lt_LT.dic >d
70 @if os.stat('d')[stat.ST_SIZE] > 0:
71 :copy lt_LT.dic ../lt_LT.new.dic
78 # vim: set sts=4 sw=4 :