I wrote a script to build Minetest on Debian systems a long time ago.
Over time I have tweaked it and added to it to a point that it's now capable of cloning the needed git repositories (a check is performed to see if it's needed and skipped if the local git repo has already been set up), build Minetest and optionally run Minetest after it has been built. After the building is complete, the script will tell you how long it took to build, just for the heck of it (though some people may like to know).
The idea is for those that have never built anything from source, to allow them to easily compile Minetest from source.
I've included a (commented) command line for the installation of the dependencies if needed and so I now hope that I have covered all the bases in the script.
The only thing that I have not covered is how to save the script and how to make it executable :-)
Let me know what you guys think, I like to hear some feedback.
The script can be found at http://pastebin.com/D0d6hJU2