On Wed, 28 Jul 2004 18:15:23 +0400, Ruslan U. Zakirov <[EMAIL PROTECTED]> wrote:
> Hello.
> 1) I have bin and sbin dirs in my distribution. What args should I use
> to install it into /usr/bin, /usr/sbin? By default MM support
> INST_SCRIPT&EXEC_FILES, but can I extend it to support 'sbin' and 'etc'?
If Config.pm doesn't know about sbin and etc (and it doesn't) MakeMaker doesn't.
Here's the standard work arounds:
1) Don't bother with the distinction between bin and sbin (its kinda
arbitrary IMHO) just put everything in bin.
2) Instead of putting config files in /etc, make the config files a
.pm file and install it like one. See Net::Config as an example.
> 2) I didn't find any info about changing ownership on files that was
> installed. I know only one way 'postamble', but I want avoid direct
> writing into Makefile.
Changing ownership as in chown? You can't (without a postamble). And
you probably shouldn't because you can't assume:
A) the module is being installed as root
B) the system has the users and groups you expect
> 3) I get 'configure', 'MANIFEST'... files as arguments to MY::libscan
> function. I thought that it would be only files that MM is going to
> install. I'm trying to exclude files from installation, for eg: *.in.
> I know that I can use PM argument to map files, but this is not suitable
> for my purpose.
libscan should work if you look for things you *don't* want instead of
what you do want.
sub MY::libscan {
my($self, $file) = @_;
# So you preserve MM's ideas of what should be skipped
my $keeper = $self->SUPER::libscan($file);
# Ignore anything ending in .in.
$keeper ||= $file !~ /\.in$/;
return $keeper;
}
As a final note, if you're finding MakeMaker too hard to customize try
Module::Build.