Hello. Thanks for all your valuable comments. Short and informative.
Sorry I didn't describe why do I need this all. It's all about RTx::Shredder(on CPAN). RTx::Shredder is an extension to RT API that allow wipe out data from RT DB.
Current build/install process:
1) Autrijus wrote Module::Install::RTx and of course I use it cause it's do much work for me.
2) I use autoconf tools to drop in 'use lib ...' lines while build process so distro has .in files that are installed, but shouldn't.
I've decide to wrote M::I::Skip extension that allow throw away files with regexp from installation process(with libscan overriding).
Ooops, M::I::RTx uses preamble to install all other files except libs.
Now I think about refactoring M::I::RTx to more generic code that allow better control Makefile generation process with other M::I::* extensions.
Michael G Schwern wrote:
Ahh, understood. Current perl implementation doesn't cover well pure-perl apps that may require some extended dirs in layout. May be I should consider autoconf only way, but I like flexibilities of the CPAN and CPAN.pm :)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.
Ok.
Now I've saw Mail::SpamAssassin. As I can see adds features that I wish, but Makefile.PL is so big and hacky :(
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.
It's requirment :( of the module. RT config is accesible only under root account.
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
I can stat on RT files and I have to if I want provide correct extension.
Heh. I din't know that MY:: namespace is "ISA", I thought it's like callback. Thanks.
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);
Isn't so hard, but new.
# 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.
