main.aap (1849B)
1 # Aap recipe for Ukrainian 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 = uk_UA.aff uk_UA.dic 11 12 all: $SPELLDIR/uk.koi8-u.spl $SPELLDIR/uk.utf-8.spl \ 13 ../README_uk.txt 14 15 $SPELLDIR/uk.koi8-u.spl : $FILES 16 :sys env LANG=uk_UA.KOI8-U $VIM -u NONE -e -c "mkspell! $SPELLDIR/uk uk_UA" -c q 17 18 $SPELLDIR/uk.utf-8.spl : $FILES 19 :sys env LANG=uk_UA.UTF-8 $VIM -u NONE -e -c "mkspell! $SPELLDIR/uk uk_UA" -c q 20 21 ../README_uk.txt: README_uk_UA.txt 22 :copy $source $target 23 24 # 25 # Fetching the files from OpenOffice.org. 26 # 27 OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries 28 :attr {fetch = $OODIR/%file%} uk_UA.zip 29 30 # The files don't depend on the .zip file so that we can delete it. 31 # Only download the zip file if the targets don't exist. 32 # This is a bit tricky, since the file name includes the date. 33 uk_UA.aff uk_UA.dic: {buildcheck=} 34 :assertpkg unzip 35 :fetch uk_UA.zip 36 :sys unzip uk_UA.zip 37 :delete uk_UA.zip 38 @if not os.path.exists('uk_UA.orig.aff'): 39 :copy uk_UA.aff uk_UA.orig.aff 40 @if not os.path.exists('uk_UA.orig.dic'): 41 :copy uk_UA.dic uk_UA.orig.dic 42 @if os.path.exists('uk_UA.diff'): 43 :sys patch <uk_UA.diff 44 45 # Generate diff files, so that others can get the OpenOffice files and apply 46 # the diffs to get the Vim versions. 47 48 diff: 49 :assertpkg diff 50 :sys {force} diff -a -C 1 uk_UA.orig.aff uk_UA.aff >uk_UA.diff 51 :sys {force} diff -a -C 1 uk_UA.orig.dic uk_UA.dic >>uk_UA.diff 52 53 # Check for updated spell files. When there are changes the 54 # ".new.aff" and ".new.dic" files are left behind for manual inspection. 55 56 check: 57 :print Doesn't work yet.