1 # Aap recipe for Kurdish Vim spell files.
3 # Use a freshly compiled Vim if it exists.
4 @if os.path.exists('../../../src/vim'):
10 FILES = ku_TR.aff ku_TR.dic
12 # I don't have a Kurdish locale, us the Turkish one.
13 all: $SPELLDIR/ku.iso-8859-9.spl $SPELLDIR/ku.utf-8.spl \
16 $SPELLDIR/ku.iso-8859-9.spl : $FILES
17 :sys env LANG=tr_TR.ISO8859-9 $VIM -u NONE -e -c "mkspell! $SPELLDIR/ku ku_TR" -c q
19 $SPELLDIR/ku.utf-8.spl : $FILES
20 :sys env LANG=tr_TR.UTF-8 $VIM -u NONE -e -c "mkspell! $SPELLDIR/ku ku_TR" -c q
22 ../README_ku.txt: README_ku_TR.txt
26 # Fetching the files from OpenOffice.org.
28 OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
29 :attr {fetch = $OODIR/%file%} ku_TR.zip
31 # The files don't depend on the .zip file so that we can delete it.
32 # Only download the zip file if the targets don't exist.
33 # This is a bit tricky, since the file name includes the date.
34 ku_TR.aff ku_TR.dic: {buildcheck=}
35 :assertpkg unzip patch
39 :sys $VIM ku_TR.aff -e -c "set ff=unix" -c update -c q
40 :sys $VIM ku_TR.dic -e -c "set ff=unix" -c update -c q
41 :sys $VIM README_ku_TR.txt -e -c "set ff=unix" -c update -c q
42 @if not os.path.exists('ku_TR.orig.aff'):
43 :copy ku_TR.aff ku_TR.orig.aff
44 @if not os.path.exists('ku_TR.orig.dic'):
45 :copy ku_TR.dic ku_TR.orig.dic
46 @if os.path.exists('ku_TR.diff'):
47 :sys patch <ku_TR.diff
50 # Generate diff files, so that others can get the OpenOffice files and apply
51 # the diffs to get the Vim versions.
55 :sys {force} diff -a -C 1 ku_TR.orig.aff ku_TR.aff >ku_TR.diff
56 :sys {force} diff -a -C 1 ku_TR.orig.dic ku_TR.dic >>ku_TR.diff
59 # Check for updated spell files. When there are changes the
60 # ".new.aff" and ".new.dic" files are left behind for manual inspection.
69 :sys $UNZIP ../ku_TR.zip
70 :sys {force} diff ../ku_TR.orig.aff ku_TR.aff >d
71 @if os.stat('d')[stat.ST_SIZE] > 0:
72 :copy ku_TR.aff ../ku_TR.new.aff
73 :sys {force} diff ../ku_TR.orig.dic ku_TR.dic >d
74 @if os.stat('d')[stat.ST_SIZE] > 0:
75 :copy ku_TR.dic ../ku_TR.new.dic
82 # vim: set sts=4 sw=4 :