How abouta standard 'doc' directory?

-talk,

When you install a package, the installer (setup.rb/install.rb or a
home-grown variant) typically installs files in the following directories:

$prefix/bin
$prefix/lib/ruby/site_ruby/1.x/foo/…
$prefix/share/foo/…

and maybe one or two others, where $prefix is something like
/usr/local or C:/Ruby

What about agreeing on a standard location for installed
documentation?

$prefix/doc/foo/
README
api/
etc…

Many packages come with some documentation and, as far as I know,
don’t install them anywhere. The one exception I know of is ‘ri’.

We need to define a standard and apply it (update install.rb,
particularly).

Gavin

How about

/usr/local/doc/ruby/foo

I see this on OS X and FreeBSD. In fact, on FreeBSD I have

/usr/local/doc/squeak-3.0/
-r–r–r-- 1 root wheel 3642 Dec 26 2001 BUILD.UnixSqueak
-r–r–r-- 1 root wheel 4142 Dec 26 2001 COPYING
-r–r–r-- 1 root wheel 18927 Dec 26 2001 COPYRIGHT
-r–r–r-- 1 root wheel 9745 Dec 26 2001 LICENSE
-r–r–r-- 1 root wheel 14191 Dec 26 2001 README.CodingStandards

···

On Saturday, 27 September 2003 at 9:35:00 +0900, Gavin Sinclair wrote:

-talk,

What about agreeing on a standard location for installed
documentation?

$prefix/doc/foo/
README
api/
etc…


Jim Freeze

Flugg’s Law:
When you need to knock on wood is when you realize that the
world is composed of vinyl, naugahyde and aluminum.

Jim Freeze wrote:

···

On Saturday, 27 September 2003 at 9:35:00 +0900, Gavin Sinclair wrote:

-talk,

What about agreeing on a standard location for installed
documentation?

$prefix/doc/foo/
README
api/
etc…

How about

/usr/local/doc/ruby/foo

I don’t know how it got there, but I’ve already got:

$ ls /usr/local/share/doc/ruby
optparse-0.10.1/

Sorry, that’s what I meant.

Currently, I have

$ ls /usr/local/doc/ruby/
ri-1.8b ruby-1.8.0

And Joel mentioned optparse. I know ri uses a home-grown installer,
and optparse is now standard library, but I’ll see if I can find out
how it might get there.

It’s pretty common for documentation directories, in particular, to
have version numbers associated. Is that something we would want to
expect with ruby packages?

Gavin

···

On Saturday, September 27, 2003, 10:46:16 AM, Jim wrote:

On Saturday, 27 September 2003 at 9:35:00 +0900, Gavin Sinclair wrote:

-talk,

What about agreeing on a standard location for installed
documentation?

$prefix/doc/foo/
README
api/
etc…

How about

/usr/local/doc/ruby/foo

Jim Freeze wrote:

What about agreeing on a standard location for installed
documentation?

$prefix/doc/foo/
README
api/
etc…

How about

/usr/local/doc/ruby/foo

I don’t know how it got there, but I’ve already got:

$ ls /usr/local/share/doc/ruby
optparse-0.10.1/

If you use the ports system, it’ll create docs and examples directories,
but that’s something the FreeBSD guys are adding in (I know because I
committed about a dozen NetBSD packages and did the same thing).

···

On Saturday, 27 September 2003 at 9:35:00 +0900, Gavin Sinclair wrote:


When a Banker jumps out of a window, jump after him – that’s where the
money is.
– Robespierre
Rasputin :: Jack of All Trades - Master of Nuns

Yes

···

On Saturday, 27 September 2003 at 11:46:28 +0900, Gavin Sinclair wrote:

On Saturday, September 27, 2003, 10:46:16 AM, Jim wrote:

Currently, I have

$ ls /usr/local/doc/ruby/
ri-1.8b ruby-1.8.0

And Joel mentioned optparse. I know ri uses a home-grown installer,
and optparse is now standard library, but I’ll see if I can find out
how it might get there.

It’s pretty common for documentation directories, in particular, to
have version numbers associated. Is that something we would want to
expect with ruby packages?


Jim Freeze

It’s the thought, if any, that counts!

OK. Nobody has said that we shouldn’t have such a standard, nor that
such a standard should be in some way different, so I suppose we have
two important steps:

  1. Engineer mkconfig.rb so that the following line appears in
    rbconfig.rb:

    CONFIG[“rubydocdir”] = “$(prefix)/doc/ruby”

    On my Cygwin build, that will evaluate to /usr/local/doc/ruby.
    On my Windows build, that will evaluate to
    D:/Software/ruby/doc/ruby.

  2. Ask Minero Aoki to make use of this in setup.rb/install.rb:

    Given
    foo/install.rb
    foo/doc/README
    foo/VERSION (contains “1.5b”)

    Then
    cd foo
    ruby install.rb {config|setup|install}

    Produces
    /usr/local/doc/ruby/foo-1.5b/README

That idea of a “VERSION” file is something I just thought of, and I’m
sure someone will think of something better.

After some time for comments on this list (read: I’m about to go out
for the rest of the day) I’ll submit an RCR for the first point above.

Regards,
Gavin

···

On Sunday, September 28, 2003, 1:57:22 AM, Jim wrote:

On Saturday, 27 September 2003 at 11:46:28 +0900, Gavin Sinclair wrote:

On Saturday, September 27, 2003, 10:46:16 AM, Jim wrote:

Currently, I have

$ ls /usr/local/doc/ruby/
ri-1.8b ruby-1.8.0

And Joel mentioned optparse. I know ri uses a home-grown installer,
and optparse is now standard library, but I’ll see if I can find out
how it might get there.

It’s pretty common for documentation directories, in particular, to
have version numbers associated. Is that something we would want to
expect with ruby packages?

Yes