[Fedora-packaging] %makeinstall - must not or should not use it?

Toshio Kuratomi a.badger at gmail.com
Sun Sep 10 15:12:02 UTC 2006


On Sun, 2006-09-10 at 14:39 +0530, Parag N(पराग़) wrote:
> hi,
> On 8/21/06, Toshio Kuratomi <toshio at tiki-lounge.com> wrote:
> > > > "Fedora's RPM includes a %makeinstall macro but it must NOT be used when
> > > > make install DESTDIR=%{buildroot} will work.  %makeinstall is a kludge
> > > > that can work with Makefiles that don't make use of the DESTDIR variable
> > > > but it has the following potential issues:"

> So can i say in other words that if applications built using say GTK
> application built using glade which automatically creates Makefiles
> must use always
> make install DESTDIR=%{buildroot}
> and not %makeinstall
> 
> AND if upstream package developer himself written a Makefile then he must use
> %makeinstall ??

%makeinstall is an RPM spec file macro.  It doesn't involve upstream
because it is not part of the Makefile.  It is only part of the spec
file that you, as a Fedora packager, write.

<history>
When upstream projects create Makefiles, they usually include a variable
called DESTDIR which allows downstream packagers to install into a
temporary directory.  This works by prepending DESTDIR to the
directories that the program installs into *during make install*
(LIBDIR, DATADIR, etc).  During build (regular "make" or "make all") the
program uses only the directories the program will end up in (LIBDIR,
DATADIR, etc) and does not use DESTDIR at all.

Older Makefiles did not use DESTDIR.  So with these the packager has to
modify the values of the actual destination directories in order to
install into the temporary root during packaging.  This is what %
makeinstall does.   Since packagers still run across these Makefiles
once in a while so %makeinstall still has value.  But using it requires
extra vigilance on the part of the packager and reviewer.  You should
look in the build.log to be sure that the package is not rebuilding any
part of itself during "make install" and grep through the installed
files to make sure the temporary root isn't included in any of the
installed files.
</history>

-Toshio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/fedora-packaging/attachments/20060910/3d6d1d7b/attachment.sig>


More information about the Fedora-packaging mailing list