Axel:
Your MYDESTDIR "definitely ugliest" hack is the
best workaround I've seen yet! I can say it is
backwards compatible with the old MakeMaker and
it even works on the stock perl 5.8.0 (RH 8.0)
version. (I can't really say if it'll be forward
compatible, but I'll try to remember to write
Schwern a note ASAP if something in the MakeMaker
cvs source tree suddenly causes it to stop
working.) I just deleted many lines of MakeMaker
version sniffing within cpan2rpm and changed it
all to your MYDESTDIR method. Lets just hope
the "MYDESTDIR" parameter is never used for
anything in future versions of MakeMaker. :-D
I also changed cpan2rpm to install into the
/vendor_perl/ directories as Schwern suggested
and as outlined in the Debian Perl Policy:
http://www.debian.org/doc/packaging-manuals/perl-policy/
Rob
On Thu, 19 Dec 2002, Axel Thimm wrote:
> On Wed, Dec 18, 2002 at 04:05:40PM -0800, [EMAIL PROTECTED] wrote:
> > On Wed, Dec 18, 2002 at 09:38:43PM +0000, Ed Avis wrote:
> > > It doesn't help with getting a Makefile.PL that works on machines with
> > > current MakeMakers installed (I want to support as far back as
> > > perl 5.005). So I guess the question I should have asked is not 'what
> > > is the best way to do this?' but rather 'what workaround can I use to
> > > get the desired effect with current MakeMaker versions?'.
> >
> > As the problem primarily effects only rpm authors, they should simply upgrade.
> > Otherwise, Mandrake and RH have a small patch to apply against 5.8.0 to
> > restore 'make install PREFIX=~'
>
> Where can that patch be found? Anyway, rpms are not only binary - I personally
> very much value src.rpms and those should also build on user machines.
>
> > Barring that, "make install PREFIX=foo" will work on anything older
> > than 5.91 (I think that's where it was broken, check the logs).
> > > Axel Thimm's suggestion of running the Makefile.PL twice (once before
> > > building and once before installing) sounds like the best way.
> > The Makefile might not like being newer than the files its building, I
> > wouldn't trust it even if it happens to work.
>
> Yes, that's true. Does MakeMaker generate rules that would cause a target to
> depend on the Makefile?
>
> Other than that, here is the definitely ugliest workaround, which works at
> least on RedHat 8 (I rebuilt xmltv with it) and might even be backwards and
> forwards compatible:
>
> Build with:
> > ... perl Makefile.PL 'PREFIX=$(MYDESTDIR)'%{_prefix}
>
> Install with:
> > %makeinstall MYDESTDIR=$RPM_BUILD_ROOT
>
> This hack injects a reference to a variable MYDESTDIR in front of every use of
> PREFIX in the Makefile and is subject to late evaluation at make runtime. It
> shouldn't be called DESTDIR, because it will conflict with the recent
> DESTDIR-patch (resulting in the path being doubled). I am not sure whether
> PERLPREFIX should be treated in a similar way. If it is used for installation
> purposes then it should.
>
> Shoot me, I deserve it ...
>