Mailing List Archive

Ruby ebuild "howto" question
Hi,

I want to package a ruby daemon (stompserver which I'm currently working
on) and wonder how to add an init script to the package. I already have
a gem wrapped in an ebuild (probably one of the easiest packaging you
could ever dream of) but I'd like to put an init script file in the
files subdir and doinitd it, which if I'm not mistaken should take place
in src_install. Unfortunately src_install is defined in the gems eclass
and I couldn't find any hooks in there which would allow me to define a
function for installing "out of gem" files.

I'm quite the newbie with eclasses so the only thing I can think of
right now is to *not* inherit the gems eclass, hand-copy the methods
from the gems eclass and modify them to suit my needs.

Is there a better way?

Lionel
--
gentoo-dev@gentoo.org mailing list
Re: Ruby ebuild "howto" question [ In reply to ]
On 10/08/07, Lionel Bouton <lionel-subscription@bouton.name> wrote:

> I'm quite the newbie with eclasses so the only thing I can think of
> right now is to *not* inherit the gems eclass, hand-copy the methods
> from the gems eclass and modify them to suit my needs.
>
> Is there a better way?

Yes, see:

http://devmanual.gentoo.org/eclass-writing/index.html#export-functions

Regards,

--
Richard Brown
--
gentoo-dev@gentoo.org mailing list
Re: Ruby ebuild "howto" question [ In reply to ]
As soon as you define your own src_install() function in your ebuild, it
will override the eclass's src_install function.

Thanks,

Seemant
Re: Ruby ebuild "howto" question [ In reply to ]
Richard Brown wrote the following on 10.08.2007 21:44 :
> Yes, see:
>
> http://devmanual.gentoo.org/eclass-writing/index.html#export-functions
>

Hits the very spot I was aiming for, many thanks.

Lionel
--
gentoo-dev@gentoo.org mailing list