Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Packaging programs (as opposed to modules)

by bigmacbear (Monk)
on Apr 15, 2004 at 16:07 UTC ( [id://345434]=perlquestion: print w/replies, xml ) Need Help??

bigmacbear has asked for the wisdom of the Perl Monks concerning the following question:

I've read How do you package your programs? and a buncha other nodes regarding installation and distribution and haven't found quite what I'm looking for.

Basically, I would like to install a set of scripts, man pages, CGI programs, and compiled (C) wrapper executables for setuid purposes. I'd like

  • the stuff that needs to be in people's PATHs to go into $PREFIX/bin and its (processed) POD in $PREFIX/man/man1,
  • the stuff that doesn't (like the setuid wrappers, the scripts that need to get wrapped, and the stuff that runs out of cron) to go in $PREFIX/sbin and its POD in $PREFIX/man/man1m,
  • the configuration files for all this to go in $PREFIX/etc, and
  • the CGI programs (if Apache is installed) to go in $SERVER_ROOT/cgi-bin.

ExtUtils::MakeMaker seems ill-suited for this. It wants to put everything either in $PREFIX/bin (POD in $PREFIX/man/man1) or $PREFIX/lib (POD in $PREFIX/man/man3). It also wants to make modules rather than bundles of scripts. While modular programming is laudable (and I did actually split out much of the functionality into modules), installing applications rather than modules seems beyond the scope of MakeMaker. And Module::Build doesn't seem to understand this either.

I suppose what I'm looking for is a more general-purpose installation tool along the lines of GNU Configure, but less complicated to use and more suited to Perl. Any suggestions?

Replies are listed 'Best First'.
Re: Packaging programs (as opposed to modules)
by samtregar (Abbot) on Apr 15, 2004 at 19:07 UTC
      Forgive my ignorance but I thought a package was a module. Is this not the case?

      I am reading through Oreilly's "Perl Objects, References and Modules". There was a chapter which discussed "Packages". It sounded like a regular module. Or am I just not getting it? Thx

        "Packaging" in this sense is putting together a set of application-level scripts, configuration files, etc. in a form suitable for distribution and installation. In other words, I am using the word "package" in one of its common English senses and not in its Perl sense.

        If I'm not mistaken, in Perl (5), every module is a package, but not every package is a module. The "package" keyword simply defines a non-default name space in which to put variables, functions, and/or methods. It can be used within an ordinary script, but is usually used at the top of a module's .pm file to define the name space of the module using the module's name.

Re: Packaging programs (as opposed to modules)
by waswas-fng (Curate) on Apr 15, 2004 at 16:12 UTC
    Mail::Spamassassin installs modules, scripts, compiled executables and man pages. Maybe take a look at that for hints on how to do it for youself? I am sure the CVS tree for it has the installer generator info.


    -Waswas

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://345434]
Approved by broquaint
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-26 07:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found