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

libexecdir - helper scripts



I'm updating our build system for a package and (as a Debian user) I'm
trying to keep to Debian standards for installation locations.  Again, this
is for Swish-e, which includes a binary program but also some helper
scripts.

I discussed this on the autoconf and automake lists, but also want to check 
here for advice on where helper scripts should be installed.

The short version:  Are these locations ok?

    /usr/lib/<package>  -- helper scripts as part of a binary package
    /usr/lib/<package>/perl -- support modules for the helper scripts

The long version:

We have a number of helper scripts that are run by the main program -- code 
running code.  The GNU coding standard says that libexecdir is the place 
for these.  The helper scripts also have Perl modules that are *specific* to 
the helper scripts.  These are placed in $libexecdir/perl.

At build (make) time we use sed to update a few locations in those files, 
for example 

    sed -e 's,@@perlmoduledir@@,$(libexecdir)/perl,'

is used so "use lib ..." in a script will know where to find its helper 
modules.  So note that the installed scripts can't really be copied from one 
machine to another since they are modified at build time.

The binary also gets libexecdir passed to it at build time as a -D define.


The default for libexec in autoconf is 

  libexecdir='${exec_prefix}/libexec'

where exec_prefix is normally prefix (/usr or /usr/local).

Our developers discussed this and don't really like with that default for 
libexecdir, so if libexecdir is not specifically set with --libexecdir at 
configure time we set it to

  libexecdir='${exec_prefix}/lib/${PACKAGE}'

How does all this fit with Debian?  The installed scripts are not really 
arch dependent (they are text after all), but they are modified at build 
time.  So we debated /usr/share/<package> vs. /usr/lib/<package>.

Thanks,


-- 
Bill Moseley
moseley@hank.org



Reply to: