Install vim73
[msysgit/mtrensch.git] / share / vim / vim73 / spell / la / main.aap
blobd9815850bb85721b9034ab70627150e8963a88ca
1 # Aap recipe for Latin Vim spell files.
3 # Use a freshly compiled Vim if it exists.
4 @if os.path.exists('../../../src/vim'):
5     VIM = ../../../src/vim
6 @else:
7     :progsearch VIM vim
9 SPELLDIR = ..
10 FILES    = la.aff la.dic
12 all: $SPELLDIR/la.latin1.spl $SPELLDIR/la.utf-8.spl ../README_la.txt
14 # NOTE: the la_LN.ISO-8859-1 locale is not available on Ubuntu.
15 # Use the English one instead.
17 $SPELLDIR/la.latin1.spl : $FILES
18         :sys env LANG=en_US.ISO-8859-1
19                 $VIM -u NONE -e -c "mkspell! $SPELLDIR/la la" -c q
21 $SPELLDIR/la.utf-8.spl : $FILES
22         :sys $VIM -u NONE -e -c "set enc=utf-8"
23                 -c "mkspell! $SPELLDIR/la la" -c q
25 ../README_la.txt : README_la.txt
26         :copy $source $target
29 # Fetching the files from OpenOffice.org.
31 OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
32 :attr {fetch = $OODIR/%file%} la.zip
34 # The files don't depend on the .zip file so that we can delete it.
35 # Only download the zip file if the targets don't exist.
36 la.aff la.dic: {buildcheck=}
37         :assertpkg unzip patch
38         :fetch la.zip
39         :sys $UNZIP la.zip
40         :delete la.zip
41         @if not os.path.exists('la.orig.aff'):
42             :copy la.aff la.orig.aff
43         @if not os.path.exists('la.orig.dic'):
44             :copy la.dic la.orig.dic
45         @if os.path.exists('la.diff'):
46             :sys patch <la.diff
49 # Generate diff files, so that others can get the OpenOffice files and apply
50 # the diffs to get the Vim versions.
52 diff:
53         :assertpkg diff
54         :sys {force} diff -a -C 1 la.orig.aff la.aff >la.diff
55         :sys {force} diff -a -C 1 la.orig.dic la.dic >>la.diff
58 # Check for updated OpenOffice spell files.  When there are changes the
59 # ".new.aff" and ".new.dic" files are left behind for manual inspection.
61 check:
62         :assertpkg unzip diff
63         :fetch la.zip
64         :mkdir tmp
65         :cd tmp
66         @try:
67             @import stat
68             :sys $UNZIP ../la.zip
69             :sys {force} diff ../la.orig.aff la.aff >d
70             @if os.stat('d')[stat.ST_SIZE] > 0:
71                 :copy la.aff ../la.new.aff
72             :sys {force} diff ../la.orig.dic la.dic >d
73             @if os.stat('d')[stat.ST_SIZE] > 0:
74                 :copy la.dic ../la.new.dic
75         @finally:
76             :cd ..
77             :delete {r}{f}{q} tmp
78             :delete la.zip
81 # vim: set sts=4 sw=4 :