fakedestdir was written to ease packaging software, whose makefiles don't support DESTDIR or any equivalent feature. While such packages should be fixed, it's sometimes not worth the effort or there simply isn't time to do it. fakedestdir is worth trying in this kind of desperate situations.
fakedestdir does some ugly tricks, which aim to modify the commands run so that files get copied to temporary directory instead of their final target in e.g. /usr. fakedestdir is far from perfect and doesn't work with every problematic source package. In case of problems, start by checking the log files fakedestdir_make.log and fakedestdir_faked.log.
Note: Quite often an equivalent to DESTDIR exists, you just need to look for it. Simply setting different prefix e.g. make prefix=$PKG install often works fine and doesn't cause the temporary installation directory to be hardcoded into any files.
When commands like
make DESTDIR=/tmp/destdir install make prefix=/tmp/destdir/usr libdir=/tmp/destdir/usr/lib install
fail or produce wrong results (e.g. /tmp/destdir gets hardcoded to one or more files), you can try if fakedestdir is able to do anything better:
fakedestdir /tmp/destdir install
Never run fakedestdir as root unless you know what you are doing. If something goes wrong, it can mess up files in /usr or whatever was the installation prefix of the software you are trying to package.
fakedestdir requires GNU bash 2.xx or later and GNU sed 4.xx or later.