1 # Aap recipe for Breton Vim spell files.
3 # Use a freshly compiled Vim if it exists.
4 @if os.path.exists('../../../src/vim'):
10 FILES = br_FR.aff br_FR.dic
12 all: $SPELLDIR/br.latin1.spl $SPELLDIR/br.utf-8.spl ../README_br.txt
14 $SPELLDIR/br.latin1.spl : $FILES
15 :sys $VIM -u NONE -e -c "set enc=latin1"
16 -c "mkspell! $SPELLDIR/br br_FR" -c q
18 $SPELLDIR/br.utf-8.spl : $FILES
19 :sys $VIM -u NONE -e -c "set enc=UTF-8"
20 -c "mkspell! $SPELLDIR/br br_FR" -c q
22 ../README_br.txt : package-description.txt
26 # Fetching the files from OpenOffice.org.
28 OODIR = http://extensions.services.openoffice.org/e-files/2207/3
29 :attr {fetch = $OODIR/%file%} dict-br_0.3.oxt
31 # The files don't depend on the .zip file so that we can delete it.
32 # Only download the zip file if the targets don't exist.
33 br_FR.aff br_FR.dic: {buildcheck=}
34 :assertpkg unzip patch
35 :fetch dict-br_0.3.oxt
36 :sys $UNZIP dict-br_0.3.oxt
37 :delete dict-br_0.3.oxt
38 :copy dictionaries/br_FR.aff br_FR.aff
39 :copy dictionaries/br_FR.dic br_FR.dic
40 # The br_FR.aff file contains a BOM, remove it.
41 :sys $VIM -u NONE -e -c "set enc=utf-8"
43 -c "set nobomb ff=unix"
45 :sys $VIM -u NONE -e -c "set enc=utf-8"
47 -c "set nobomb ff=unix"
49 @if not os.path.exists('br_FR.orig.aff'):
50 :copy br_FR.aff br_FR.orig.aff
51 @if os.path.exists('br_FR.diff'):
52 :sys patch <br_FR.diff
54 # Generate diff files, so that others can get the OpenOffice files and apply
55 # the diffs to get the Vim versions.
59 :sys {force} diff -a -C 1 dictionaries/br_FR.aff br_FR.aff >br_FR.diff
60 :sys {force} diff -a -C 1 dictionaries/br_FR.dic br_FR.dic >>br_FR.diff
63 # Check for updated OpenOffice spell files. When there are changes the
64 # ".new.aff" and ".new.dic" files are left behind for manual inspection.
68 :fetch dict-br_0.3.oxt
73 :sys $UNZIP ../dict-br_0.3.oxt
74 :sys {force} diff ../dictionaries/br_FR.aff br_FR.aff >d
75 @if os.stat('d')[stat.ST_SIZE] > 0:
76 :copy br_FR.aff ../br_FR.new.aff
77 :sys {force} diff ../dictionaries/br_FR.dic br_FR.dic >d
78 @if os.stat('d')[stat.ST_SIZE] > 0:
79 :copy br_FR.dic ../br_FR.new.dic
83 :delete dict-br_0.3.oxt
86 # vim: set sts=4 sw=4 :