diff runtime/spell/hu/main.aap @ 827:fd1b3406fd1c v7.0d02

updated for version 7.0d02
author vimboss
date Wed, 12 Apr 2006 21:52:12 +0000
parents 45fad0f590d0
children 11d40fc82f11
line wrap: on
line diff
--- a/runtime/spell/hu/main.aap
+++ b/runtime/spell/hu/main.aap
@@ -21,31 +21,23 @@ all: $SPELLDIR/hu.iso-8859-2.spl $SPELLD
 $SPELLDIR/hu.cp1250.spl : $FILES
         :sys $VIM -u NONE -e -c "set enc=cp1250" -c "mkspell! $SPELLDIR/hu hu_HU" -c q
 
-# There is no readme in the .zip file, use the header of the .aff file.
-../README_hu.txt: hu_HU.aff
-        :sys $VIM -u NONE -e hu_HU.aff -c "1,/# ---/w! $target" -c q
+../README_hu.txt: README_hu_HU.txt
+        :copy $source $target
 
 #
-# Fetch the zip file from SourceForge.  Version specific name...
+# Fetching the files from OpenOffice.org.
 #
-OODIR = http://hunspell.sourceforge.net
-zipname = hu_HU2.zip
-:attr {fetch = $OODIR/%file%} $zipname
+OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
+:attr {fetch = $OODIR/%file%} hu_HU.zip
 
 # 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.
 # This is a bit tricky, since the file name includes the date.
 hu_HU.aff hu_HU.dic: {buildcheck=}
         :assertpkg unzip patch
-        :fetch $zipname
-        :sys $UNZIP $zipname
-        :delete $zipname
-
-        # Unfortunately the version number is in the file name...
-        :move hu_HU2.dic hu_HU.dic
-        :move hu_HU2.aff hu_HU.aff
-        :delete hu_HU2.history
-
+        :fetch hu_HU.zip
+        :sys $UNZIP hu_HU.zip
+        :delete hu_HU.zip
         @if not os.path.exists('hu_HU.orig.aff'):
             :copy hu_HU.aff hu_HU.orig.aff
         @if not os.path.exists('hu_HU.orig.dic'):
@@ -63,5 +55,27 @@ diff:
         :sys {force} diff -a -C 1 hu_HU.orig.dic hu_HU.dic >>hu_HU.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 hu_HU.zip
+        :mkdir tmp
+        :cd tmp
+        @try:
+            @import stat
+            :sys $UNZIP ../hu_HU.zip
+            :sys {force} diff ../hu_HU.orig.aff hu_HU.aff >d
+            @if os.stat('d')[stat.ST_SIZE] > 0:
+                :copy hu_HU.aff ../hu_HU.new.aff
+            :sys {force} diff ../hu_HU.orig.dic hu_HU.dic >d
+            @if os.stat('d')[stat.ST_SIZE] > 0:
+                :copy hu_HU.dic ../hu_HU.new.dic
+        @finally:
+            :cd ..
+            :delete {r}{f}{q} tmp
+            :delete hu_HU.zip
+
 
 # vim: set sts=4 sw=4 :