2005-07-03 21:39:27 +00:00
|
|
|
# Aap recipe for Dutch Vim spell files.
|
|
|
|
|
|
|
|
# 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 = nl_NL.aff nl_NL.dic
|
|
|
|
|
2005-08-15 21:41:48 +00:00
|
|
|
all: $SPELLDIR/nl.latin1.spl $SPELLDIR/nl.utf-8.spl ../README_nl.txt
|
2005-07-03 21:39:27 +00:00
|
|
|
|
2005-08-16 23:01:50 +00:00
|
|
|
$SPELLDIR/nl.latin1.spl : $FILES
|
2005-07-03 21:39:27 +00:00
|
|
|
:sys env LANG=nl_NL.ISO8859-1
|
2005-08-15 21:41:48 +00:00
|
|
|
$VIM -u NONE -e -c "mkspell! $SPELLDIR/nl nl_NL" -c q
|
2005-07-03 21:39:27 +00:00
|
|
|
|
2005-08-16 23:01:50 +00:00
|
|
|
$SPELLDIR/nl.utf-8.spl : $FILES
|
2005-07-03 21:39:27 +00:00
|
|
|
:sys env LANG=nl_NL.UTF-8
|
2005-08-15 21:41:48 +00:00
|
|
|
$VIM -u NONE -e -c "mkspell! $SPELLDIR/nl nl_NL" -c q
|
2005-07-03 21:39:27 +00:00
|
|
|
|
|
|
|
../README_nl.txt : README_nl_NL.txt
|
|
|
|
:copy $source $target
|
|
|
|
|
|
|
|
#
|
|
|
|
# Fetching the files from OpenOffice.org.
|
|
|
|
#
|
|
|
|
OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
|
2005-08-15 21:41:48 +00:00
|
|
|
:attr {fetch = $OODIR/%file%} nl_NL.zip
|
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.
|
|
|
|
nl_NL.aff nl_NL.dic: {buildcheck=}
|
|
|
|
:assertpkg unzip patch
|
|
|
|
:fetch nl_NL.zip
|
2005-08-15 21:41:48 +00:00
|
|
|
:sys $UNZIP nl_NL.zip
|
2005-07-03 21:39:27 +00:00
|
|
|
:delete nl_NL.zip
|
|
|
|
@if not os.path.exists('nl_NL.orig.aff'):
|
2005-08-15 21:41:48 +00:00
|
|
|
:copy nl_NL.aff nl_NL.orig.aff
|
2005-07-03 21:39:27 +00:00
|
|
|
@if not os.path.exists('nl_NL.orig.dic'):
|
2005-08-15 21:41:48 +00:00
|
|
|
:copy nl_NL.dic nl_NL.orig.dic
|
2005-08-01 07:19:10 +00:00
|
|
|
@if os.path.exists('nl_NL.diff'):
|
|
|
|
:sys patch <nl_NL.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 nl_NL.orig.aff nl_NL.aff >nl_NL.diff
|
|
|
|
:sys {force} diff -a -C 1 nl_NL.orig.dic nl_NL.dic >>nl_NL.diff
|
|
|
|
|
|
|
|
|
|
|
|
# Check for updated OpenOffice spell files. When there are changes the
|
|
|
|
# ".new.aff" and ".new.dic" files are left behind for manual inspection.
|
|
|
|
|
|
|
|
check:
|
|
|
|
:assertpkg unzip diff
|
|
|
|
:fetch nl_NL.zip
|
|
|
|
:mkdir tmp
|
|
|
|
:cd tmp
|
|
|
|
@try:
|
|
|
|
@import stat
|
2005-08-15 21:41:48 +00:00
|
|
|
:sys $UNZIP ../nl_NL.zip
|
2005-07-03 21:39:27 +00:00
|
|
|
:sys {force} diff ../nl_NL.orig.aff nl_NL.aff >d
|
|
|
|
@if os.stat('d')[stat.ST_SIZE] > 0:
|
|
|
|
:copy nl_NL.aff ../nl_NL.new.aff
|
|
|
|
:sys {force} diff ../nl_NL.orig.dic nl_NL.dic >d
|
|
|
|
@if os.stat('d')[stat.ST_SIZE] > 0:
|
|
|
|
:copy nl_NL.dic ../nl_NL.new.dic
|
|
|
|
@finally:
|
|
|
|
:cd ..
|
|
|
|
:delete {r}{f}{q} tmp
|
|
|
|
:delete nl_NL.zip
|
|
|
|
|
|
|
|
|
|
|
|
# vim: set sts=4 sw=4 :
|