Mercurial > vim
annotate runtime/spell/sv/main.aap @ 11092:24caa60f5e94
Added tag v8.0.0433 for changeset ae45d497868fa2526ecf2a3bde4c43b9dfe1d795
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 08 Mar 2017 23:00:06 +0100 |
parents | 9272cc83214f |
children |
rev | line source |
---|---|
502 | 1 # Aap recipe for Swedish Vim spell files. |
557 | 2 # |
2292
ea3c3f13385c
Update spell files for Ubuntu locale names.
Bram Moolenaar <bram@vim.org>
parents:
557
diff
changeset
|
3 # Maintainer: Mattias Winther <vim@mattias.winthernet.se> |
502 | 4 |
5 # Use a freshly compiled Vim if it exists. | |
6 @if os.path.exists('../../../src/vim'): | |
7 VIM = ../../../src/vim | |
8 @else: | |
9 :progsearch VIM vim | |
10 | |
11 SPELLDIR = .. | |
12 FILES = sv_SE.aff sv_SE.dic | |
13 | |
14 all: $SPELLDIR/sv.latin1.spl $SPELLDIR/sv.utf-8.spl ../README_sv.txt | |
15 | |
16 $SPELLDIR/sv.latin1.spl : $FILES | |
2292
ea3c3f13385c
Update spell files for Ubuntu locale names.
Bram Moolenaar <bram@vim.org>
parents:
557
diff
changeset
|
17 :sys env LANG=sv_SE.ISO-8859-1 |
502 | 18 $VIM -u NONE -e -c "mkspell! $SPELLDIR/sv sv_SE" -c q |
19 | |
20 $SPELLDIR/sv.utf-8.spl : $FILES | |
21 :sys env LANG=sv_SE.UTF-8 | |
22 $VIM -u NONE -e -c "mkspell! $SPELLDIR/sv sv_SE" -c q | |
23 | |
2341 | 24 ../README_sv.txt : README_sv.txt |
502 | 25 :copy $source $target |
26 | |
27 # | |
28 # Fetching the files from OpenOffice.org. | |
29 # | |
2308 | 30 OODIR = http://extensions.services.openoffice.org/e-files/1080/7 |
31 :attr {fetch = $OODIR/%file%} ooo_swedish_dict_1.43.oxt | |
502 | 32 |
33 # The files don't depend on the .zip file so that we can delete it. | |
34 # Only download the zip file if the targets don't exist. | |
35 sv_SE.aff sv_SE.dic: {buildcheck=} | |
36 :assertpkg unzip patch | |
2308 | 37 :fetch ooo_swedish_dict_1.43.oxt |
38 :sys $UNZIP ooo_swedish_dict_1.43.oxt | |
39 :delete ooo_swedish_dict_1.43.oxt | |
2292
ea3c3f13385c
Update spell files for Ubuntu locale names.
Bram Moolenaar <bram@vim.org>
parents:
557
diff
changeset
|
40 :delete {r} META-INF |
ea3c3f13385c
Update spell files for Ubuntu locale names.
Bram Moolenaar <bram@vim.org>
parents:
557
diff
changeset
|
41 :copy dictionaries/sv_SE.aff sv_SE.aff |
ea3c3f13385c
Update spell files for Ubuntu locale names.
Bram Moolenaar <bram@vim.org>
parents:
557
diff
changeset
|
42 :copy dictionaries/sv_SE.dic sv_SE.dic |
ea3c3f13385c
Update spell files for Ubuntu locale names.
Bram Moolenaar <bram@vim.org>
parents:
557
diff
changeset
|
43 :delete {r} dictionaries dictionaries.xcu description.xml |
2341 | 44 :delete {f} README_sv.txt |
45 :sys $VIM README_sv.txt -u NONE -N -e -c "0read LICENSE_en_US.txt" -c "read LICENSE_sv_SE.txt" -c "set ff=unix" -c write -c q | |
46 :delete LICENSE_en_US.txt LICENSE_sv_SE.txt | |
502 | 47 @if not os.path.exists('sv_SE.orig.aff'): |
48 :copy sv_SE.aff sv_SE.orig.aff | |
49 @if not os.path.exists('sv_SE.orig.dic'): | |
50 :copy sv_SE.dic sv_SE.orig.dic | |
51 @if os.path.exists('sv_SE.diff'): | |
52 :sys patch <sv_SE.diff | |
53 | |
2341 | 54 # Delete all the generated files, start from scratch |
55 clean: | |
56 :delete {f} sv_SE.aff sv_SE.dic | |
57 :delete {f} sv_SE.aff.orig sv_SE.dic.orig | |
58 :delete {f} sv_SE.orig.aff sv_SE.orig.dic | |
59 :delete {f} README_sv.txt | |
502 | 60 |
61 # Generate diff files, so that others can get the OpenOffice files and apply | |
62 # the diffs to get the Vim versions. | |
63 | |
64 diff: | |
65 :assertpkg diff | |
66 :sys {force} diff -a -C 1 sv_SE.orig.aff sv_SE.aff >sv_SE.diff | |
67 :sys {force} diff -a -C 1 sv_SE.orig.dic sv_SE.dic >>sv_SE.diff | |
68 | |
69 | |
70 # Check for updated OpenOffice spell files. When there are changes the | |
71 # ".new.aff" and ".new.dic" files are left behind for manual inspection. | |
72 | |
73 check: | |
74 :assertpkg unzip diff | |
2308 | 75 :fetch ooo_swedish_dict_1.43.oxt |
502 | 76 :mkdir tmp |
77 :cd tmp | |
78 @try: | |
79 @import stat | |
2308 | 80 :sys $UNZIP ../ooo_swedish_dict_1.43.oxt |
502 | 81 :sys {force} diff ../sv_SE.orig.aff sv_SE.aff >d |
82 @if os.stat('d')[stat.ST_SIZE] > 0: | |
83 :copy sv_SE.aff ../sv_SE.new.aff | |
84 :sys {force} diff ../sv_SE.orig.dic sv_SE.dic >d | |
85 @if os.stat('d')[stat.ST_SIZE] > 0: | |
86 :copy sv_SE.dic ../sv_SE.new.dic | |
87 @finally: | |
88 :cd .. | |
89 :delete {r}{f}{q} tmp | |
2308 | 90 :delete ooo_swedish_dict_1.43.oxt |
502 | 91 |
92 | |
93 # vim: set sts=4 sw=4 : |