From: Intransition Date: 2010-04-21T07:00:38+09:00 Subject: Re: Proposing a Ruby Packaging Standard On Apr 20, 1:12 pm, Suraj Kurapati wrote: > Hi, > > I've only ever used RubyGems for packaging my projects, so I'm kind of > scared of setup.rb's style of separating my project's directories (i.e. > lib/ is no longer next to bin/ and so on).  In particular, I am confused > about the following: > > 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? The standard approach would be something like: require 'rbconfig' dir = Config::CONFIG['datadir'] file = File.join(dir, 'man/man1/ember.1') B/c of RubyGems there is an extension method that redirects to the the appropriate place. Config.datadir("ember") But I think it might be a problem to tell which is which for locating the man/ directory. > 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? I glanced at the entries in my system and I noticed they are all gzipped (ending in .gz). > 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.