From: ghorner on
> I want to run the man executable (pointing it to my project's man/
> directory) from my project's executable in bin/.  With RubyGems, I can
> rely on bin/ being next to man/.  But with setup.rb I don't know how to
> find my project's man/ directory from my project's executable in bin/!
>
> Any suggestions?

Just use gem-man, http://github.com/defunkt/gem-man:

$ gem install gem-man
$ gem man ember

> Will it be copied into /usr/share/man/ by RubyGems/setup.rb/Rip and
> friends?

The next version of rip should handle installing man pages.
From: Lucas Nussbaum on
On 21/04/10 at 14:01 +0900, Suraj Kurapati wrote:
> Thomas Sawyer wrote:
> > On Apr 20, 1:12 pm, Suraj Kurapati <sun...(a)gmail.com> wrote:
> >> find my project's man/ directory from my project's executable in bin/!
> >
> > The standard approach would be something like:
> >
> > require 'rbconfig'
> > dir = Config::CONFIG['datadir']
> > file = File.join(dir, 'man/man1/ember.1')
>
> Thanks. Based on this example, I found that there is a
> Config::CONFIG['mandir'] which tells us exactly where the
> system's man/ directory is located.
>
> > B/c of RubyGems there is an extension method that redirects to the the
> > appropriate place.
> >
> > Config.datadir("ember")
>
> RubyGems does not seem to provide that functionality on my system:
>
> sun(a)yantram ~> irb
> ## ruby 1.9.1p378 (2010-01-10 revision 26273) [i686-linux]
> >> require 'rbconfig'
> => true
> >> Config.datadir("ember")
> NoMethodError: undefined method `datadir' for RbConfig:Module
> from (irb):2
> from /usr/bin/irb:12:in `<main>'
> >> require 'rubygems'
> => false
> >> Config.datadir("ember")
> NoMethodError: undefined method `datadir' for RbConfig:Module
> from (irb):4
> from /usr/bin/irb:12:in `<main>'
> >> Gem::VERSION
> => "1.3.6"
>
> > But I think it might be a problem to tell which is which for locating
> > the man/ directory.
>
> I guess RubyGems provides a Config.mandir(the_gem_name) method to do
> this?
>
> >> Also, if I provide a man/ directory in my gem/tarball package like this:
> >>
> >> man/
> >> └── man1
> >>     ├── ember.1
> >>     └── ember.1.html
> >
> > Can man handle .html?
>
> Nope. That's just there as a backup, in case a user is on Windoze
> or their system somehow lacks the `man` command. `man` does warn me
> about it though when searching for manpages in my man/ directory:
>
> man: warning: man/man1/ember.1.html: ignoring bogus filename
>
> But I think it's worthy trade-off to have a HTML version available.
>
> > I glanced at the entries in my system and I
> > noticed they are all gzipped (ending in .gz).
>
> Thanks for the tip. I've gzipped my Roff manpage now.
>
> >> Will it be copied into /usr/share/man/ by RubyGems/setup.rb/Rip and
> >> friends?
> >
> > Setup.rb does. RubyGems does not. Not sure about Rip.
>
> Will RubyGems ever follow the FHS style of installation like setup.rb?
>
> Will setup.rb ever follow the keep-everything-together RubyGems style?
>
> What installation style will this Ruby Packaging Standard follow?
>
> So many questions... Life was easier when I only used RubyGems. :-/

I think that what is important is that we have a clear set of guidelines
for Ruby library developers to follow, that allow to do both
rubygems-style stuff and setup.rb-style stuff. The goal of this
"standard" should not be to push one or the other solution.
--
| Lucas Nussbaum
| lucas(a)lucas-nussbaum.net http://www.lucas-nussbaum.net/ |
| jabber: lucas(a)nussbaum.fr GPG: 1024D/023B3F4F |

From: Suraj Kurapati on
Lucas Nussbaum wrote:
> On 21/04/10 at 14:01 +0900, Suraj Kurapati wrote:
>> Will RubyGems ever follow the FHS style of installation like setup.rb?
>> Will setup.rb ever follow the keep-everything-together RubyGems style?
>> What installation style will this Ruby Packaging Standard follow?
>
> I think that what is important is that we have a clear set of
> guidelines for Ruby library developers to follow, that allow to do
> both rubygems-style stuff and setup.rb-style stuff.

It's burdensome on Ruby library developers to support both ways.

Perhaps this Ruby Packaging Standard could provide a tiny Ruby
library to ease that burden, by making the FHS/setup.rb style
installation appear like RubyGems style installation (i.e. how all
files are organized inside a release package and when checked out
from a source code repository)?

> The goal of this "standard" should not be to push one or the other
> solution.

Good point. Thanks for clarifying this.
--
Posted via http://www.ruby-forum.com/.

From: Lucas Nussbaum on
On 21/04/10 at 14:55 +0900, Suraj Kurapati wrote:
> Lucas Nussbaum wrote:
> > On 21/04/10 at 14:01 +0900, Suraj Kurapati wrote:
> >> Will RubyGems ever follow the FHS style of installation like setup.rb?
> >> Will setup.rb ever follow the keep-everything-together RubyGems style?
> >> What installation style will this Ruby Packaging Standard follow?
> >
> > I think that what is important is that we have a clear set of
> > guidelines for Ruby library developers to follow, that allow to do
> > both rubygems-style stuff and setup.rb-style stuff.
>
> It's burdensome on Ruby library developers to support both ways.

Not really. Both solutions are largely compatible. You just need to
organize the files correctly, and it just works.

> Perhaps this Ruby Packaging Standard could provide a tiny Ruby
> library to ease that burden, by making the FHS/setup.rb style
> installation appear like RubyGems style installation (i.e. how all
> files are organized inside a release package and when checked out
> from a source code repository)?

I'm not sure I understand your point. The point of setup.rb is to
respect FHS, which contradicts installing everything in the same place.
But the starting point of a setup.rb installation is the same as a
well-organized gem: if you put executables in bin/, libraries in lib/,
etc, it just works.
--
| Lucas Nussbaum
| lucas(a)lucas-nussbaum.net http://www.lucas-nussbaum.net/ |
| jabber: lucas(a)nussbaum.fr GPG: 1024D/023B3F4F |

From: Suraj Kurapati on
Lucas Nussbaum wrote:
> On 21/04/10 at 14:55 +0900, Suraj Kurapati wrote:
>> Perhaps this Ruby Packaging Standard could provide a tiny Ruby
>> library [...] making the FHS/setup.rb style installation appear
>> like RubyGems style installation
>
> I'm not sure I understand your point. The point of setup.rb is to
> respect FHS, which contradicts installing everything in the same place.

My concern is about the Ruby code in bin/ and lib/ being able to
find the rest of the files that originally came in the package. If
this RPS would define that related-file-finding code, then I don't
need to reinvent it (or copy/paste) for all of my Ruby libraries.
--
Posted via http://www.ruby-forum.com/.