Sha256: be1ab92c957a8d38ce04fe375b6c5946c979d987cb0dd685ef3dd243dc4d8436

Contents?: true

Size: 1.15 KB

Versions: 27

Compression:

Stored size: 1.15 KB

Contents

# install RMagick documentation

require 'fileutils'
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)
            FileUtils.mkdir_p(File.dirname(target), :verbose => true)
            # Mark this directory as one we created so
            # that uninstall.rb knows it's okay to delete
            FileUtils.touch("#{File.dirname(target)}/.rmagick")
        end
        FileUtils.install(file, target, :mode => 0644)
    end

else

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

end

exit

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
rmagick-2.13.3 post-install.rb
rmagick-2.13.3.rc1 post-install.rb
rmagick-2.13.2 post-install.rb
rdp-rmagick-0.0.0 post-install.rb
rmagick-2.13.1 post-install.rb
rmagick-2.12.2 post-install.rb
rmagick-2.12.1 post-install.rb
rmagick-2.12.0 post-install.rb
rmagick-2.11.1 post-install.rb
rmagick-2.10.0 post-install.rb
rmagick-2.11.0 post-install.rb
rmagick-2.2.0 post-install.rb
rmagick-2.3.0 post-install.rb
rmagick-2.1.0 post-install.rb
rmagick-2.2.2 post-install.rb
rmagick-2.6.0 post-install.rb
rmagick-2.5.2 post-install.rb
rmagick-2.5.0 post-install.rb
rmagick-2.5.1 post-install.rb
rmagick-2.4.0 post-install.rb