Spk (Simple PacKage management) is a set of libraries implementing a package management system and a command-line application to interface with that system. It is free software and is released under the terms of the GNU General Public License. You are free to modify it and redistribute it in accordance with that license.
Spk was written to make managing software installed from source code easier. Spk will execute the install commands for a software package and record the files that are placed on your system. For example, instead of executing make install you could execute spk make install and records of file additions, modifications, and deletions will be made. Deleted and changed files will be archived and can easily be restored.
Before spk executes an install command it sets the environment variable LD_PRELOAD to the location of one of its own libraries. That library overrides certain functions from libc (like fopen and mkdir). Spk's implementation of these functions writes information about changes to the file system to a file in spk's repository and then calls the underlying libc implementation. Eventually the recorded information is translated to a list of added, changed, and deleted files which is associated with the newly installed package.
There are several (quite excellent) source-based package managers available. Here are some of the reasons I had for writing another package manager.
If you decide to give spk a try, feel free to let me know what you think. (Comments/suggestions/bug reports are welcome.)