right way to compile wine with a "buildroot" DESTDIR is missing

Vincent Béron vberon at mecano.gme.usherb.ca
Thu Aug 15 14:54:34 CDT 2002


Le jeu 15/08/2002 à 15:14, Alexandre Julliard a écrit :
> Raul Dias <chaos at swi.com.br> writes:
> 
> > configure is called with rpm location macros as:
> > 
> > ./configure --prefix=%{_prefix} --libdir=%{_libdir} and so on
> > 
> > that is expanded to:
> > 
> > ./configure --prefix=/usr --libdir=/usr/lib ....
> > 
> > In turn this variables won't rely on ${prefix} in Makefile.
> 
> But %{_libdir} should expand to ${prefix}/lib, not /usr/lib. Otherwise
> you can't change prefix and have it do anything useful. Is this
> something you can fix, or are the _libdir etc. macros hardcoded?
> 

They're not hardcoded (at least on my system, RH7.3 with
rpm-4.0.4-7x.18). In fact, they are defined in
/usr/lib/rpm/(arch)-linux/macros, and except for _sysconfdir,
_localstatedir et _oldincludedir, they all rely on other macros to
update themselves should you choose another _prefix.

Raul, another way you could install while doing the RPM is via the
%makeinstall macro rather than a manual "make install". Same thing
applies to %configure vs "./configure". All the dirs are already given,
and as a bonus, your spec file will be smaller and more easily
manageable.

FYI, the format of the directory passing of the %makeinstall macro is 
make prefix=%(?buildroot:%{buildroot}}%{_prefix} ... install,
which is close to what you had originally.

I believe using those %configure and %makeinstall macros are the proper
way to use rpm nowadays.

Vincent




More information about the wine-devel mailing list