main.aap 1.8 KB

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