Re: [Module-build-general] Re: Help with Debian package of Module::Build
Status: Beta
Brought to you by:
kwilliams
|
From: Ken W. <ke...@ma...> - 2003-02-16 19:19:02
|
On Sunday, February 16, 2003, at 12:51 PM, sc...@po... wrote: > When building a package, one should build the software with the paths > from which it will ultimately run, not where it will initially be > installed. > So doing the above might cause some problems down the road. Yeah, good point. > MakeMaker 6.06 added a DESTDIR macro, inspired by the GNU make standard > targets (http://www.gnu.org/manual/make/html_node/make_127.html). This > allows a package builder to build a package normally, but install it > into a different directory root for packaging. So 'destdir' is the/a standard name for this? > Internally, install_map would do something like: > > sub install_map { > my ($self, $blib) = @_; > my $lib = File::Spec->catfile($blib,'lib'); > my $arch = File::Spec->catfile($blib,'arch'); > my $inst_lib = $self->{config}{sitelib}; > my $inst_arch = $self->{config}{sitearch}; > my $destdir = $self->{properties}{destdir} || ''; > > if( length $destdir ) { > $inst_lib = File::Spec->catfile($destdir, $inst_lib); > $inst_arch = File::Spec->catfile($destdir, $inst_arch); > } > > return {$lib => $inst_lib, > $arch => $inst_arch, > read => ''}; # To keep ExtUtils::Install quiet > } Looks good to me. I'll apply it. -Ken |