388
|
1 # Aap recipe for Dutch Vim spell files.
|
|
2
|
|
3 # Use a freshly compiled Vim if it exists.
|
|
4 @if os.path.exists('../../../src/vim'):
|
|
5 VIM = ../../../src/vim
|
|
6 @else:
|
|
7 VIM = vim
|
|
8
|
|
9 SPELLDIR = ..
|
|
10 FILES = he_IL.aff he_IL.dic
|
|
11
|
|
12 all: $(SPELLDIR)/he.utf-8.spl ../README_he.txt
|
|
13
|
|
14 $(SPELLDIR)/he.utf-8.spl : $(VIM) $(FILES)
|
|
15 :sys env LANG=he_IL.UTF-8
|
|
16 $(VIM) -e -c "mkspell! $(SPELLDIR)/he he_IL" -c q
|
|
17
|
|
18 ../README_he.txt : README_he_IL.txt
|
|
19 :copy $source $target
|
|
20
|
|
21 #
|
|
22 # Fetching the files from OpenOffice.org.
|
|
23 #
|
|
24 OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
|
|
25 :attr {fetch = $(OODIR)/%file%} he_IL.zip
|
|
26
|
|
27 # The files don't depend on the .zip file so that we can delete it.
|
|
28 # Only download the zip file if the targets don't exist.
|
|
29 he_IL.aff he_IL.dic: {buildcheck=}
|
|
30 :assertpkg unzip patch
|
|
31 :fetch he_IL.zip
|
|
32 :sys $(UNZIP) he_IL.zip
|
|
33 :delete he_IL.zip
|
|
34 @if not os.path.exists('he_IL.orig.aff'):
|
|
35 :copy he_IL.aff he_IL.orig.aff
|
|
36 @if not os.path.exists('he_IL.orig.dic'):
|
|
37 :copy he_IL.aff he_IL.orig.dic
|
|
38 :sys patch <he_IL.diff
|
|
39
|
|
40
|
|
41 # Generate diff files, so that others can get the OpenOffice files and apply
|
|
42 # the diffs to get the Vim versions.
|
|
43
|
|
44 diff:
|
|
45 :assertpkg diff
|
|
46 :sys {force} diff -a -C 1 he_IL.orig.aff he_IL.aff >he_IL.diff
|
|
47 :sys {force} diff -a -C 1 he_IL.orig.dic he_IL.dic >>he_IL.diff
|
|
48
|
|
49
|
|
50 # Check for updated OpenOffice spell files. When there are changes the
|
|
51 # ".new.aff" and ".new.dic" files are left behind for manual inspection.
|
|
52
|
|
53 check:
|
|
54 :assertpkg unzip diff
|
|
55 :fetch he_IL.zip
|
|
56 :mkdir tmp
|
|
57 :cd tmp
|
|
58 @try:
|
|
59 @import stat
|
|
60 :sys $(UNZIP) ../he_IL.zip
|
|
61 :sys {force} diff ../he_IL.orig.aff he_IL.aff >d
|
|
62 @if os.stat('d')[stat.ST_SIZE] > 0:
|
|
63 :copy he_IL.aff ../he_IL.new.aff
|
|
64 :sys {force} diff ../he_IL.orig.dic he_IL.dic >d
|
|
65 @if os.stat('d')[stat.ST_SIZE] > 0:
|
|
66 :copy he_IL.dic ../he_IL.new.dic
|
|
67 @finally:
|
|
68 :cd ..
|
|
69 :delete {r}{f}{q} tmp
|
|
70 :delete he_IL.zip
|
|
71
|
|
72
|
|
73 # vim: set sts=4 sw=4 :
|