specs/stx-6.2.2.rbspec
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 24 Sep 2018 20:55:06 +0100
changeset 258 65caf0201157
parent 93 650412e81596
permissions -rw-r--r--
Fix missing `smalltalk.svg` and `smalltalkx.desktop` in toy archive ...which caused a warning when run on system without these already installed: cp: cannot stat './smalltalkx.svg': No such file or directory cp: cannot stat './smalltalkx.desktop': No such file or directory Thanks Pocho for reporting.

project :'stx:6.2.2' do
  # Builds (actually - downloads) official Smalltalk/X 6.2.2 released
  # by eXept on July 2012.
  # import :'stx:baseline'


  tasks do
    task :'checkout:buildtools'

    task :'checkout:pre' => [ BUILD_DIR / 'stx' ]

    file BUILD_DIR / 'stx' => [ BUILD_DIR ] do
      # should download stuff from eXept site...
      if win32? 
      	files = [ 'win32.zip' ]
      else 
      	files = [ 'linux.tgz', 'common.tgz' ]
      end

      download_dir = (ENV['DOWNLOADS'] || BUILD_DIR) 

      files.each do | f |
        chdir download_dir do      	        
          if not File.exist? f        	
            if not system "wget ftp://ftp.exept.de/download/stx/stx622/#{f}"
              raise Exception.new("Cannot download #{f}")
            end  
          end                      
        end
        chdir BUILD_DIR do
          if win32? 
            unpack = "unzip #{download_dir / f}"
          else            
            unpack = "tar xzf #{download_dir / f}"
          end
          if not system unpack  
            raise Exception.new("Cannot unzip #{download_dir / f}")
          end          	
        end
      end  
    end
  end
end