From: Roeland Moors Date: 2004-08-28T01:45:57+09:00 Subject: Re: package glade files On Sat, Aug 28, 2004 at 12:37:23AM +0900, Mauricio Fern?ndez wrote: > On Fri, Aug 27, 2004 at 05:01:44PM +0900, Roeland Moors wrote: > > I'm creating a project with ruby/gtk. > > This program uses glade files for the interface. > > What would be the correct place to store these files? > > Should I place these files in lib/ ? > > They should probably go into $prefix/share/yourapp/; I've seen similar > things under data/ in the sources. > Now, I feel that most of ruby's lib/ should be under share/ruby actually: > if you feel differently about this, lib/ would be a good option for your > glade files too. I my own source I put the glade files in a seperate dir. If I put them in the lib dir, I would have to type more before I can use tab completion to open the file. I know, I'm very lazy :-) It would make sence to put it in share/ if it was used by multiple programs, but that probably will not happen. > > > Here is the directory structure RPA suggest: > > http://rpa-base.rubyforge.org/wiki/wiki.cgi?GoodPractices > > But they don't mention glade files. > > > > I'm asking this because I'm creating packages gem/deb. > > Are there gems with glade files as an example? > > RubyGems doesn't care in general about the layout of your sources, > since they will be packed as-is (you can exclude files, of course), > or more precisely as Rake leaves them after the 'pre-processing' phase. > > The only problem is finding the files at runtime. Before RubyGems, it > was safe to access them via > require 'rbconfig' > File.join(::Config::CONFIG["datadir"], "myappname", subdir) > > If you're using RubyGems, you have to require 'rubygems', determine the > 'gemdir' and the subdirectory you need. > And for RPA? > At any rate, please do not use tricks involving File.dirname(__FILE__); > they make it so much more difficult to repackage for systems with some > policy... > > > Wouldn't it be nice if rake could make all these packages in one > > step :-) > > Debian is missing a dh_ruby* family of helpers atm., so Rake would > have to generate explicitly all the required code in debian/rules. > As for debian/control, since the metadata differs from RubyGems' you'd > end up having to specify quite a lot in the Rakefile -- not to mention > the other files under debian/. At some point you have to see which of > the following options is better: > * having Rake generate debian/* and run dpkg-buildpackage > * generating debian/* manually (maybe automating debian/Changelog) and > having Rake just call dpkg-buildpackage * Creating a dh_ruby* helper which rake can use? > > -- > Running Debian GNU/Linux Sid (unstable) > batsman dot geo at yahoo dot com > >