Sha256: afb867feaeef705a85d337ecaf1133456a0746c7914023467343f4b04f72e50f

Contents?: true

Size: 784 Bytes

Versions: 7

Compression:

Stored size: 784 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
        end
    end
end


Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
autobuild-1.5.6 lib/autobuild/packages/import.rb
autobuild-1.5.5 lib/autobuild/packages/import.rb
autobuild-1.5.4 lib/autobuild/packages/import.rb
autobuild-1.5.3 lib/autobuild/packages/import.rb
autobuild-1.5.2 lib/autobuild/packages/import.rb
autobuild-1.5.1 lib/autobuild/packages/import.rb
autobuild-1.5.0 lib/autobuild/packages/import.rb