On Wed, Dec 18, 2002 at 11:31:02AM +0000, Ed Avis wrote:
> On Wed, 18 Dec 2002, Axel Thimm wrote:
> > John, the problem lies in the nature of rpm building. Building rpm should
> > not be done under /usr, but under /var/tmp/somthing-root/usr.  In order to
> > persuade MakeMaker to do so, one diverts PREFIX to point to the latest
> > directory. Unfortunately this has the side effect of having wrong paths in
> > the perl modules, if they get them from MakeMaker.
> >
> > Usually there is a way of diverting all Make-paths with one argument, but
> > MakeMaker does not (yet?) have this functionality.
> 
> Yes, with GNU autoconf for example you can say
> 
> % ./configure --prefix=/foo
> % make install DESTDIR=/bar
> [...]
> I'm cc'ing this message to the MakeMaker list to ask if there is a
> recommended way to do things.  I want to build a package with
> PREFIX=whatever but then when copying in the files, put them in a
> temporary directory so I can create a binary package.  Any
> suggestions?

It would be nice, if in some future MakeMaker version either the DESTDIR
variable was put in front of every installation path, or from an rpm point of
view, if the installation paths would not be computed at MakeMaker time, but
at make time (e.g. the INSTALL... variables depend on prefix or
sharedstatedir). This is how the typical "make install" diversion part of an
rpm package looks like:

  make \\\
        prefix=%{?buildroot:%{buildroot}}%{_prefix} \\\
        exec_prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} \\\
        bindir=%{?buildroot:%{buildroot}}%{_bindir} \\\
        sbindir=%{?buildroot:%{buildroot}}%{_sbindir} \\\
        sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir} \\\
        datadir=%{?buildroot:%{buildroot}}%{_datadir} \\\
        includedir=%{?buildroot:%{buildroot}}%{_includedir} \\\
        libdir=%{?buildroot:%{buildroot}}%{_libdir} \\\
        libexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \\\
        localstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} \\\
        sharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} \\\
        mandir=%{?buildroot:%{buildroot}}%{_mandir} \\\
        infodir=%{?buildroot:%{buildroot}}%{_infodir} \\\
  install

I believe that, if new make variables were needed for MakeMaker, then the rpm
developers would probably gladly adopt them.
-- 
[EMAIL PROTECTED]

Attachment: msg00771/pgp00000.pgp
Description: PGP signature

Reply via email to