0
0
mirror of https://github.com/vim/vim.git synced 2025-07-04 23:07:33 -04:00
vim/runtime/spell/pl/main.aap

93 lines
2.9 KiB
Plaintext
Raw Normal View History

2005-07-27 21:13:01 +00:00
# Aap recipe for Polish Vim spell files.
2005-07-03 21:39:27 +00:00
# Use a freshly compiled Vim if it exists.
@if os.path.exists('../../../src/vim'):
VIM = ../../../src/vim
@else:
2005-08-01 07:19:10 +00:00
:progsearch VIM vim
2005-07-03 21:39:27 +00:00
SPELLDIR = ..
FILES = pl_PL.aff pl_PL.dic
2005-08-15 21:41:48 +00:00
all: $SPELLDIR/pl.iso-8859-2.spl $SPELLDIR/pl.utf-8.spl \
$SPELLDIR/pl.cp1250.spl ../README_pl.txt
2005-07-03 21:39:27 +00:00
2005-08-16 23:01:50 +00:00
$SPELLDIR/pl.iso-8859-2.spl : $FILES
2005-08-15 21:41:48 +00:00
:sys env LANG=pl_PL.ISO8859-2 $VIM -u NONE -e -c "mkspell! $SPELLDIR/pl pl_PL" -c q
2005-07-03 21:39:27 +00:00
2005-08-16 23:01:50 +00:00
$SPELLDIR/pl.utf-8.spl : $FILES
2005-08-15 21:41:48 +00:00
:sys env LANG=pl_PL.UTF-8 $VIM -u NONE -e -c "mkspell! $SPELLDIR/pl pl_PL" -c q
2005-07-03 21:39:27 +00:00
2005-08-16 23:01:50 +00:00
$SPELLDIR/pl.cp1250.spl : $FILES
2005-08-15 21:41:48 +00:00
:sys $VIM -u NONE -e -c "set enc=cp1250" -c "mkspell! $SPELLDIR/pl pl_PL" -c q
2005-07-08 22:21:38 +00:00
2005-07-03 21:39:27 +00:00
../README_pl.txt: README_pl_PL.txt
:copy $source $target
#
# Fetching the files from OpenOffice.org.
#
2005-07-08 22:21:38 +00:00
#OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
2005-08-15 21:41:48 +00:00
#:attr {fetch = $OODIR/%file%} pl_PL.zip
2005-07-08 22:21:38 +00:00
#
# Fetching the files from
#
2007-05-05 17:54:07 +00:00
HTTPDIR = http://www.kurnik.pl/dictionary
2005-07-03 21:39:27 +00:00
# The files don't depend on the .zip file so that we can delete it.
# Only download the zip file if the targets don't exist.
2005-07-08 22:21:38 +00:00
# This is a bit tricky, since the file name includes the date.
2005-07-03 21:39:27 +00:00
pl_PL.aff pl_PL.dic: {buildcheck=}
2005-07-08 22:21:38 +00:00
:assertpkg tar bunzip2
2007-05-05 17:54:07 +00:00
fname = alt-myspell-pl.tar.bz2
:attr {fetch = $HTTPDIR/%file%} $fname
:fetch $fname
2005-08-15 21:41:48 +00:00
:sys bunzip2 -c $fname | tar xf -
2007-05-05 17:54:07 +00:00
:move alt-myspell-pl-20[0-9]*/* .
:deldir alt-myspell-pl-20[0-9]*
2005-08-15 21:41:48 +00:00
:delete $fname
2005-07-03 21:39:27 +00:00
@if not os.path.exists('pl_PL.orig.aff'):
2005-08-15 21:41:48 +00:00
:copy pl_PL.aff pl_PL.orig.aff
2005-07-03 21:39:27 +00:00
@if not os.path.exists('pl_PL.orig.dic'):
2005-08-15 21:41:48 +00:00
:copy pl_PL.dic pl_PL.orig.dic
2005-08-01 07:19:10 +00:00
@if os.path.exists('pl_PL.diff'):
:sys patch <pl_PL.diff
2005-07-03 21:39:27 +00:00
# Generate diff files, so that others can get the OpenOffice files and apply
# the diffs to get the Vim versions.
diff:
:assertpkg diff
:sys {force} diff -a -C 1 pl_PL.orig.aff pl_PL.aff >pl_PL.diff
:sys {force} diff -a -C 1 pl_PL.orig.dic pl_PL.dic >>pl_PL.diff
2005-08-15 21:41:48 +00:00
# Check for updated spell files. When there are changes the
2005-07-03 21:39:27 +00:00
# ".new.aff" and ".new.dic" files are left behind for manual inspection.
check:
2005-08-15 21:41:48 +00:00
:assertpkg tar bunzip2 diff
2007-05-05 17:54:07 +00:00
fname = alt-myspell-pl.tar.bz2
:attr {fetch = $HTTPDIR/%file%} $fname
:fetch $fname
2005-08-15 21:41:48 +00:00
:sys bunzip2 -c $fname | tar xf -
2007-05-05 17:54:07 +00:00
:cd alt-myspell-pl-20[0-9]*
2005-07-03 21:39:27 +00:00
@try:
@import stat
2005-08-15 21:41:48 +00:00
:sys $UNZIP ../pl_PL.zip
2005-07-03 21:39:27 +00:00
:sys {force} diff ../pl_PL.orig.aff pl_PL.aff >d
@if os.stat('d')[stat.ST_SIZE] > 0:
:copy pl_PL.aff ../pl_PL.new.aff
:sys {force} diff ../pl_PL.orig.dic pl_PL.dic >d
@if os.stat('d')[stat.ST_SIZE] > 0:
:copy pl_PL.dic ../pl_PL.new.dic
@finally:
:cd ..
2005-08-15 21:41:48 +00:00
:delete {r}{f}{q} $base
:delete $fname
2005-07-03 21:39:27 +00:00
# vim: set sts=4 sw=4 :