Sha256: 19e7d6eefeea13b358c2c3c6a1459e200f5a0ec9f5c2734e36be54c8322b922c

Contents?: true

Size: 1.14 KB

Versions: 26

Compression:

Stored size: 1.14 KB

Contents

# install RMagick documentation

require 'ftools'
require 'find'

if defined?(Installer) && self.class == Installer

    BUILD_HTMLDOC = get_config('disable-htmldoc') != 'yes'

    $docdir = nil

    # Where to install the documentation
    def docdir
        return $docdir if $docdir
        dir = get_config('doc-dir')+'/'
        dir.sub!(/\A$prefix/, get_config('prefix'))
        $docdir = dir
    end
else

    BUILD_HTMLDOC = true

    def docdir
        return ARGV[0]
    end
end

if BUILD_HTMLDOC

    puts "\npost-install.rb: installing documentation..."

    Find.find('doc') do |file|
        next if FileTest.directory? file
        target = file.sub(/^doc\//,docdir())
        unless FileTest.exists? File.dirname(target)
            File.makedirs(File.dirname(target), true)
            # Mark this directory as one we created so
            # that uninstall.rb knows it's okay to delete
            f = File.new("#{File.dirname(target)}/.rmagick", "w")
            f.close
        end
        File.install(file, target, 0644)
    end

else

    puts "\npost-install.rb: --disable-htmldoc specified. No documentation will be installed."

end

exit

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
backlog-0.8.0 post-install.rb
rmagick-1.11.0 post-install.rb
rmagick-1.11.1 post-install.rb
rmagick-1.13.0 post-install.rb
rmagick-1.12.0 post-install.rb
rmagick-1.15.1 post-install.rb
rmagick-1.14.1 post-install.rb
rmagick-1.15.10 post-install.rb
rmagick-1.15.0 post-install.rb
rmagick-1.14.0 post-install.rb
rmagick-1.15.13 post-install.rb
rmagick-1.15.14 post-install.rb
rmagick-1.15.11 post-install.rb
rmagick-1.15.15 post-install.rb
rmagick-1.15.12 post-install.rb
rmagick-1.15.16 post-install.rb
rmagick-1.15.3 post-install.rb
rmagick-1.15.2 post-install.rb
rmagick-1.15.4 post-install.rb
rmagick-1.15.17 post-install.rb