Changeset 34199

Show
Ignore:
Timestamp:
16.06.2020 19:24:18 (3 weeks ago)
Author:
ak19
Message:

A makedists.sh script for gstika to make the cutdown zip and tarball. Updated the one for tesseract. I'm not sure what the CASCADE-MAKE makedist includes (yet), and it may be different for gnome-lib. But I have so far followed the manual steps for Imagemagick in creating the cutdown binary-only distribution tarballs and carefully controlling what goes in there (which is different for each of these gs extensions).

Location:
gs2-extensions
Files:
1 added
2 modified

Legend:

Unmodified
Added
Removed
  • gs2-extensions/tesseract/trunk/README.txt

    r34198 r34199  
     1TODO: 
     2Since zlib, libpng, tif, jpg, jpeg2000 are all from imagemagick, may be use svn:externals 
     3to bring them into packages? 
     4svn:externals on individual files is possible, see 
     5https://stackoverflow.com/questions/1355956/can-we-set-a-single-file-as-external-in-subversion 
     6 
    17------------------------------------------------- 
    28CONTENTS 
  • gs2-extensions/tesseract/trunk/makedists.sh

    r34198 r34199  
    1414fi 
    1515 
     16gsExt="tesseract" 
     17echo "Creating $gsExt tarball and zip for $osarch" 
    1618 
    17 echo "Creating tarball and zip for $osarch" 
     19if [ ! -d $gsExt ]; then 
     20    mkdir $gsExt 
    1821 
    19 if [ ! -d tesseract ]; then 
    20     mkdir tesseract 
    21  
    22     cp src/setup.ba* tesseract/. 
     22    cp src/setup.ba* $gsExt/. 
    2323 
    2424    if [ ! -d src/linux ]; then 
    25     echo "No src/linux folder, can't proceed tarring and zipping up tesseract." 
     25    echo "No src/linux folder, can't proceed tarring and zipping up $gsExt." 
    2626    exit 1; 
    2727    else 
    28     echo "Moving src/linux into tesseract folder" 
    29     #mv src/linux tesseract/. 
    30     cp -r src/linux tesseract/. 
     28    echo "Moving src/linux into $gsExt folder" 
     29    #mv src/linux $gsExt/. 
     30    cp -r src/linux $gsExt/. 
    3131 
    3232    echo "Copying licence files" 
    33     cp src/packages/*LICENSE.txt tesseract/linux/. 
     33    cp src/packages/*LICENSE.txt $gsExt/linux/. 
    3434 
    3535    echo "Copying user info files" 
    36     cp GETTING-OCR-SUPPORT-FOR-MORE-LANGS.txt tesseract/. 
     36    cp GETTING-OCR-SUPPORT-FOR-MORE-LANGS.txt $gsExt/. 
    3737 
    38     echo "Removing tesseract/linux/man" 
    39     rm -rf tesseract/linux/man 
     38    echo "Removing $gsExt/linux/man" 
     39    rm -rf $gsExt/linux/man 
    4040 
    41     echo "Removing all but folder 'tessdata' from tesseract/linux/share folder" 
    42     #rm -rf tesseract/linux/share/aclocal 
    43     #rm -rf tesseract/linux/share/doc 
    44     #rm -rf tesseract/linux/share/info/ 
    45     #rm -rf tesseract/linux/share/libtool/ 
    46     #rm -rf tesseract/linux/share/man 
    47     mv tesseract/linux/share tesseract/linux/share.del 
    48     mkdir tesseract/linux/share 
    49     mv tesseract/linux/share.del/tessdata tesseract/linux/share/. 
    50     rm -rf tesseract/linux/share.del 
     41    echo "Removing all but folder 'tessdata' from $gsExt/linux/share folder" 
     42    #rm -rf $gsExt/linux/share/aclocal 
     43    #rm -rf $gsExt/linux/share/doc 
     44    #rm -rf $gsExt/linux/share/info/ 
     45    #rm -rf $gsExt/linux/share/libtool/ 
     46    #rm -rf $gsExt/linux/share/man 
     47    mv $gsExt/linux/share $gsExt/linux/share.del 
     48    mkdir $gsExt/linux/share 
     49    mv $gsExt/linux/share.del/tessdata $gsExt/linux/share/. 
     50    rm -rf $gsExt/linux/share.del 
    5151    fi 
    5252else 
    53     echo "Folder tesseract already exists. Using existing." 
    54     echo "For creating a fresh tarball and zip, delete the existing tesseract folder" 
     53    echo "Folder $gsExt already exists. Using existing." 
     54    echo "For creating a fresh tarball and zip, delete the existing $gsExt folder" 
    5555    echo "at this script level ($0) first." 
    5656fi 
    5757 
    5858# just try to create it for the OS 
    59 outfile="tesseract-$osarch" 
     59outfile="$gsExt-$osarch" 
    6060if [ -f "$outfile.tar.gz" ]; then 
    6161    rm "$outfile.tar.gz" 
    6262fi 
    63 tar -cvzf "$outfile.tar.gz" tesseract 
     63tar -cvzf "$outfile.tar.gz" $gsExt 
    6464     
    6565if [ -f "$outfile.zip" ]; then 
    6666    rm "$outfile.zip" 
    6767fi 
    68 zip -r "$outfile.zip" tesseract 
     68zip -r "$outfile.zip" $gsExt 
    6969 
    70 echo "Done making $outfile tarball/zip" 
     70#rm -rf $gsExt 
     71 
     72echo "Done making $gsExt tarball/zip" 
    7173echo ""