[devel] Re: perl-5.8.0-alt0.4
Alexey Tourbin
=?iso-8859-1?q?at_=CE=C1_turbinal=2Eorg?=
Пн Окт 21 17:48:28 MSD 2002
On Mon, Oct 21, 2002 at 01:13:36PM +0400, Dmitry V. Levin wrote:
> > - make use of site/vendor distinction; additional perl packages
> > provided by %vendor must install in %vendor_privlib
> > (typical invocation: "perl Makefile.PL INSTALLDIRS=vendor");
> > local installations must install in %site_privlib
>
> Можно об этом поподробнее?
В новых версиях перла существует 3 группы каталогов для установки
модулей (см. ExtUtils::MakeMaker(3), INSTALL): perl, vendor, и site
(раньше существовали только perl и site).
- в каталоги группы perl устанавливаются bundled модули;
- в каталоги группы vendor устанавилваются модули, собранные вендором
(в рамках дистрибутива);
- каталоги группы site используются для локальных установок.
Таким образом, теперь мы можем предоставить пользователям полноценную
возможность самостоятельно устанавливать дополнительные модули
(например, с помощью CPAN interactive shell) в /usr/local, не нарушая
при этом целостность дистрибутива (/usr/lib).
У меня есть два вопроса:
1) может ли пакет создавать какие-либо каталоги в /usr/local?
2) что правильнее: /usr/local/perl5 или /usr/local/lib/perl5?
Цитирую INSTALL:
=item Directories for vendor-supplied add-on files
Lastly, if you are building a binary distribution of perl for
distribution, Configure can optionally set up the following directories
for you to use to distribute add-on modules.
Configure variable Default value
$vendorprefix (none)
(The next ones are set only if vendorprefix is set.)
$vendorbin $vendorprefix/bin
$vendorscript $vendorprefix/bin
$vendorlib $vendorprefix/lib/perl5/vendor_perl/$version
$vendorarch $vendorprefix/lib/perl5/vendor_perl/$version/$archname
$vendorman1 $vendorprefix/man/man1
$vendorman3 $vendorprefix/man/man3
$vendorhtml1 (none)
$vendorhtml3 (none)
These are normally empty, but may be set as needed. For example,
a vendor might choose the following settings:
$prefix /usr
$siteprefix /usr/local
$vendorprefix /usr
This would have the effect of setting the following:
$bin /usr/bin
$scriptdir /usr/bin
$privlib /usr/lib/perl5/$version
$archlib /usr/lib/perl5/$version/$archname
$man1dir /usr/man/man1
$man3dir /usr/man/man3
$sitebin /usr/local/bin
$sitescript /usr/local/bin
$sitelib /usr/local/lib/perl5/site_perl/$version
$sitearch /usr/local/lib/perl5/site_perl/$version/$archname
$siteman1 /usr/local/man/man1
$siteman3 /usr/local/man/man3
$vendorbin /usr/bin
$vendorscript /usr/bin
$vendorlib /usr/lib/perl5/vendor_perl/$version
$vendorarch /usr/lib/perl5/vendor_perl/$version/$archname
$vendorman1 /usr/man/man1
$vendorman3 /usr/man/man3
Note how in this example, the vendor-supplied directories are in the
/usr hierarchy, while the directories reserved for the end-user are in
the /usr/local hierarchy.
The entire installed library hierarchy is installed in locations with
version numbers, keeping the installations of different versions distinct.
However, later installations of Perl can still be configured to search the
installed libraries corresponding to compatible earlier versions.
See L<"Coexistence with earlier versions of perl5"> below for more details
on how Perl can be made to search older version directories.
Of course you may use these directories however you see fit. For
example, you may wish to use $siteprefix for site-specific files that
are stored locally on your own disk and use $vendorprefix for
site-specific files that are stored elsewhere on your organization's
network. One way to do that would be something like
sh Configure -Dsiteprefix=/usr/local -Dvendorprefix=/usr/share/perl
=
Подробная информация о списке рассылки Devel