We need new feature for pkg_create?

Boris Kovalenko boris at ntmk.ru
Mon Feb 7 08:52:09 PST 2005


Johnny Lam wrote:

> Boris Kovalenko wrote:
>
>>
>>     I'm net/quagga port maintainer. My port is installing some 
>> scripts to /etc/rc.d. I know, this is bad, but I really need rcorder 
>> to be applied to my scripts.
>
>
> Could you explain what you mean by needing rcorder to by applied to 
> your scripts?  Does that mean that you just want the scripts to be 
> installed into /etc/rc.d automatically by the package, regardless of 
> whether you do "make install" or pkg_add a binary package?

Quagga is the routing software, so since 5.X I'm trying to use rcorder
to properly start it (because other NETWORKING functions may depend on
it). With make install we have no problems, because we always have
${PREFIX} available, but with pkg_add we haven't or I'm misunderstanding
something. And with pkg_add I want to install scripts under ${PREFIX}
user supplied to follow his wishes. I know about ${PKG_PREFIX} and
trying to use right one. If I use hardcoded %%CWD_TRICK%% this is
impossible (imho).

> You can install the rc.d script somewhere under ${PREFIX} and then 
> write a +INSTALL script copy it into place.  The +INSTALL script is 
> invoked with PKG_PREFIX set to the correct package prefix, so copying 
> ${PKG_PREFIX}/share/quagga/quagga${RC_SUFX} to /etc/rc.d/quagga will 
> always work correctly.  There would need to be a corresponding action 
> in the +DEINSTALL script to remove the rc.d script.

Hmm... still misunderstand You.. May You give a quick example?

>
> FWIW, the above is what is done in NetBSD pkgsrc.  Pkgsrc has a 
> standard set of +INSTALL and +DEINSTALL scripts that are generated 
> during a "make install" that are controlled by various Makefile 
> variables.  These scripts can create users, copy config files into 
> place, and create directories with special permissions, and allow us 
> to extend the pkg_* tools in many ways without needing to change the 
> existing semantics or behavior of the tools.

I'm talking about make package and I don't know any variables which may
help me. If I'm wrong please point me :) I want to be a guru :) And
always listen to a guru

>
>     Cheers,
>
>     -- Johnny Lam <jlam at NetBSD.org>
> _______________________________________________
> freebsd-ports at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ports
> To unsubscribe, send any mail to "freebsd-ports-unsubscribe at freebsd.org"
>
Regards,
    Boris




More information about the freebsd-ports mailing list