Sha256: 49d258c3f009ac972f05c442c28a20bd3b896c9253172a66fcebaaee65553433

Contents?: true

Size: 855 Bytes

Versions: 5

Compression:

Stored size: 855 Bytes

Contents

require 'autobuild/timestamps'
require 'autobuild/package'

module Autobuild
    def self.import(spec, &proc)
        ImporterPackage.new(spec, &proc)
    end
    
    class ImporterPackage < Package
        def installstamp
            "#{srcdir}/#{STAMPFILE}"
        end
	
	attr_reader :exclude

        def initialize(*args)
	    @exclude = []
            super
        end

        def prepare
            super

            exclude = self.exclude.dup
	    exclude << Regexp.new("^#{Regexp.quote(installstamp)}")
            if doc_dir
                exclude << Regexp.new("^#{doc_dir}")
            end

            Autobuild.source_tree(srcdir) do |pkg|
		pkg.exclude.concat exclude
		exclude.freeze
	    end

            file installstamp => srcdir do 
                Autobuild.touch_stamp installstamp
            end
        end
    end
end


Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
autobuild-1.4.9 lib/autobuild/packages/import.rb
autobuild-1.4.8 lib/autobuild/packages/import.rb
autobuild-1.4.7 lib/autobuild/packages/import.rb
autobuild-1.4.6 lib/autobuild/packages/import.rb
autobuild-1.4.5 lib/autobuild/packages/import.rb