Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 1 | # 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 | |
| 9 | SPELLDIR = .. |
| 10 | FILES = hu_HU.aff hu_HU.dic |
| 11 | |
| 12 | all: $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 Moolenaar | 899dddf | 2006-03-26 21:06:50 +0000 | [diff] [blame^] | 24 | ../README_hu.txt: $FILES |
| 25 | :sys $VIM -u NONE -e hu_HU.aff -c "1,/# ---/w! $target" -c q |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 26 | |
| 27 | # |
Bram Moolenaar | 899dddf | 2006-03-26 21:06:50 +0000 | [diff] [blame^] | 28 | # Fetch the zip file from SourceForge. Version specific name... |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 29 | # |
Bram Moolenaar | 899dddf | 2006-03-26 21:06:50 +0000 | [diff] [blame^] | 30 | OODIR = http://hunspell.sourceforge.net |
| 31 | zipname = hu_HU2.zip |
| 32 | :attr {fetch = $OODIR/%file%} $zipname |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 33 | |
| 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. |
| 37 | hu_HU.aff hu_HU.dic: {buildcheck=} |
| 38 | :assertpkg unzip patch |
Bram Moolenaar | 899dddf | 2006-03-26 21:06:50 +0000 | [diff] [blame^] | 39 | :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 Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 48 | @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 | |
| 59 | diff: |
| 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 Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 65 | |
| 66 | # vim: set sts=4 sw=4 : |