blob: 0997b68d7ffd97ddf4fd10225bfd61becc32e6b0 [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 Moolenaar5555acc2006-04-07 21:33:12 +000024# There is no readme in the .zip file, use the header of the .aff file.
25../README_hu.txt: hu_HU.aff
Bram Moolenaar899dddf2006-03-26 21:06:50 +000026 :sys $VIM -u NONE -e hu_HU.aff -c "1,/# ---/w! $target" -c q
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +000027
28#
Bram Moolenaar899dddf2006-03-26 21:06:50 +000029# Fetch the zip file from SourceForge. Version specific name...
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +000030#
Bram Moolenaar899dddf2006-03-26 21:06:50 +000031OODIR = http://hunspell.sourceforge.net
32zipname = hu_HU2.zip
33:attr {fetch = $OODIR/%file%} $zipname
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +000034
35# The files don't depend on the .zip file so that we can delete it.
36# Only download the zip file if the targets don't exist.
37# This is a bit tricky, since the file name includes the date.
38hu_HU.aff hu_HU.dic: {buildcheck=}
39 :assertpkg unzip patch
Bram Moolenaar899dddf2006-03-26 21:06:50 +000040 :fetch $zipname
41 :sys $UNZIP $zipname
42 :delete $zipname
43
44 # Unfortunately the version number is in the file name...
45 :move hu_HU2.dic hu_HU.dic
46 :move hu_HU2.aff hu_HU.aff
47 :delete hu_HU2.history
48
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +000049 @if not os.path.exists('hu_HU.orig.aff'):
50 :copy hu_HU.aff hu_HU.orig.aff
51 @if not os.path.exists('hu_HU.orig.dic'):
52 :copy hu_HU.dic hu_HU.orig.dic
53 @if os.path.exists('hu_HU.diff'):
54 :sys patch <hu_HU.diff
55
56
57# Generate diff files, so that others can get the OpenOffice files and apply
58# the diffs to get the Vim versions.
59
60diff:
61 :assertpkg diff
62 :sys {force} diff -a -C 1 hu_HU.orig.aff hu_HU.aff >hu_HU.diff
63 :sys {force} diff -a -C 1 hu_HU.orig.dic hu_HU.dic >>hu_HU.diff
64
65
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +000066
67# vim: set sts=4 sw=4 :