Michael G Schwern <[EMAIL PROTECTED]> writes:

> I've just hit a small snag.  On the left is your typical Debian system
> installation (which is sufficiently odd enough to be non-trivial).  On
> the right is the result under the proposed PREFIX algorithm.

Purely as a data point for another fairly complex setup, here's how I
configure Perl:

    -Dprefix=/usr/pubsw
    -Dsiteprefix=/usr/local
    -Dvendorprefix=/usr/pubsw
    -Dvendorlib=/usr/pubsw/lib/perl5/site_perl/%version%
    -Dvendorarch=/usr/pubsw/lib/perl5/site_perl/%version%/systems/@sys
    -Darchlib=/usr/pubsw/lib/perl5/%version%/systems/@sys
    -Dinstallprefix=%package%/@sys
    -Dinstallarchlib=%package%/@sys/lib/perl5/%version%/systems/`sys`

where %package% is replaced by /afs/.ir/pubsw/Languages/perl-5.6.1 and
%version is replaced by 5.6.1.  This is for the site-wide build; for local
builds for servers, I use:

    -Dprefix=/usr/local
    -Dsiteprefix=/usr/local
    -Dvendorprefix=/usr/pubsw
    -Dvendorlib=/usr/pubsw/lib/perl5/site_perl/%version%
    -Dvendorarch=/usr/pubsw/lib/perl5/site_perl/%version%/systems/@sys
    -Dlocincpth="/usr/local/include /usr/pubsw/include /usr/pubsw/X/include"
    -Dloclibpth="/usr/local/lib /usr/pubsw/lib /usr/pubsw/X11R6/lib"
    -Dinstallprefix=%root%
    -Dinstallsiteprefix=%root%

where %root% is /usr/local/stow/perl-5.6.1.  This is an example of a
currently working use of the vendor paths by someone other than a vendor.

Note that Perl's installation process gets things wrong for both of these
cases in different ways; I have to run the following fixup code for the
site-wide build:

cd %package%/share/lib/perl5/%version%/systems/@sys \
    && perl -i -pe 's(%package%/\@sys)(/usr/pubsw)g' .packlist \
    && perl -i -pe 'next if !/^install|^ccd/; s(%package%/\@sys)(/usr/pubsw)' \
        Config.pm

and the following fixup code for the local build:

cd %root%/lib/perl5/%version%/sun4-solaris \
    && perl -i -pe 's(%root%)(/usr/local)g' .packlist \
    && perl -i -pe 'next if !/^install|^ccd/; s(%root%)(/usr/local)' \
        Config.pm
rmdir /usr/local/stow/perl-%version%/lib/perl5/site_perl/%version%/sun4-solaris

because after the initial install, I want Perl to use the real paths for
installation and not the package paths.

I then configure Perl modules for site-wide installation with:

Makefile.PL INSTALLDIRS=site
    INSTALLARCHLIB=%SITELIB%/systems/@sys
    INSTALLSITEARCH=%SITELIB%/systems/@sys
    INSTALLSITELIB=%SITELIB%
    INSTALLHTMLSCRIPTDIR=%PREFIX%/share/nohtml
    INSTALLBIN=%PREFIX%/@sys/bin
    INSTALLSCRIPT=%PREFIX%/share/bin
    INSTALLMAN1DIR=%PREFIX%/share/man/man1
    INSTALLMAN3DIR=%PREFIX%/share/man/man3p
    SITELIBEXP=%INSTALLED%
    SITEARCHEXP=%INSTALLED%/systems/@sys

where %PREFIX% is /afs/.ir/pubsw/Site/siteperl-5.6.1 and %SITELIB% is
%PREFIX%/share/lib.  Those directories are then linked by our packaging
tools into /usr/pubsw (such as /usr/pubsw/lib/perl5/5.6.1/site_perl).

For local modules, I use:

    /usr/local/bin/perl Makefile.PL \
        LIB=/usr/local/stow/siteperl-5.6.1/lib/perl5/site_perl/5.6.1 \
        INSTALLHTMLSCRIPTDIR=/usr/local/stow/siteperl-5.6.1/html \
        INSTALLBIN=/usr/local/stow/siteperl-5.6.1/bin \
        INSTALLSCRIPT=/usr/local/stow/siteperl-5.6.1/bin \
        INSTALLMAN1DIR=/usr/local/stow/siteperl-5.6.1/man/man1 \
        INSTALLMAN3DIR=/usr/local/stow/siteperl-5.6.1/man/man3

-- 
Russ Allbery ([EMAIL PROTECTED])             <http://www.eyrie.org/~eagle/>

Reply via email to