blob: ab5cdb8a9b0875f3607012fdd64b32bcf52bae78 [file] [log] [blame]
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001# Aap recipe for Hungarian 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 :progsearch VIM vim
8
9SPELLDIR = ..
10FILES = hu_HU.aff hu_HU.dic
11
12all: $SPELLDIR/hu.iso-8859-2.spl $SPELLDIR/hu.utf-8.spl \
13 $SPELLDIR/hu.cp1250.spl ../README_hu.txt
14
15$SPELLDIR/hu.iso-8859-2.spl : $FILES
16 :sys env LANG=hu_HU.ISO8859-2 $VIM -u NONE -e -c "mkspell! $SPELLDIR/hu hu_HU" -c q
17
18$SPELLDIR/hu.utf-8.spl : $FILES
19 :sys env LANG=hu_HU.UTF-8 $VIM -u NONE -e -c "mkspell! $SPELLDIR/hu hu_HU" -c q
20
21$SPELLDIR/hu.cp1250.spl : $FILES
22 :sys $VIM -u NONE -e -c "set enc=cp1250" -c "mkspell! $SPELLDIR/hu hu_HU" -c q
23
Bram Moolenaar899dddf2006-03-26 21:06:50 +000024../README_hu.txt: $FILES
25 :sys $VIM -u NONE -e hu_HU.aff -c "1,/# ---/w! $target" -c q
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +000026
27#
Bram Moolenaar899dddf2006-03-26 21:06:50 +000028# Fetch the zip file from SourceForge. Version specific name...
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +000029#
Bram Moolenaar899dddf2006-03-26 21:06:50 +000030OODIR = http://hunspell.sourceforge.net
31zipname = hu_HU2.zip
32:attr {fetch = $OODIR/%file%} $zipname
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +000033
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# This is a bit tricky, since the file name includes the date.
37hu_HU.aff hu_HU.dic: {buildcheck=}
38 :assertpkg unzip patch
Bram Moolenaar899dddf2006-03-26 21:06:50 +000039 :fetch $zipname
40 :sys $UNZIP $zipname
41 :delete $zipname
42
43 # Unfortunately the version number is in the file name...
44 :move hu_HU2.dic hu_HU.dic
45 :move hu_HU2.aff hu_HU.aff
46 :delete hu_HU2.history
47
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +000048 @if not os.path.exists('hu_HU.orig.aff'):
49 :copy hu_HU.aff hu_HU.orig.aff
50 @if not os.path.exists('hu_HU.orig.dic'):
51 :copy hu_HU.dic hu_HU.orig.dic
52 @if os.path.exists('hu_HU.diff'):
53 :sys patch <hu_HU.diff
54
55
56# Generate diff files, so that others can get the OpenOffice files and apply
57# the diffs to get the Vim versions.
58
59diff:
60 :assertpkg diff
61 :sys {force} diff -a -C 1 hu_HU.orig.aff hu_HU.aff >hu_HU.diff
62 :sys {force} diff -a -C 1 hu_HU.orig.dic hu_HU.dic >>hu_HU.diff
63
64
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +000065
66# vim: set sts=4 sw=4 :