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 | 5555acc | 2006-04-07 21:33:12 +0000 | [diff] [blame] | 24 | # There is no readme in the .zip file, use the header of the .aff file. |
| 25 | ../README_hu.txt: hu_HU.aff |
Bram Moolenaar | 899dddf | 2006-03-26 21:06:50 +0000 | [diff] [blame] | 26 | :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] | 27 | |
| 28 | # |
Bram Moolenaar | 899dddf | 2006-03-26 21:06:50 +0000 | [diff] [blame] | 29 | # Fetch the zip file from SourceForge. Version specific name... |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 30 | # |
Bram Moolenaar | 899dddf | 2006-03-26 21:06:50 +0000 | [diff] [blame] | 31 | OODIR = http://hunspell.sourceforge.net |
| 32 | zipname = hu_HU2.zip |
| 33 | :attr {fetch = $OODIR/%file%} $zipname |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 34 | |
| 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. |
| 38 | hu_HU.aff hu_HU.dic: {buildcheck=} |
| 39 | :assertpkg unzip patch |
Bram Moolenaar | 899dddf | 2006-03-26 21:06:50 +0000 | [diff] [blame] | 40 | :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 Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 49 | @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 | |
| 60 | diff: |
| 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 Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 66 | |
| 67 | # vim: set sts=4 sw=4 : |