[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Packaging a CGI with modules?

-=| MJ Ray, Fri, 06 Jul 2007 08:54:52 +0100 |=-

> What is the recommended way to package a CGI with its own modules?

Here's how I'd do it. This is my personal experience. Other pkg-perl
members are welcome to share theirs :)

> As well as having ITP'd koha, I am an upstream developer of it.
> Upstream, I am setting WriteMakefile()'s PM to move the files into
> good locations - for example, I'm currently putting the CGIs in
> $(INST_LIB)/koha/cgi-bin - and I intend to mv them with debian/rules
> to meet policy.  Is that the best MakeMaker-definable location for
> them to start in?

Sure. koha/cgi-bin for the CGIs, koha/lib for the modules (*.pm).

This way one would be able to "make INST_LIB=debian/tmp", right?

If there is some way to put custom path in CGIs' @INC, the IMO correct
place for the modules is /usr/share/koha/lib. If it is troublesome to
get that path in @INC, then install them in /usr/share/perl5/

> Also, I'm intending to use prompt() to obtain values to generate
> configuration files.  Is there a slick way to get debconf to supply
> prompt() answers,

I am not sure. What is prompt? At what stage of the build/install
process are these questions asked?

> should I rerewrite the config file from post-inst,

This is what usually is done. See "Config file handling" in
debconf-devel(7) for an example.

> or something else?

Generally, you ask all the questions using debconf in .config and then
use the answers in .postinst to create/modify the config files.

dam            JabberID: dam@jabber.minus273.org

Attachment: signature.asc
Description: PGP signature

Reply to: