How to build an install profile progmatically
The questions you are asking are pretty hard to crack. We have build Kraftwagen which is a Drush extension and a bunch of Drupal modules that will fit your needs.

Please have a look and let us know if it worked for you.