This is tutorial for Photoshopbut I'm sure it can be done in Gimp as well.
Step 1. If you have your fabulous unshaded drawing(preferably colour, lineart and background on different layers), make a new layer for shading and set it to Multiply.
Step 2. Use Lasso tool to select areas you want to be shaded. It doesn't matter if selection goes out of colour layer, you'll clear it later.
Step 3. Fill the selection with light grey colour.
Step 4. Go to colour layer and select all areas outside the layer. Now go back to shading layer and clear the selection.
Step 5. Open Hue/Saturation box(Ctrl+U). You can now change shading colour to mach enviroment.

Fabulous!
