Faking username to "install" for build system

A few packages insist on installing itsell as name “root” instead of the
more generic UID 0 during “make install” phase.

This very seldomly creates a few, neglectable, but still slightly
troubling problems when someone chooses a non “root” name for the
superuser, i.e.:

install: invalid user `root’

I think Alsa-lib is one of these.

Anyway, I could replace the Makefile (which I already do, so in fact
there is no real “problem”), so this is the easy solution. But it is
also a bit stupid and feels hackish to have a ruby script fix wrong
Makefiles automatically, instead of being able to control the build
system completely.

My question now is:

  • Is there a way to supply the binary called “install” with a different
    user name? As in to completely control what gets passed between these
    binaries/processes.
    Optimally I would love to have a complete sandboxed “ruby-environment”
    with every process controllable no matter the buildsystem (scons, cmake,
    autoconfigure) used, and of course as much ruby as possible therein. (I
    still hope to completely avoid using any C but I am not sure this is
    possible, after all it reminds me more of a virtual build system and I
    still have a GUI on my todo list to completely control a compile/build
    situation, and resume from spot on when a user wishes to. Plus, a GUI
    with checkboxes for different choices etc… sometimes helps non-tech and
    tech people alike to control something in a straightforward fashion. )

I am very thankful for any help or pointers regarding this or related
topics.